title | linkTitle | page_title | subcategory | description |
---|---|---|---|---|
powerflex_volume data source |
powerflex_volume |
powerflex_volume Data Source - powerflex |
This datasource is used to query the existing volume from the PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block. |
This datasource is used to query the existing volume from the PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block.
/*
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.
*/
// Empty filter block will return all the volumes
data "powerflex_volume" "volume" {
}
output "volumeResult" {
value = data.powerflex_volume.volume.volumes
}
# if a filter is of type string it has the ability to allow regular expressions
# data "powerflex_volume" "volume_filter_regex" {
# filter{
# name = ["^System_.*$"]
# volume_type = ["^.*Provisioned$"]
# }
# }
# output "volumeFilterRegexResult"{
# value = data.powerflex_volume.volume_filter_regex.volumes
# }
// If multiple filter fields are provided then it will show the intersection of all of those fields.
// 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_volume" "volume_filter" {
filter {
# id = ["id1", "id2"]
# name = ["name1", "name2"]
# creation_time = [1, 2]
# size_in_kb = [123, 456]
# ancestor_volume_id = ["ancestor_volume_id1", "ancestor_volume_id2"]
# vtree_id = ["vtree_id1", "vtree_id2"]
# consistency_group_id = ["consistency_group_id1", "consistency_group_id2"]
# volume_type = ["volume_type1", "volume_type2"]
# use_rm_cache = false
# storage_pool_id = ["storage_pool_id1", "storage_pool_id2"]
# data_layout = ["data_layout1", "data_layout2"]
# not_genuine_snapshot = false
# access_mode_limit = ["access_mode_limit1", "access_mode_limit2"]
# secure_snapshot_exp_time = [789, 123]
# managed_by = ["managed_by1", "managed_by2"]
# locked_auto_snapshot = false
# locked_auto_snapshot_marked_for_removal = false
# compression_method = ["compression_method1", "compression_method2"]
# time_stamp_is_accurate = true
# original_expiry_time = [43, 71]
# volume_replication_state = ["volume_replication_state1", "volume_replication_state2"]
# replication_journal_volume = false
# replication_time_stamp = [1,2]
}
}
output "volumeFilterResult" {
value = data.powerflex_volume.volume_filter.volumes
}
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_volume.volume.attribute_name
where attribute_name is the attribute which user wants to fetch.
filter
(Block, Optional) (see below for nested schema)
id
(String) default datasource idvolumes
(Attributes List) List of volumes. (see below for nested schema)
Optional:
access_mode_limit
(Set of String) List of access_mode_limitancestor_volume_id
(Set of String) List of ancestor_volume_idcompression_method
(Set of String) List of compression_methodconsistency_group_id
(Set of String) List of consistency_group_idcreation_time
(Set of Number) List of creation_timedata_layout
(Set of String) List of data_layoutid
(Set of String) List of idlocked_auto_snapshot
(Boolean) Value for locked_auto_snapshotlocked_auto_snapshot_marked_for_removal
(Boolean) Value for locked_auto_snapshot_marked_for_removalmanaged_by
(Set of String) List of managed_byname
(Set of String) List of namenot_genuine_snapshot
(Boolean) Value for not_genuine_snapshotoriginal_expiry_time
(Set of Number) List of original_expiry_timereplication_journal_volume
(Boolean) Value for replication_journal_volumereplication_time_stamp
(Set of Number) List of replication_time_stampsecure_snapshot_exp_time
(Set of Number) List of secure_snapshot_exp_timesize_in_kb
(Set of Number) List of size_in_kbstorage_pool_id
(Set of String) List of storage_pool_idtime_stamp_is_accurate
(Boolean) Value for time_stamp_is_accurateuse_rm_cache
(Boolean) Value for use_rm_cachevolume_replication_state
(Set of String) List of volume_replication_statevolume_type
(Set of String) List of volume_typevtree_id
(Set of String) List of vtree_id
Read-Only:
access_mode_limit
(String) Specifies the access mode limit.ancestor_volume_id
(String) The volume id to which the snapshot is linked to.compression_method
(String) Specifies the compression method.consistency_group_id
(String) The unique id for the consistency group.creation_time
(Number) Specifies the time of creation.data_layout
(String) Specifies the layout for the data.id
(String) Unique identifier of the volume instance.links
(Attributes List) Specifies the links associated for a volume. (see below for nested schema)locked_auto_snapshot
(Boolean) Specifies if it's a locked auto snapshot.locked_auto_snapshot_marked_for_removal
(Boolean) Specifies if it's a locked auto snapshot marked for removal.managed_by
(String) Specifies by whom it's managed by.mapped_sdc_info
(Attributes List) Specifies the list of sdc's mapped to a volume. (see below for nested schema)name
(String) Name of the volume.not_genuine_snapshot
(Boolean) Specifies if not genuine snapshot.original_expiry_time
(Number) Specifies the original expiry time.replication_journal_volume
(Boolean) Specifies the replication journal volume.replication_time_stamp
(Number) Specifies the replication time stamp.secure_snapshot_exp_time
(Number) Specifies the secure snapshot expiry time.size_in_kb
(Number) Size of the volume in KBstorage_pool_id
(String) Specifies the unique identifier of the storage pool.time_stamp_is_accurate
(Boolean) Specifies if the time stamp is accurate.use_rm_cache
(Boolean) Enable rm cache.volume_replication_state
(String) Specifies the volume replication state.volume_type
(String) Specifies the type of that volume.vtree_id
(String) Unique identifier of the VTree
Read-Only:
href
(String) Specifies the exact path to fetch the details.rel
(String) Specifies the relationship with the volume.
Read-Only:
access_mode
(String) Specifies the access mode.is_direct_buffer_mapping
(Boolean) Specifies if it is direct buffer mapping.limit_bw_in_mbps
(Number) Specifies the bandwidth limits in Mbps.limit_iops
(Number) Specifies the IOPS limits.sdc_id
(String) Unique identifier for sdc.sdc_ip
(String) Ip of the sdc.sdc_name
(String) Specifies the name of the sdc.