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. |
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.
/*
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.
filter
(Block, Optional) (see below for nested schema)
id
(String) Placeholder identifier attribute.vtree_details
(Attributes Set) VTree details (see below for nested schema)
Optional:
compression_method
(Set of String) List of compression_methoddata_layout
(Set of String) List of data_layoutid
(Set of String) List of idin_deletion
(Boolean) Value for in_deletionname
(Set of String) List of namestorage_pool_id
(Set of String) List of storage_pool_id
Read-Only:
compression_method
(String) Compression methoddata_layout
(String) Data layoutid
(String) VTree IDin_deletion
(Boolean) In deletionlinks
(Attributes List) Specifies the links associated with VTree (see below for nested schema)name
(String) VTree nameroot_volumes
(Set of String) Root volumesstorage_pool_id
(String) Storage pool IDvtree_migration_info
(Attributes) Vtree migration information (see below for nested schema)
Read-Only:
href
(String) Specifies the exact path to fetch the detailsrel
(String) Specifies the relationship with the VTree
Read-Only:
destination_storage_pool_id
(String) Destination storage pool IDmigration_pause_reason
(String) Migration pause reasonmigration_queue_position
(Number) Migration queue positionmigration_status
(String) Migration statussource_storage_pool_id
(String) Source storage pool IDthickness_conversion_type
(String) Thickness conversion type