Skip to content

Latest commit

 

History

History
154 lines (115 loc) · 5.4 KB

File metadata and controls

154 lines (115 loc) · 5.4 KB
title linkTitle page_title subcategory description
powerflex_vtree data source
powerflex_vtree
powerflex_vtree Data Source - powerflex
This datasource is used to query the existing vtrees from the PowerFlex array. The information fetched from this datasource can be used for getting the details.

powerflex_vtree (Data Source)

This datasource is used to query the existing vtrees from the PowerFlex array. The information fetched from this datasource can be used for getting the details.

Example Usage

/*
Copyright (c) 2023-2024 Dell Inc., or its subsidiaries. All Rights Reserved.

Licensed under the Mozilla Public License Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://mozilla.org/MPL/2.0/


Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

# commands to run this tf file : terraform init && terraform apply --auto-approve

# Get all VTrees details present on the cluster
data "powerflex_vtree" "all" {
}

output "powerflex_vtree_all_result" {
  value = data.powerflex_vtree.all.vtree_details
}

# if a filter is of type string it has the ability to allow regular expressions
# data "powerflex_vtree" "vtree_filter_regex" {
#   filter{
#     name = ["^System_.*$"]
#     data_layout = ["^.*Granularity$"]
#   }
# }

# output "vtreeFilterRegexResult"{
#  value = data.powerflex_vtree.vtree_filter_regex.vtree_details
# }


# Get Peer System details using filter with all values
# If there is no intersection between the filters then an empty datasource will be returned
# For more information about how we do our datasource filtering check out our guides: https://dell.github.io/terraform-docs/docs/storage/platforms/powerflex/product_guide/examples
data "powerflex_vtree" "filtered" {
  filter {
    # storage_pool_id = ["storage_pool_id", "storage_pool_id2"]
    # data_layout = ["data_layout", "data_layout2"]
    # compression_method = ["compression_method", "compression_method2"]
    # in_deletion = false
    # name = ["name", "name2"]
    # id = ["id", "id2"]
  }
}

output "powerflex_vtree_filtered_result" {
  value = data.powerflex_vtree.filtered.vtree_details
}

After the successful execution of above said block, we can see the output by executing terraform output command. Also, we can fetch information via the variable: data.powerflex_vtree.datasource_block_name.attribute_name where datasource_block_name is the name of the data source block and attribute_name is the attribute which user wants to fetch.

Schema

Optional

Read-Only

  • id (String) Placeholder identifier attribute.
  • vtree_details (Attributes Set) VTree details (see below for nested schema)

Nested Schema for filter

Optional:

  • compression_method (Set of String) List of compression_method
  • data_layout (Set of String) List of data_layout
  • id (Set of String) List of id
  • in_deletion (Boolean) Value for in_deletion
  • name (Set of String) List of name
  • storage_pool_id (Set of String) List of storage_pool_id

Nested Schema for vtree_details

Read-Only:

  • compression_method (String) Compression method
  • data_layout (String) Data layout
  • id (String) VTree ID
  • in_deletion (Boolean) In deletion
  • links (Attributes List) Specifies the links associated with VTree (see below for nested schema)
  • name (String) VTree name
  • root_volumes (Set of String) Root volumes
  • storage_pool_id (String) Storage pool ID
  • vtree_migration_info (Attributes) Vtree migration information (see below for nested schema)

Nested Schema for vtree_details.links

Read-Only:

  • href (String) Specifies the exact path to fetch the details
  • rel (String) Specifies the relationship with the VTree

Nested Schema for vtree_details.vtree_migration_info

Read-Only:

  • destination_storage_pool_id (String) Destination storage pool ID
  • migration_pause_reason (String) Migration pause reason
  • migration_queue_position (Number) Migration queue position
  • migration_status (String) Migration status
  • source_storage_pool_id (String) Source storage pool ID
  • thickness_conversion_type (String) Thickness conversion type