powerflex_volume (Data Source)

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.

Note: Only one of names, id, storage_pool_id and storage_pool_name can be provided at a time.

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.
*/

# This datasource reads volumes either by id or name or storage_pool_id or storage_pool_name where user can provide a value to any one of them
# If it is an empty datsource block , then it will read all the volumes
# If id or name is provided then it reads a particular volume with that id or name
# If storage_pool_id or storage_pool_name is provided then it will return the volumes under that storage pool

data "powerflex_volume" "volume" {

  id = "4570761d00000024"
  #name = "cosu-ce5b8a2c48"
  #storage_pool_id= "c98e26e500000000"
  #storage_pool_name= "pool2"
}

output "volumeResult" {
  value = data.powerflex_volume.volume.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.

Schema

Optional

  • id (String) Unique identifier of the volume instance. Conflicts with name, storage_pool_id and storage_pool_name.
  • name (String) Name of the volume. Conflicts with id, storage_pool_id and storage_pool_name.
  • storage_pool_id (String) Specifies the unique identifier of the storage pool. Conflicts with id, name and storage_pool_name.
  • storage_pool_name (String) Specifies the unique identifier of the storage pool. Conflicts with id, name and storage_pool_id.

Read-Only

Nested Schema for volumes

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 asscociated 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 KB
  • storage_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.

Nested Schema for volumes.mapped_sdc_info

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.