Product Guide

Terraform Provider for Dell PowerStore


Contents


Provider

Configure the provider on Dell PowerStore

Synopsis

To create any resource / datasource , we need to provide authentication details to connect to the PowerStore

List Of Parameters

Parameter Name
Description
Required/Optional/Computed
Type
Default Value
Choices
endpoint The endpoint to which it needs to be connected. Required string

username The username required for authentication. Required  string

password The password required for the authentication.  Required string

insecure Specifies if the user wants to do SSL verification.  Optional bool  false
timeout Specifies the timeout (in seconds) for any https request.  Optional int64  120

Examples

    
        provider "powerstore" {
            username = "username"
            password = "password"
            endpoint = "10.10.10.1"
            insecure = true
            timeout = 120
        }
    

Note

  • Provider details must be provided to autnenticate and connect to the PowerStore Storage system before creating any resource / datasource
  • If we don't set the insecure attribute in provider block, the authentication will require SSL verification
  • User role should be either Powerstore admin or Powerstore storage operator.

Volume Resource

Manage Volume on Dell PowerStore

Synopsis

Managing volumes on PowerStore storage system includes creating new volume, modifying attributes of the volume, importing existing volume and deleting the volume.

List Of Parameters

Parameter Name
Description
Required/Optional/Computed
Can be Updated
Type
Default Value
Choices
id Unique identifier of the volume instance Computed No String

name Name of the volume Required Yes String

size Size of the volume to be created. Required Yes Float64

capacity_unit The Capacity Unit corresponding to the size. Optional and Computed Yes String GB
  • MB
  • GB
  • TB (256 TB max)
host_id Unique identifier of the host to be attached to the volume. Optional and Computed Yes String

host_name Unique name of the host to be attached to the volume. Optional Yes String

host_group_id Unique identifier of the host group to be attached to the volume. Optional and Computed Yes String

host_group_name Unique name of the host group to be attached to the volume. Optional Yes String

logical_unit_number logical unit number when creating an attached volume. Optional and Computed No Int64

volume_group_id Volume group to add the volume to. Optional and Computed Yes String

volume_group_name The volume group name of the volume. Optional Yes String

min_size minimum size for the volume, in bytes. Optional No Int64 1 MB
sector_size sector size, in bytes. Only 512-byte and 4096-byte sectors are supported. Optional and Computed No Int64 512
description Description of the volume Optional and Computed Yes String

appliance_id Unique identifier of the appliance on which the volume is provisioned Optional and Computed No String

appliance_name Unique name of the appliance on which the volume is provisioned Optional No String

protection_policy_id Unique identifier of the protection policy assigned to the volume. Only applicable to primary and clone volumes. Optional and Computed Yes String

protection_policy_name Unique name of the protection policy assigned to the volume. Only applicable to primary and clone volumes. Optional Yes String

performance_policy_id Unique identifier of the performance policy assigned to the volume. Optional and Computed Yes String default_medium
creation_timestamp Time when the volume was created. Computed No String

is_replication_destination Indicates whether this volume is a replication destination. Computed No Bool

node_affinity The node_affinity of the volume. Computed No String
System_Select_At_Attach, System_Selected_Node_A, System_Selected_Node_B, Preferred_Node_A, Preferred_Node_B
type Type of volume Computed No String
Primary, Clone, Snapshot
wwn

World wide name of the volume.

Computed No String

state

Volume life cycle states

Computed No String
Ready, Initializing, Offline, Destroying
logical_used Current amount of data (in bytes) host has written to a volume without dedupe, compression or sharing. Computed No Int64

app_type This attribute indicates the intended use of this volume. Optional and Computed Yes String
Relational_Databases_Other, Relational_Databases_Oracle, Relational_Databases_SQL_Server, Relational_Databases_PostgreSQL, etc.
app_type_other This field can only be set if app_type is set to Relational_Databases_Other, Big_Data_Analytics_Other, Business_Applications_Other, Healthcare_Other, Virtualization_Other or Other. If the app_type attribute is set to anything other than one of these values, the attribute will be cleared. Optional Yes String

nsid NVMe Namespace unique identifier in the NVME subsystem. Used for volumes attached to NVMEoF hosts. Computed No Int64

nguid NVMe Namespace globally unique identifier. Used for volumes attached to NVMEoF hosts. Computed No String

Examples

- With required attributes only

    resource "powerstore_volume" "test" {
        name = "test_vol"
        size =  3
        capacity_unit= "GB"
    }

