powerflex_sdc_volumes_mapping (Resource)

This resource can be used to manage mapping of volumes to an SDC on a PowerFlex array.

Note: Exactly one of id and name is required. Exactly one of volume_id and volume_name is required.

Example Usage

# Command to run this tf file : terraform init && terraform plan && terraform apply.
# Create, Update, Delete is supported for this resource.
# To import, check import.sh for more info.
# To create/update, either SDC ID or SDC name must be provided.
# volume_list attribute is optional. 
# To check which attributes of the sdc_volumes_mappping resource can be updated, please refer Product Guide in the documentation

resource "powerflex_sdc_volumes_mapping" "mapping-test" {
  id = "e3ce1fb600000001"
  volume_list = [
      volume_id        = "edb2059700000002"
      limit_iops       = 140
      limit_bw_in_mbps = 19
      access_mode      = "ReadOnly"
      volume_name      = "terraform-vol"
      access_mode      = "ReadWrite"
      limit_iops       = 120
      limit_bw_in_mbps = 25

# To unmap all the volumes mapped to SDC, below config can be used. 

resource "powerflex_sdc_volumes_mapping" "mapping-test" {
  id = "e3ce1fb600000001"
  volume_list = []



  • id (String) The ID of the SDC.
  • name (String) The name of the SDC.
  • volume_list (Attributes Set) List of volumes mapped to SDC. Atleast one of volume_id and volume_name is required. (see below for nested schema)

Nested Schema for volume_list


  • access_mode (String) The Access Mode of the SDC. Valid values are ReadOnly, ReadWrite and NoAccess. Default value is ReadOnly.
  • limit_bw_in_mbps (Number) Bandwidth limit in MBPS. 0 represents unlimited bandwith. Default value is 0.
  • limit_iops (Number) IOPS limit. Valid values are 0 or integers greater than 10. 0 represents unlimited IOPS. Default value is 0.
  • volume_id (String) The ID of the volume.
  • volume_name (String) The name of the volume.


Import is supported using the following syntax:

# Below are the steps to import sdc along with mapped volumes :
# Step 1 - To import a sdc , we need the id of that sdc
# Step 2 - To check the id of the sdc we can make use of sdc datasource . Please refer sdc_datasource.tf for more info.
# Step 3 - create a tf file with empty resource block . Refer the example below.
# Example :
# resource "powerflex_sdc_volumes_mapping" "resource_block_name" {
# }
# Step 4 - execute the command: terraform import "powerflex_sdc_volumes_mapping.resource_block_name" "id_of_the_sdc" (resource_block_name must be taken from step 3 and id must be taken from step 2)
# Step 5 - After successful execution of the command , check the state file.