- With Host ID:

    resource "powerstore_volume" "test1" {
        name = "test_vol1"
        size =  3
        capacity_unit= "GB"
        description = "Creating volume"
        host_id="022c3fbc-4e92-48b6-928b-18565c803d0e"
        appliance_id="A1"
        volume_group_id="069b594c-6f68-4485-ab56-1c10b6230d71"
        min_size=1048576
        sector_size=512
        protection_policy_id="ea88-9c6e-a549-4281-b346-762451758e43"
        performance_policy_id="default_medium"
        app_type="Relational_Databases_Other"
        app_type_other="db1"
    }

- With HostGroupID:

    resource "powerstore_volume" "test2" {
        name = "test_vol2"
        size =  3
        capacity_unit= "GB"
        description = "Creating volume"
        host_group_id="80c4c618-cf91-4b67-9df3-b2c0f0d6564c"
        appliance_id="A1"
        volume_group_id="069b594c-6f68-4485-ab56-1c10b6230d71"
        min_size=1048576
        sector_size=512
        protection_policy_id="ea889c6e-a549-4281-b346-762451758e43"
        performance_policy_id="default_medium"
        app_type="Relational_Databases_Other"
        app_type_other="db1"
    }

Note

  • Either host_id or host_group_id can be present at a time. logical_unit_number is used only when either host_id or host_group_id are present.

SnapshotRule Resource

Manage Snapshot Rule on Dell PowerStore

Synopsis

Managing snapshot rule on PowerStore storage system includes creating new snapshot rule, modifying attributes of the snapshot rule, importing existing snapshot rule and deleting the snapshot rule.

List Of Parameters

Parameter Name
Description
Required/Optional/Computed
Can be Updated
Type
Default Value
Choices
id Unique identifier of the snapshot rule. Computed No String

name Snapshot rule name. Required Yes String

interval Interval between snapshots taken by a snapshot rule. Optional and Computed Yes String
Five_Minutes, Fifteen_Minutes, Thirty_Minutes, One_Hour, Two_Hours, Three_Hours, Four_Hours, Six_Hours, Eight_Hours, Twelve_Hours, One_Day
time_of_day

Time of the day to take a daily snapshot

Either the interval parameter or the time_of_day parameter will be set, but not both.

Optional and Computed Yes String
format "hh:mm" using a 24 hour clock
timezone

timezone identifier for applying the time zone to the time_of_day for a snapshot rule, including any DST effects if applicable

Applies only when a time_of_day is specified in the snapshot rule.

Optional and Computed Yes String UTC Etc__GMT_plus_12, US__Samoa, Etc__GMT_plus_11, America__Atka, US__Hawaii, Etc__GMT_plus_10, Pacific__Marquesas, US__Alaska, Pacific__Gambier, Etc__GMT_plus_9, PST8PDT, Pacific__Pitcairn, US__Pacific, Etc__GMT_plus_8, Mexico__BajaSur, America__Boise, America__Phoenix, MST7MDT, Etc__GMT_plus_7, CST6CDT, America__Chicago, Canada__Saskatchewan, America__Bahia_Banderas, Etc__GMT_plus_6, Chile__EasterIsland, America__Bogota, America__New_York, EST5EDT, America__Havana, Etc__GMT_plus_5, America__Caracas, America__Cuiaba, America__Santo_Domingo, Canada__Atlantic, America__Asuncion, Etc__GMT_plus_4, Canada__Newfoundland, Chile__Continental, Brazil__East, America__Godthab, America__Miquelon, America__Buenos_Aires, Etc__GMT_plus_3, America__Noronha, Etc__GMT_plus_2, America__Scoresbysund, Atlantic__Cape_Verde, Etc__GMT_plus_1, UTC, Europe__London, Africa__Casablanca, Atlantic__Reykjavik, Antarctica__Troll, Europe__Paris, Europe__Sarajevo, Europe__Belgrade, Europe__Rome, Africa__Tunis, Etc__GMT_minus_1, Asia__Gaza, Europe__Bucharest, Europe__Helsinki, Asia__Beirut, Africa__Harare, Asia__Damascus, Asia__Amman, Europe__Tiraspol, Asia__Jerusalem, Etc__GMT_minus_2, Asia__Baghdad, Africa__Asmera, Etc__GMT_minus_3, Asia__Tehran, Asia__Baku, Etc__GMT_minus_4, Asia__Kabul, Asia__Karachi, Etc__GMT_minus_5, Asia__Kolkata, Asia__Katmandu, Asia__Almaty, Etc__GMT_minus_6, Asia__Rangoon, Asia__Hovd, Asia__Bangkok, Etc__GMT_minus_7, Asia__Hong_Kong, Asia__Brunei, Asia__Singapore, Etc__GMT_minus_8, Asia__Pyongyang, Australia__Eucla, Asia__Seoul, Etc__GMT_minus_9, Australia__Darwin, Australia__Adelaide, Australia__Sydney, Australia__Brisbane, Asia__Magadan, Etc__GMT_minus_10, Australia__Lord_Howe, Etc__GMT_minus_11, Asia__Kamchatka, Pacific__Fiji, Antarctica__South_Pole, Etc__GMT_minus_12, Pacific__Chatham, Pacific__Tongatapu, Pacific__Apia, Etc__GMT_minus_13, Pacific__Kiritimati, Etc__GMT_minus_14
days_of_week

Days of the week when the snapshot rule should be applied.

Days are determined based on the UTC time zone, unless the time_of_day and time_zone properties are set.

Optional and Computed Yes List of String
Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
desired_retention

Desired snapshot retention period in hours. The system will retain snapshots for this time period.

  • minimum: 0
  • maximum: 8760
Required Yes Int64

is_replica

Indicates whether this is a replica of a snapshot rule on a remote system

i.e. the source of a replication session replicating a storage resource to the local system

Computed No Bool false
nas_access_type

NAS filesystem snapshot access method.

setting is ignored for volume, virtual_volume, and volume_group snapshots

Optional and Computed Yes String
Snapshot, Protocol
is_read_only Indicates whether this snapshot rule can be modified. Optional and Computed Yes Bool false
managed_by entity that owns and manages this instance Computed No String

managed_by_id

Unique identifier of the managing entity based on the value of the managed_by property, as show below:

  • User - Empty
  • Metro - Unique identifier of the remote system where the policy was assigned
  • Replication - Unique identifier of the source remote system.
  • VMware_vSphere - Unique identifier of the owning VMware vSphere/vCenter.
Computed No String

delete_snaps Specify whether all snapshots previously created by this snapshot rule should also be deleted when this rule is removed. Optional Yes Bool false

Examples

- With required attributes only (using time_of_day):

    resource "powerstore_snapshotrule" "test" {
        name = "test_snapshotrule" 
        time_of_day = "21:00"
        desired_retention = 56
    }

- With required attributes only (using interval):

    resource "powerstore_snapshotrule" "test" {
        name = "test_snapshotrule" 
        interval = "Four_Hours"
        desired_retention = 56
    }

- With optional attributes:

    resource "powerstore_snapshotrule" "test" {
        name = "test_snapshotrule" 
        interval = "Four_Hours"
        days_of_week = ["Monday", "Wednesday"]
        desired_retention = 56
        nas_access_type = "Snapshot"
        is_read_only = false
        delete_snaps = true
    }

Note

  • Either interval or time_of_day can be present at a time.

ProtectionPolicy Resource

Manage Protection Policy on Dell PowerStore

Synopsis

Managing protection policy on PowerStore storage system includes creating new protection policy, modifying attributes of the protection policy, importing existing protection policy and deleting the protection policy.

List Of Parameters

Parameter Name
Description
Required/Optional/Computed
Can be Updated
Type
Default Value
Choices
id Unique identifier of the policy. Computed No String

name

Policy name. This should be unique across all protection policies in the cluster.

Required Yes String

description

Policy description.

Optional and Computed Yes String

type The type of the protection policy.

Supported policy types.

Protection - A protection policy, consisting of snapshot and replication rules.

Performance - A performance policy, consisting of performance rules.

Computed No String
is_read_only Indicates whether this policy can be modified. Computed No Bool false
snapshot_rule_ids List of the snapshot rule IDs that are associated with this policy. Optional and Computed Yes Set of string

snapshot_rule_names List of the snapshot rule names that are associated with this policy. Optional and Computed Yes Set of string

replication_rule_ids List of the replication rule IDs that are associated with this policy. Optional and Computed Yes Set of string

replication_rule_names List of the replication rule names that are associated with this policy. Optional and Computed Yes Set of string

Examples

- With required attributes only (associating replication rule using Name):

    resource "powerstore_protectionpolicy" "test" 
    {
        name = "protectionpolicy_acc_new"
        replication_rule_names = ["Emalee-SRA-7416-Rep"]
    }

- Associating replication rule and snapshot rule using ID:

    resource "powerstore_protectionpolicy" "test"
    {
        name = "protectionpolicy_acc_new"
        replication_rule_ids = ["5d45b173-9a85-473e-8ab8-e107f8b8085e"]
        snapshot_rule_ids = ["4be81573-c0e6-4956-a32f-a0e396a9b86d"]
    }

- Associating replication rule and snapshot rule using Name:

    resource "powerstore_protectionpolicy" "test" 
    {
        name = "protectionpolicy_acc_new"
        replication_rule_names = ["Emalee-SRA-7416-Rep"]
        snapshot_rule_names = ["test_snapshotrule_1"]
    }

- With optional attributes:

    resource "powerstore_protectionpolicy" "test" 
    {
        name = "protectionpolicy_acc_new"
        description = "Test CreateProtectionPolicy"
        snapshot_rule_names = ["test_snapshotrule_1"]
        replication_rule_ids = ["5d45b173-9a85-473e-8ab8-e107f8b8085e"]
    }

Note

  • Only one of replication_rule_ids, replication_rule_names, snapshot_rule_ids or snapshot_rule_names is required.
  • replication_rule_ids and replication_rule_names are mutually exclusive attributes and both cannot be specified in one resource block.
  • snapshot_rule_ids and snapshot_rule_names are mutually exclusive attributes and both cannot be specified in one resource block.

StorageContainer Resource

Manage Storage Container on Dell PowerStore

Synopsis

Managing storage container on PowerStore storage system includes creating new storage container, modifying attributes of the storage container, importing existing storage container and deleting the storage container.

List Of Parameters

Parameter Name
Description
Required/Optional/Computed
Can be Updated
Type
Default Value
Choices
id The unique identifier of the storage container. Computed No String

name

Name for the storage container.

This should be unique across all storage containers in the cluster.

Name can be from 1 to 64 UTF-8 characters, and not more than 127 bytes.

Required Yes String

quota

The total number of bytes that can be provisioned/reserved against this storage container.

A value of 0 means there is no limit. It is possible to set the quota to a value that overprovisions the amount of space available in the system.

Optional and Computed Yes Int64

storage_protocol The type of Storage Container. Optional and Computed Yes String SCSI SCSI, NVMe
high_water_mark

This is the percentage of the quota that can be consumed before an alert is raised.

Values between 50-100 (inclusive) are allowed

Optional and Computed Yes Int64

Examples

- With required attributes only:

    resource "powerstore_storagecontainer" "test" {
        name = "scterraform_acc"
        quota = 10737418240
    }

- With optional attributes:

    resource "powerstore_storagecontainer" "test" {
        name = "scterraform_acc"
        quota = 10737418240
        storage_protocol = "SCSI"
        high_water_mark = 70
    }

Volume DataSource

Manage Volume DataSource on Dell PowerStore

Synopsis

Managing volume datasource on PowerStore storage system includes fetching details of volume using volume name or volume id.

List Of Parameters

Parameter Name
Description
Required/Optional/Computed
Type
Default Value
Choices
id Unique identifier of the volume instance. Optional And Computed String

name Name of the volume. Optional String

size The size of the volume. Computed Float64

capacity_unit The Capacity Unit corresponding to the size. Computed String

host_id The host id of the volume. Computed String

host_group_id The host group id of the volume. Computed String

logical_unit_number The current amount of data written to the volume Computed Int64

volume_group_id The volume group id of the volume. Computed String

description The description of the volume. Computed String

appliance_id Unique identifier of the appliance on which the volume is provisioned. Computed String

protection_policy_id The protection policy assigned to the volume. Computed String

performance_policy_id The performance policy assigned to the volume. Computed String

creation_timestamp The creation timestamp of the volume. Computed String

is_replication_destination Indicates whether this volume is a replication destination. Computed Bool

node_affinity The node affinity of the volume. Computed String

type The type of the volume. Computed String

app_type The app type of the volume. Computed String

app_type_other The app type other of the volume. Computed String

wwn The wwn of the volume. Computed String

state The state of the volume. Computed String

nguid The nguid of the volume. Computed String

nsid The nsid of the volume. Computed Int64

logical_used Current amount of data used by the volume. Computed Int64

migration_session_id Unique identifier of the migration session assigned to the volume Computed String

metro_replication_session_id Unique identifier of the replication session assigned to the volume Computed String

is_host_access_available Indicates whether the volume is available to host Computed Bool

type_l10n Localized message string corresponding to type Computed String

state_l10n Localized message string corresponding to state Computed String

node_affinity_l10n Localized message string corresponding to node affinity Computed String

app_type_l10n Localized message string corresponding to app type Computed String

protection_data Specifies the ProtectionData associated with a volume. Computed Object

location_history Specifies the LocationHistory for a volume. Computed Object

appliance Specifies the Appliance associated for a volume. Computed Object

migration_session Specifies the MigrationSession associated for a volume. Computed Object

mapped_volumes Specifies the MappedVolumes associated with a volume. Computed Object

datastores Specifies the Datastores for a volume. Computed Object

volume_groups Specifies the VolumeGroup for a volume. Computed Object

protection_policy Specifies the protection policy associated for a volume. Computed Object

Examples

- Get volume details using volume name:

    data "powerstore_volume" "test1" 
    {
        name = "tf_vol"
    }

- Get volume details using volume ID:

    data "powerstore_volume" "test1" 
    {
	id = "a0b0c773-1c50-425a-89dc-aef9162ec787"
    }

Note

  • Either of volume id or volume name must be present to fetch details of specific volume.
  • Details of all the volumes would be fetched if no parameter is specified i.e empty block.