diff --git a/docs/data-sources/device.md b/docs/data-sources/device.md index a3f01b01..b9773fad 100644 --- a/docs/data-sources/device.md +++ b/docs/data-sources/device.md @@ -19,12 +19,14 @@ linkTitle: "powerflex_device" page_title: "powerflex_device Data Source - powerflex" subcategory: "" description: |- - This datasource can be used to fetch information related to devices from a PowerFlex array. + This datasource is used to query the existing device from PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block. --- # powerflex_device (Data Source) -This datasource can be used to fetch information related to devices from a PowerFlex array. +This datasource is used to query the existing device from 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 `name` and `id` can be provided at a time. ## Example Usage @@ -65,6 +67,8 @@ output "deviceResult" { } ``` +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_device.dev.attribute_name` where attribute_name is the attribute which user wants to fetch. + ## Schema diff --git a/docs/data-sources/protection_domain.md b/docs/data-sources/protection_domain.md index 8a1f21df..742ba891 100644 --- a/docs/data-sources/protection_domain.md +++ b/docs/data-sources/protection_domain.md @@ -19,14 +19,14 @@ linkTitle: "powerflex_protection_domain" page_title: "powerflex_protection_domain Data Source - powerflex" subcategory: "" description: |- - This datasource can be used to fetch information related to protection domains from a PowerFlex array. + This datasource is used to query the existing protection domain from PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block. --- # powerflex_protection_domain (Data Source) -This datasource can be used to fetch information related to protection domains from a PowerFlex array. +This datasource is used to query the existing protection domain from 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 `name` and `id` can be provided at a time. +> **Note:** Only one of `name` and `id` can be provided at a time. ## Example Usage @@ -71,6 +71,8 @@ output "pdResult" { } ``` +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_protection_domain.pd.attribute_name` where attribute_name is the attribute which user wants to fetch. + ## Schema diff --git a/docs/data-sources/sdc.md b/docs/data-sources/sdc.md index c7b5b261..7fb27ebe 100644 --- a/docs/data-sources/sdc.md +++ b/docs/data-sources/sdc.md @@ -19,14 +19,14 @@ linkTitle: "powerflex_sdc" page_title: "powerflex_sdc Data Source - powerflex" subcategory: "" description: |- - This data-source can be used to fetch information related to Storage Data Clients from a PowerFlex array. + This datasource is used to query the existing Storage Data Clients from PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block. --- # powerflex_sdc (Data Source) -This data-source can be used to fetch information related to Storage Data Clients from a PowerFlex array. +This datasource is used to query the existing Storage Data Clients from 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 `name` and `id` can be provided at a time. +> **Note:** Only one of `name` and `id` can be provided at a time. ## Example Usage @@ -66,6 +66,8 @@ output "allsdcresult" { # # ----------------------------------------------------------------------------------- ``` +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_sdc.selected.attribute_name` where attribute_name is the attribute which user wants to fetch. + ## Schema diff --git a/docs/data-sources/sds.md b/docs/data-sources/sds.md index c8cc2403..d7156d26 100644 --- a/docs/data-sources/sds.md +++ b/docs/data-sources/sds.md @@ -19,16 +19,16 @@ linkTitle: "powerflex_sds" page_title: "powerflex_sds Data Source - powerflex" subcategory: "" description: |- - This data-source can be used to fetch information related to Storage Data Servers from a PowerFlex array. + This datasource is used to query the existing Storage Data Servers from PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block. --- # powerflex_sds (Data Source) -This data-source can be used to fetch information related to Storage Data Servers from a PowerFlex array. +This datasource is used to query the existing Storage Data Servers from PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block. -~> **Note:** Exactly one of `protection_domain_name` and `protection_domain_id` is required. +> **Note:** Exactly one of `protection_domain_name` and `protection_domain_id` is required. -~> **Note:** Only one of `sds_names` and `sds_ids` can be provided at a time. +> **Note:** Only one of `sds_names` and `sds_ids` can be provided at a time. ## Example Usage @@ -72,6 +72,8 @@ output "allsdcresult" { } ``` +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_sds.example2.attribute_name` where attribute_name is the attribute which user wants to fetch. + ## Schema diff --git a/docs/data-sources/snapshot_policy.md b/docs/data-sources/snapshot_policy.md index f3fa0054..5ef607e5 100644 --- a/docs/data-sources/snapshot_policy.md +++ b/docs/data-sources/snapshot_policy.md @@ -19,14 +19,14 @@ linkTitle: "powerflex_snapshot_policy" page_title: "powerflex_snapshot_policy Data Source - powerflex" subcategory: "" description: |- - This data-source can be used to fetch information related to the snapshot policies from a PowerFlex array. + This datasource is used to query the existing snapshot policies from PowerFlex array. The information fetched from this datasource can be used for getting the details. --- # powerflex_snapshot_policy (Data Source) -This data-source can be used to fetch information related to the snapshot policies from a PowerFlex array. +This datasource is used to query the existing snapshot policies from PowerFlex array. The information fetched from this datasource can be used for getting the details. -~> **Note:** Only one of `name` and `id` can be provided at a time. +> **Note:** Only one of `name` and `id` can be provided at a time. ## Example Usage @@ -64,6 +64,8 @@ output "spResult" { } ``` +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_powerflex_snapshot_policy.sp.attribute_name` where attribute_name is the attribute which user wants to fetch. + ## Schema diff --git a/docs/data-sources/storage_pool.md b/docs/data-sources/storage_pool.md index d5364827..6edc409b 100644 --- a/docs/data-sources/storage_pool.md +++ b/docs/data-sources/storage_pool.md @@ -19,16 +19,16 @@ linkTitle: "powerflex_storage_pool" page_title: "powerflex_storage_pool Data Source - powerflex" subcategory: "" description: |- - This data-source can be used to fetch information related to the storage pools from a PowerFlex array. + This datasource is used to query the existing storage pools from PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block. --- # powerflex_storage_pool (Data Source) -This data-source can be used to fetch information related to the storage pools from a PowerFlex array. +This datasource is used to query the existing storage pools from PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block. -~> **Note:** Exactly one of `protection_domain_name` and `protection_domain_id` is required. +> **Note:** Exactly one of `protection_domain_name` and `protection_domain_id` is required. -~> **Note:** Only one of `storage_pool_names` and `storage_pool_ids` can be provided at a time. +> **Note:** Only one of `storage_pool_names` and `storage_pool_ids` can be provided at a time. ## Example Usage @@ -66,11 +66,13 @@ data "powerflex_storage_pool" "example" { } -output "allsdcresult" { +output "storagePoolresult" { value = data.powerflex_storage_pool.example.storage_pools } ``` +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_storage_pool.example.attribute_name` where attribute_name is the attribute which user wants to fetch. + ## Schema diff --git a/docs/data-sources/volume.md b/docs/data-sources/volume.md index 86dac2c0..9a428faf 100644 --- a/docs/data-sources/volume.md +++ b/docs/data-sources/volume.md @@ -19,14 +19,14 @@ linkTitle: "powerflex_volume" page_title: "powerflex_volume Data Source - powerflex" subcategory: "" description: |- - This data-source can be used to fetch information related to volumes from a PowerFlex array. + This datasource is used to query the existing volume from PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block. --- # powerflex_volume (Data Source) -This data-source can be used to fetch information related to volumes from a PowerFlex array. +This datasource is used to query the existing volume from 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. +> **Note:** Only one of `names`, `id`, `storage_pool_id` and `storage_pool_name` can be provided at a time. ## Example Usage @@ -48,17 +48,15 @@ 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 # 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 a empty datsource block , then it will read all the volumes +# 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 -# Only one of the attribute can be provided among id, name, storage_pool_id, storage_pool_name data "powerflex_volume" "volume" { - #name = "cosu-ce5b8a2c48" id = "4570761d00000024" + #name = "cosu-ce5b8a2c48" #storage_pool_id= "c98e26e500000000" #storage_pool_name= "pool2" } @@ -68,6 +66,8 @@ output "volumeResult" { } ``` +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 diff --git a/docs/data-sources/vtree.md b/docs/data-sources/vtree.md index 6c770920..068be3f8 100644 --- a/docs/data-sources/vtree.md +++ b/docs/data-sources/vtree.md @@ -19,12 +19,12 @@ linkTitle: "powerflex_vtree" page_title: "powerflex_vtree Data Source - powerflex" subcategory: "" description: |- - This datasource can be used to fetch information related to VTrees from a PowerFlex array. + This datasource is used to query the existing vtrees from PowerFlex array. The information fetched from this datasource can be used for getting the details. --- # powerflex_vtree (Data Source) -This datasource can be used to fetch information related to VTrees from a PowerFlex array. +This datasource is used to query the existing vtrees from PowerFlex array. The information fetched from this datasource can be used for getting the details. ## Example Usage @@ -47,8 +47,8 @@ limitations under the License. */ # commands to run this tf file : terraform init && terraform apply --auto-approve -# empty block of the powerflex_vtree datasource will give list of all VTrees within the system +# Get all VTrees details present on the cluster data "powerflex_vtree" "example1" { } @@ -68,6 +68,8 @@ data "powerflex_vtree" "example4" { } ``` +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. + ## Schema diff --git a/docs/index.md b/docs/index.md index 7800cd88..48c89dac 100644 --- a/docs/index.md +++ b/docs/index.md @@ -64,6 +64,120 @@ provider "powerflex" { insecure = true timeout = 120 } + +resource "powerflex_protection_domain" "pd" { + name = "domain_1" +} + +resource "powerflex_sds" "sds1" { + name = "sds_1" + protection_domain_id = powerflex_protection_domain.pd.id + ip_list = [ + { + ip = "10.10.10.1" + role = "all" + } + ] + depends_on = [powerflex_protection_domain.pd] +} + +resource "powerflex_sds" "sds2" { + name = "sds_2" + protection_domain_id = powerflex_protection_domain.pd.id + ip_list = [ + { + ip = "10.10.10.2" + role = "all" + } + ] + depends_on = [powerflex_protection_domain.pd] +} + +resource "powerflex_sds" "sds3" { + name = "sds_3" + protection_domain_id = powerflex_protection_domain.pd.id + ip_list = [ + { + ip = "10.10.10.3" + role = "all" + } + ] + depends_on = [powerflex_protection_domain.pd] +} + +resource "powerflex_storage_pool" "sp" { + name = "SP" + protection_domain_id = powerflex_protection_domain.pd.id + media_type = "HDD" + use_rmcache = true + use_rfcache = true +} + +resource "powerflex_device" "device1" { + name = "device1" + device_path = "/dev/sdb" + sds_id = powerflex_sds.sds1.id + storage_pool_id = powerflex_storage_pool.sp.id + media_type = "HDD" + external_acceleration_type = "ReadAndWrite" + depends_on = [powerflex_storage_pool.sp] +} + +resource "powerflex_device" "device2" { + name = "device2" + device_path = "/dev/sdb" + sds_id = powerflex_sds.sds2.id + storage_pool_id = powerflex_storage_pool.sp.id + media_type = "HDD" + external_acceleration_type = "ReadAndWrite" + depends_on = [powerflex_storage_pool.sp] +} + +resource "powerflex_device" "device3" { + name = "device3" + device_path = "/dev/sdb" + sds_id = powerflex_sds.sds3.id + storage_pool_id = powerflex_storage_pool.sp.id + media_type = "HDD" + external_acceleration_type = "ReadAndWrite" + depends_on = [powerflex_storage_pool.sp] +} + +resource "powerflex_volume" "volume" { + name = "volume1" + protection_domain_id = powerflex_protection_domain.pd.id + storage_pool_id = powerflex_storage_pool.sp.id + size = 16 + volume_type = "ThinProvisioned" + depends_on = [powerflex_device.device1, powerflex_device.device2, powerflex_device.device3] +} + +resource "powerflex_sdc_volumes_mapping" "map" { + id = "e3d105e900000005" + volume_list = [ + { + volume_id = powerflex_volume.volume.id + limit_iops = 140 + limit_bw_in_mbps = 19 + access_mode = "ReadOnly" + }, + ] + depends_on = [powerflex_volume.volume] +} + +resource "powerflex_package" "upload-test" { + file_path = ["/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-lia-3.6-700.103.el7.x86_64.rpm", + "/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-mdm-3.6-700.103.el7.x86_64.rpm", + "/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-sds-3.6-700.103.el7.x86_64.rpm", + "/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-sdc-3.6-700.103.el7.x86_64.rpm", + "/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-sdr-3.6-700.103.el7.x86_64.rpm"] +} + +resource "powerflex_user" "user" { + name = "NewUser" + role = "Monitor" + password = "Password123" +} ``` variables.tf diff --git a/docs/resources/cluster.md b/docs/resources/cluster.md index dd986e79..fbf38ce1 100644 --- a/docs/resources/cluster.md +++ b/docs/resources/cluster.md @@ -19,13 +19,24 @@ linkTitle: "powerflex_cluster" page_title: "powerflex_cluster Resource - powerflex" subcategory: "" description: |- - This resource can be used to install the PowerFlex Cluster. + This terraform resource is used to deploy PowerFlex Cluster. We can Create and Delete the PowerFlex Cluster using this resource. We can also Import an existing Cluster of PowerFlex. --- # powerflex_cluster (Resource) -This resource can be used to install the PowerFlex Cluster. +This terraform resource is used to deploy PowerFlex Cluster. We can Create and Delete the PowerFlex Cluster using this resource. We can also Import an existing Cluster of PowerFlex. +> **Note:** Gateway server should be installed. + +> **Note:** Support is provided for creating, importing, and deleting operations for this resource. + +> **Note:** If during installation using a Gateway on one server, all binaries are successfully installed, but another server encounters issues during installation, there won't be any rollback function for the server where the installation was successful. + +> **Note:** If any SDR, SDS, or SDC is installed separately and connected to the cluster, during the destroy process, if you encounter any security certificate issues, you will need to resolve them manually by accepting the security certificate. + +> **Note:** During the destroy process, the entire cluster will be destroyed, not just specific individual resources. + +> **Note:** To follow the installation process, you can refer to the [Deployment Guide](https://www.dell.com/support/manuals/en-us/scaleio/pfx_deploy_guide_3.6.x/deploy-powerflex?guid=guid-e9f70972-baac-42c9-9ff9-a3d2b0722f54&lang=en-us) ## Example Usage @@ -52,72 +63,109 @@ limitations under the License. # To perform Cluster Installation resource "powerflex_cluster" "test" { - mdm_password = "Password" - lia_password= "Password" - allow_non_secure_communication_with_lia= false - allow_non_secure_communication_with_mdm= false - disable_non_mgmt_components_auth= false - cluster = [ - { - ips= "10.10.10.1", - username= "root", - password= "Password", - operating_system= "linux", - is_mdm_or_tb= "primary", - is_sds= "yes", - sds_name= "sds1", - is_sdc= "yes", - sdc_name= "sdc1", - protection_domain = "domain_1" - sds_storage_device_list = "/dev/sdb" - storage_pool_list = "pool1" - perf_profile_for_sdc= "High", - ia_rfcache= "No", - is_sdr= "Yes", - sdr_all_ips = "10.10.20.1" - }, - { - ips= "10.10.10.2", - username= "root", - password= "Password", - operating_system= "linux", - is_mdm_or_tb= "Secondary", - protection_domain = "domain_1" - sds_storage_device_list = "/dev/sdb" - storage_pool_list = "pool1" - is_sds= "yes", - sds_name= "sds2", - is_sdc= "yes", - sdc_name= "sdc2", - perf_profile_for_sdc= "compact", - ia_rfcache= "No", - is_sdr= "No", - }, - { - ips= "10.10.10.3", - username= "root", - password= "Password", - operating_system= "linux", - is_mdm_or_tb= "TB", - is_sds= "No", - is_sdc= "yes", - sdc_name= "sdc3", - perf_profile_for_sdc= "compact", - ia_rfcache= "No", - is_sdr= "No", - }, - ] - storage_pools = [ - { - media_type = "HDD" - protection_domain = "domain_1" - storage_pool = "pool1" - replication_journal_capacity_percentage = "50" - } - ] + + # Security Related Field + mdm_password = "Password" + lia_password = "Password" + + # Advance Security Configuration + allow_non_secure_communication_with_lia = false + allow_non_secure_communication_with_mdm = false + disable_non_mgmt_components_auth = false + + # Cluster Configuration related fields + cluster = [ + { + # MDM Configuration Fields + ips = "10.10.10.1", + username = "root", + password = "Password", + operating_system = "linux", + is_mdm_or_tb = "primary", + mdm_ips = "10.10.10.1", + mdm_mgmt_ip = "10.10.10.1", + mdm_name = "MDM_1", + perf_profile_for_mdm = "HighPerformance", + virtual_ips = "10.30.30.1", + virtual_ip_nics = "ens192", + + # SDS Configuration Fields + is_sds = "yes", + sds_name = "sds1", + sds_all_ips = "10.20.20.3", # conflict with sds_to_sds_only_ips,sds_to_sdc_only_ips + # sds_to_sdc_only_ips = "10.20.20.2", + # sds_to_sds_only_ips = "10.20.20.1", + fault_set = "fs1", + protection_domain = "domain_1" + sds_storage_device_list = "/dev/sdb" + sds_storage_device_names = "device1" + storage_pool_list = "pool1" + perf_profile_for_sds = "HighPerformance" + + # SDC Configuration Fields + is_sdc = "yes", + sdc_name = "sdc1", + perf_profile_for_sdc = "HighPerformance", + + # Rfcache Configuration Fields + is_rfcache = "No", + rf_cache_ssd_device_list = "/dev/sdd" + + # SDR Configuration Fields + is_sdr = "Yes", + sdr_name = "SDR_1" + sdr_port = "2000" + # sdr_application_ips = "10.20.30.1" + # sdr_storage_ips = "10.20.30.2" + # sdr_external_ips = "10.20.30.3" + sdr_all_ips = "10.10.20.1" # conflict with sdr_application_ips, sdr_storage_ips, sdr_external_ips + perf_profile_for_sdr = "Compact" + }, + { + ips = "10.10.10.2", + username = "root", + password = "Password", + operating_system = "linux", + is_mdm_or_tb = "Secondary", + protection_domain = "domain_1" + sds_storage_device_list = "/dev/sdb" + storage_pool_list = "pool1" + is_sds = "yes", + sds_name = "sds2", + is_sdc = "yes", + sdc_name = "sdc2", + perf_profile_for_sdc = "compact", + is_rfcache = "No", + is_sdr = "No", + }, + { + ips = "10.10.10.3", + username = "root", + password = "Password", + operating_system = "linux", + is_mdm_or_tb = "TB", + is_sds = "No", + is_sdc = "yes", + sdc_name = "sdc3", + perf_profile_for_sdc = "compact", + is_rfcache = "No", + is_sdr = "No", + }, + ] + # Storage Pool Configuration Fields + storage_pools = [ + { + media_type = "HDD" + protection_domain = "domain_1" + storage_pool = "pool1" + replication_journal_capacity_percentage = "50" + } + ] } ``` +After the execution of above resource block, Cluster would have been created on the PowerFlex array. For more information, Please check the terraform state file. + ## Schema @@ -302,12 +350,19 @@ Read-Only: Import is supported using the following syntax: ```shell -# Below are the steps to import Cluster : -# Step 1 - To import a Cluster , we need the MDM IP, MDM Password, LIA Password of that Cluster -# Step 2 - create a tf file with empty resource block . Refer the example below. -# Example : -# resource "powerflex_cluster" "resource_block_name" { -# } -# Step 3 - execute the command : terraform init && terraform import "powerflex_cluster.resource_block_name" "MDM_IP,MDM_Password,LIA_Password" (resource_block_name must be taken from 2) -# Step 4 - After successful execution of the command , check the state file +# /* +# Copyright (c) 2023 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. +# */ + +# import existing cluster +terraform import powerflex_cluster.cluster_data ",," ``` \ No newline at end of file diff --git a/docs/resources/device.md b/docs/resources/device.md index 2b0c85a0..8ebe5784 100644 --- a/docs/resources/device.md +++ b/docs/resources/device.md @@ -19,18 +19,22 @@ linkTitle: "powerflex_device" page_title: "powerflex_device Resource - powerflex" subcategory: "" description: |- - This resource can be used to manage devices on a PowerFlex array. + This resource is used to manage the Device entity of PowerFlex Array. We can Create, Update and Delete the PowerFlex Devices using this resource. We can also import an existing device from PowerFlex array. --- # powerflex_device (Resource) -This resource can be used to manage devices on a PowerFlex array. +This resource is used to manage the Device entity of PowerFlex Array. We can Create, Update and Delete the PowerFlex Devices using this resource. We can also import an existing device from PowerFlex array. -!> **Caution:** Device creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. +> **Caution:** Device creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. One can manually remove the taint and try applying the configuration (after making necessary adjustments). If the taint is not removed, terraform will destroy and recreate the resource. -~> **Note:** Exactly one of `storage_pool_name` and `storage_pool_id` is required. Exactly one of `sds_name` and `sds_id` is required. +> **Note:** Exactly one of `storage_pool_name` and `storage_pool_id` is required. Not both can be provided together. + +> **Note:** Exactly one of `sds_name` and `sds_id` is required. Not both can be provided together. + +> **Note:** If `storage_pool_name` is mentioned, we have to specify `protection_domain_id` or `protection_domain_name`. ## Example Usage @@ -53,10 +57,6 @@ limitations under the License. */ # Command to run this tf file : terraform init && terraform plan && terraform apply. -# Create, Update, Read, Delete and Import operations are supported for this resource. -# To add device, device_path is mandatory along with storage_pool_name/storage_pool_id and sds_name/sds_id. -# Along with storage_pool_name, we have to specify protection_domain_id or protection_domain_name. -# To check which attributes of the device resource can be updated, please refer Product Guide in the documentation resource "powerflex_device" "test-device" { device_path = "/dev/sdc" @@ -67,6 +67,8 @@ resource "powerflex_device" "test-device" { } ``` +After the execution of above resource block, device would have been created on the PowerFlex array. For more information, Please check the terraform state file. + ## Schema @@ -99,13 +101,19 @@ resource "powerflex_device" "test-device" { Import is supported using the following syntax: ```shell -# Below are the steps to import device : -# Step 1 - To import a device , we need the id of that device -# Step 2 - To check the id of the device we can make use of device datasource . Please refer device_datasource.tf for more info. -# Step 3 - create a tf file with empty resource block . Refer the example below. -# Example : -# resource "powerflex_device" "resource_block_name" { -# } -# Step 4 - execute the command: terraform import "powerflex_device.resource_block_name" "id_of_the_device" (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 +# /* +# Copyright (c) 2023 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. +# */ + +# import Protection Device by it's id +terraform import powerflex_device.device_data "" ``` \ No newline at end of file diff --git a/docs/resources/mdm_cluster.md b/docs/resources/mdm_cluster.md index 016d7666..4c089094 100644 --- a/docs/resources/mdm_cluster.md +++ b/docs/resources/mdm_cluster.md @@ -19,18 +19,18 @@ linkTitle: "powerflex_mdm_cluster" page_title: "powerflex_mdm_cluster Resource - powerflex" subcategory: "" description: |- - This resource can be used to manage MDM cluster on a PowerFlex array. + This resource can be used to manage MDM cluster on a PowerFlex array. Supports adding or removing standby MDMs, migrate from 3-node to 5-node cluster or vice-versa, changing MDM ownership, changing performance profile, and renaming MDMs. --- # powerflex_mdm_cluster (Resource) -This resource can be used to manage MDM cluster on a PowerFlex array. +This resource can be used to manage MDM cluster on a PowerFlex array. Supports adding or removing standby MDMs, migrate from 3-node to 5-node cluster or vice-versa, changing MDM ownership, changing performance profile, and renaming MDMs. -!> **Caution:** MDM cluster creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. +> **Caution:** MDM cluster creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. One can manually remove the taint and try applying the configuration (after making necessary adjustments). If the taint is not removed, terraform will destroy and recreate the resource. -~> **Note:** Use of MDM cluster resource requires the presence of the MDM cluster. +> **Note:** Use of MDM cluster resource requires the presence of the MDM cluster. The purpose of this resource is to update MDM cluster, not create or delete. Import operation is not supported for MDM cluster. ## Example Usage @@ -55,15 +55,15 @@ limitations under the License. # Command to run this tf file : terraform init && terraform plan && terraform apply. # Create, Update, Read, and Delete operations are supported for this resource. # For this resource, primary_mdm, secondary_mdm, tiebreaker_mdm and cluster_mode are mandatory parameters. +# While specifying primary_mdm, secondary_mdm and tiebreaker_mdm, id or ips is mandatory. # For adding standby mdm, ips and role parameters are mandatory. -# To check which attributes of the device resource can be updated, please refer Product Guide in the documentation +# To check which attributes of the MDM cluster resource can be updated, please refer Product Guide in the documentation -# Example for adding standby MDMs +# Example for adding standby MDMs. Before adding standby MDMs, MDM package must be installed on VM with respective role. resource "powerflex_mdm_cluster" "test-mdm-cluster" { cluster_mode = "ThreeNodes" primary_mdm = { id = "7f328d0b71711801" - } secondary_mdm = [{ id = "10912d8a5d412800" @@ -83,16 +83,39 @@ resource "powerflex_mdm_cluster" "test-mdm-cluster" { ] } -# Example for switching cluster mode to 5 nodes +# Example for changing MDM ownership. In this case, the id of the primary and secondary MDM will be swapped. resource "powerflex_mdm_cluster" "test-mdm-cluster" { - cluster_mode = "FiveNodes" + cluster_mode = "ThreeNodes" primary_mdm = { + id = "10912d8a5d412800" + } + secondary_mdm = [{ id = "7f328d0b71711801" + }] + tiebreaker_mdm = [{ + id = "0e4f0a2f5978ae02" + }] + standby_mdm = [ + { + ips = ["10.xxx.xx.xxx"] + role = "Manager" + }, + { + ips = ["10.yyy.yy.yyy"] + role = "TieBreaker" + }, + ] +} +# Example for switching cluster mode to 5 nodes from 3 nodes. The cluster mode will be FiveNodes. Previously added standby MDMs will be added as Secondary/TieBreaker MDM. +resource "powerflex_mdm_cluster" "test-mdm-cluster" { + cluster_mode = "FiveNodes" + primary_mdm = { + id = "10912d8a5d412800" } secondary_mdm = [ { - id = "10912d8a5d412800" + id = "7f328d0b71711801" }, { ips = ["10.xxx.xx.xxx"] @@ -111,8 +134,57 @@ resource "powerflex_mdm_cluster" "test-mdm-cluster" { standby_mdm = [ ] } + +# Example for switching cluster mode to 3 nodes from 5 nodes. The cluster mode will be ThreeNodes. One of the active Secondary/TieBreaker MDM will be moved to standby MDMs. +resource "powerflex_mdm_cluster" "test-mdm-cluster" { + cluster_mode = "ThreeNodes" + primary_mdm = { + id = "10912d8a5d412800" + } + secondary_mdm = [ + { + id = "7f328d0b71711801" + } + ] + tiebreaker_mdm = [ + { + id = "0e4f0a2f5978ae02" + } + ] + standby_mdm = [ + { + ips = ["10.xxx.xx.xxx"] + role = "Manager" + }, + { + ips = ["10.yyy.yy.yyy"] + role = "TieBreaker" + }, + ] +} + +# Example for removing standby MDMs. In this case, standby_mdm will be empty list. +resource "powerflex_mdm_cluster" "test-mdm-cluster" { + cluster_mode = "ThreeNodes" + primary_mdm = { + id = "10912d8a5d412800" + } + secondary_mdm = [ + { + id = "7f328d0b71711801" + } + ] + tiebreaker_mdm = [ + { + id = "0e4f0a2f5978ae02" + } + ] + standby_mdm = [] +} ``` +After the execution of the above resource block, the MDM cluster would become a 3-node cluster. For more information, please check the state file. + ## Schema @@ -190,7 +262,7 @@ Optional: - `allow_asymmetric_ips` (Boolean) Allow the added MDM to have a different number of IPs from the primary MDM. Cannot be updated. - `management_ips` (Set of String) The management ips of the standby MDM. Cannot be updated. - `name` (String) Name of the the standby MDM. -- `port` (Number) Port of the standby MDM. +- `port` (Number) Port of the standby MDM. Cannot be updated. Read-Only: diff --git a/docs/resources/package.md b/docs/resources/package.md index 0c5e98da..55c310c8 100644 --- a/docs/resources/package.md +++ b/docs/resources/package.md @@ -19,12 +19,12 @@ linkTitle: "powerflex_package" page_title: "powerflex_package Resource - powerflex" subcategory: "" description: |- - This resource can be used to upload packages on a PowerFlex Gateway. + This resource can be used to upload packages on a PowerFlex Gateway.We can add or remove packages from PowerFlex Gateway. Import functionality is not supported. --- # powerflex_package (Resource) -This resource can be used to upload packages on a PowerFlex Gateway. +This resource can be used to upload packages on a PowerFlex Gateway.We can add or remove packages from PowerFlex Gateway. Import functionality is not supported. ## Example Usage @@ -48,14 +48,16 @@ limitations under the License. */ resource "powerflex_package" "upload-test" { - file_path = ["/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-lia-3.6-700.103.el7.x86_64.rpm", - "/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-mdm-3.6-700.103.el7.x86_64.rpm", - "/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-sds-3.6-700.103.el7.x86_64.rpm", - "/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-sdc-3.6-700.103.el7.x86_64.rpm", - "/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-sdr-3.6-700.103.el7.x86_64.rpm"] + file_path = ["/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-lia-3.6-700.103.el7.x86_64.rpm", + "/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-mdm-3.6-700.103.el7.x86_64.rpm", + "/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-sds-3.6-700.103.el7.x86_64.rpm", + "/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-sdc-3.6-700.103.el7.x86_64.rpm", + "/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-sdr-3.6-700.103.el7.x86_64.rpm"] } ``` +After the execution of above resource block, package would have been uploaded on the PowerFlex Gateway. For more information, Please check the terraform state file. + ## Schema diff --git a/docs/resources/protection_domain.md b/docs/resources/protection_domain.md index 417b982d..0c80f9cb 100644 --- a/docs/resources/protection_domain.md +++ b/docs/resources/protection_domain.md @@ -19,14 +19,14 @@ linkTitle: "powerflex_protection_domain" page_title: "powerflex_protection_domain Resource - powerflex" subcategory: "" description: |- - This resource can be used to manage protection domains on a PowerFlex array. + This resource is used to manage the Protection Domain entity of PowerFlex Array. We can Create, Update and Delete the protection domain using this resource. We can also import an existing protection domain from PowerFlex array. --- # powerflex_protection_domain (Resource) -This resource can be used to manage protection domains on a PowerFlex array. +This resource is used to manage the Protection Domain entity of PowerFlex Array. We can Create, Update and Delete the protection domain using this resource. We can also import an existing protection domain from PowerFlex array. -!> **Caution:** Protection Domain creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. +> **Caution:** Protection Domain creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. One can manually remove the taint and try applying the configuration (after making necessary adjustments). If the taint is not removed, terraform will destroy and recreate the resource. @@ -80,6 +80,8 @@ resource "powerflex_protection_domain" "pd" { } ``` +After the execution of above resource block, protection domain would have been created on the PowerFlex array. For more information, Please check the terraform state file. + ## Schema @@ -124,9 +126,19 @@ Read-Only: Import is supported using the following syntax: ```shell -# The command is -# terraform import powerflex_protection_domain.pd -# Example: -terraform import powerflex_protection_domain.pd 202b3d0300000004 -# after running this command, populate the name field in the config file to start managing this resource +# /* +# Copyright (c) 2023 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. +# */ + +# import Protection Domain by it's id +terraform import powerflex_protection_domain.pd_data "" ``` \ No newline at end of file diff --git a/docs/resources/sdc.md b/docs/resources/sdc.md index fb0ffc7c..b1b724d3 100644 --- a/docs/resources/sdc.md +++ b/docs/resources/sdc.md @@ -19,12 +19,12 @@ linkTitle: "powerflex_sdc" page_title: "powerflex_sdc Resource - powerflex" subcategory: "" description: |- - This resource can be used to Manage the SDC in PowerFlex Cluster. + This terraform resource is used to manage the SDC entity of PowerFlex Array. We can Create, Update and Delete the PowerFlex SDC using this resource. We can also Import an existing SDC from PowerFlex array. --- # powerflex_sdc (Resource) -This resource can be used to Manage the SDC in PowerFlex Cluster. +This terraform resource is used to manage the SDC entity of PowerFlex Array. We can Create, Update and Delete the PowerFlex SDC using this resource. We can also Import an existing SDC from PowerFlex array. ## Example Usage @@ -101,13 +101,10 @@ resource "powerflex_sdc" "expansion" { }, ] } - -# For Import Multiple SDC -resource "powerflex_sdc" "importing" { -} -#terraform import powerflex_sdc.importing ID1,ID2,ID3 ``` +After the execution of above resource block, sdc would have been created on the PowerFlex array. For more information, Please check the terraform state file. + ## Schema @@ -149,13 +146,22 @@ Read-Only: Import is supported using the following syntax: ```shell -# Below are the steps to import SDC : -# 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" "resource_block_name" { -# } -# Step 4 - execute the command : terraform init && terraform import "powerflex_sdc.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 +# /* +# Copyright (c) 2023 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. +# */ + +# import SDC by it's id +terraform import powerflex_sdc.sdc_data "" + +# import SDC by multiple id +terraform import powerflex_sdc.sdc_data ",," ``` \ No newline at end of file diff --git a/docs/resources/sdc_volumes_mapping.md b/docs/resources/sdc_volumes_mapping.md index b8984c37..7b05c977 100644 --- a/docs/resources/sdc_volumes_mapping.md +++ b/docs/resources/sdc_volumes_mapping.md @@ -19,18 +19,20 @@ linkTitle: "powerflex_sdc_volumes_mapping" page_title: "powerflex_sdc_volumes_mapping Resource - powerflex" subcategory: "" description: |- - This resource can be used to manage mapping of volumes to an SDC on a PowerFlex array. + This resource can be used to map/unmap volumes to an SDC on a PowerFlex array. User can even import an existing SDC and map volumes to it. --- # powerflex_sdc_volumes_mapping (Resource) -This resource can be used to manage mapping of volumes to an SDC on a PowerFlex array. +This resource can be used to map/unmap volumes to an SDC on a PowerFlex array. User can even import an existing SDC and map volumes to it. -!> **Caution:** SDC Volume mapping creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. +> **Caution:** SDC Volume mapping creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. One can manually remove the taint and try applying the configuration (after making necessary adjustments). If the taint is not removed, terraform will destroy and recreate the resource. -~> **Note:** Exactly one of `id` and `name` is required. Exactly one of `volume_id` and `volume_name` is required. +> **Note:** Exactly one of `id` or `name` is required. Not both can be provided together. + +> **Note:** Exactly one of `volume_id` or `volume_name` is required. Not both can be provided together. ## Example Usage @@ -60,13 +62,21 @@ limitations under the License. # 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" { + # SDC id id = "e3ce1fb600000001" volume_list = [ { - volume_id = "edb2059700000002" - limit_iops = 140 + # id of the volume which needs to be mapped. + # either volume_id or volume_name can be used. + volume_id = "edb2059700000002" + + # Valid values are 0 or integers greater than 10 + limit_iops = 140 + + # Default value is 0 limit_bw_in_mbps = 19 - access_mode = "ReadOnly" + + access_mode = "ReadOnly" # ReadOnly/ReadWrite/NoAccess }, { volume_name = "terraform-vol" @@ -79,12 +89,14 @@ resource "powerflex_sdc_volumes_mapping" "mapping-test" { # To unmap all the volumes mapped to SDC, below config can be used. -resource "powerflex_sdc_volumes_mapping" "mapping-test" { - id = "e3ce1fb600000001" - volume_list = [] -} +# resource "powerflex_sdc_volumes_mapping" "mapping-test" { +# id = "e3ce1fb600000001" +# volume_list = [] +# } ``` +After the execution of above resource block, two volumes would have been mapped to SDC on the PowerFlex array. For more information, Please check the terraform state file + ## Schema @@ -119,4 +131,20 @@ Import is supported using the following syntax: # } # 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. + +# /* +# Copyright (c) 2023 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. +# */ + +# import using SDC id +terraform import powerflex_sdc_volumes_mapping.sdc_mapping_import_by_id "" ``` \ No newline at end of file diff --git a/docs/resources/sds.md b/docs/resources/sds.md index 79ca2eb4..db716341 100644 --- a/docs/resources/sds.md +++ b/docs/resources/sds.md @@ -19,19 +19,19 @@ linkTitle: "powerflex_sds" page_title: "powerflex_sds Resource - powerflex" subcategory: "" description: |- - This resource can be used to manage Storage Data Servers on a PowerFlex array. + This resource is used to manage the Storage Data Servers entity of PowerFlex Array. We can Create, Update and Delete the SDS using this resource. We can also import an existing SDS from PowerFlex array. --- # powerflex_sds (Resource) -This resource can be used to manage Storage Data Servers on a PowerFlex array. +This resource is used to manage the Storage Data Servers entity of PowerFlex Array. We can Create, Update and Delete the SDS using this resource. We can also import an existing SDS from PowerFlex array. -~> **Note:** Exactly one of `protection_domain_name` and `protection_domain_id` is required. - -!> **Caution:** SDS creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. +> **Caution:** SDS creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. One can manually remove the taint and try applying the configuration (after making necessary adjustments). If the taint is not removed, terraform will destroy and recreate the resource. +> **Note:** Exactly one of `protection_domain_name` and `protection_domain_id` is required. + ## Example Usage ```terraform @@ -80,6 +80,8 @@ output "changed_sds" { } ``` +After the execution of above resource block, sds would have been created on the PowerFlex array. For more information, Please check the terraform state file. + ## Schema @@ -124,13 +126,19 @@ Required: Import is supported using the following syntax: ```shell -# Below are the steps to import SDS : -# Step 1 - To import a sds , we need the id of that sds -# Step 2 - To check the id of the sds we can make use of sds datasource . Please refer sds_datasource.tf for more info. -# Step 3 - create a tf file with empty resource block . Refer the example below. -# Example : -# resource "powerflex_sds" "resource_block_name" { -# } -# Step 4 - execute the command: terraform import "powerflex_sds.resource_block_name" "id_of_the_sds" (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 +# /* +# Copyright (c) 2023 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. +# */ + +# import SDS by it's id +terraform import powerflex_sds.sds_data "" ``` \ No newline at end of file diff --git a/docs/resources/snapshot.md b/docs/resources/snapshot.md index 7d30c29d..7a4277c6 100644 --- a/docs/resources/snapshot.md +++ b/docs/resources/snapshot.md @@ -19,18 +19,18 @@ linkTitle: "powerflex_snapshot" page_title: "powerflex_snapshot Resource - powerflex" subcategory: "" description: |- - This resource can be used to manage snapshots of volumes on a PowerFlex array. + This resource is used to manage the Snapshot of volumes on PowerFlex Array. We can Create, Update and Delete the snapshots using this resource. We can also import an existing snapshot from PowerFlex array. --- # powerflex_snapshot (Resource) -This resource can be used to manage snapshots of volumes on a PowerFlex array. +This resource is used to manage the Snapshot of volumes on PowerFlex Array. We can Create, Update and Delete the snapshots using this resource. We can also import an existing snapshot from PowerFlex array. -!> **Caution:** Snapshot creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. +> **Caution:** Snapshot creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. One can manually remove the taint and try applying the configuration (after making necessary adjustments). If the taint is not removed, terraform will destroy and recreate the resource. -~> **Note:** Exactly one of `volume_name` and `volume_id` is required. +> **Note:** Exactly one of `volume_name` and `volume_id` is required. In case of partial create/update operation, retention will not be set. ## Example Usage @@ -90,6 +90,8 @@ resource "powerflex_snapshot" "snapshots-create-01" { # } ``` +After the execution of above resource block, snapshot would have been created on the PowerFlex array. For more information, Please check the terraform state file. + ## Schema @@ -120,12 +122,19 @@ resource "powerflex_snapshot" "snapshots-create-01" { Import is supported using the following syntax: ```shell -# Below are the steps to import snapshot : -# Step 1 - To import a snapshot , we need the id of that snapshot -# Step 2 - create a tf file with empty resource block . Refer the example below. -# Example : -# resource "powerflex_snapshot" "resource_block_name" { -# } -# Step 3 - execute the command: terraform import "powerflex_snapshot.resource_block_name" "id_of_the_snapshot" (resource_block_name must be taken from step 2) -# Step 4 - After successful execution of the command , check the state file +# /* +# Copyright (c) 2023 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. +# */ + +# import Snapshot by it's id +terraform import powerflex_snapshot.ss_data "" ``` \ No newline at end of file diff --git a/docs/resources/storage_pool.md b/docs/resources/storage_pool.md index 157ff19a..9887f4f6 100644 --- a/docs/resources/storage_pool.md +++ b/docs/resources/storage_pool.md @@ -19,18 +19,18 @@ linkTitle: "powerflex_storage_pool" page_title: "powerflex_storage_pool Resource - powerflex" subcategory: "" description: |- - This resource can be used to manage Storage Pools on a PowerFlex array. + This resource is used to manage the Storage Pool entity of PowerFlex Array. We can Create, Update and Delete the storage pool using this resource. We can also import an existing storage pool from PowerFlex array. --- # powerflex_storage_pool (Resource) -This resource can be used to manage Storage Pools on a PowerFlex array. +This resource is used to manage the Storage Pool entity of PowerFlex Array. We can Create, Update and Delete the storage pool using this resource. We can also import an existing storage pool from PowerFlex array. -!> **Caution:** Storage Pool creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. +> **Caution:** Storage Pool creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. One can manually remove the taint and try applying the configuration (after making necessary adjustments). If the taint is not removed, terraform will destroy and recreate the resource. -~> **Note:** Exactly one of `protection_domain_name` and `protection_domain_id` is required. +> **Note:** Exactly one of `protection_domain_name` or `protection_domain_id` is required. Not both can be provided together. ## Example Usage @@ -61,31 +61,49 @@ limitations under the License. # To check which attributes of the storage pool can be updated, please refer Product Guide in the documentation resource "powerflex_storage_pool" "sp" { - name = "storagepool3" - #protection_domain_id = "202a046600000000" - protection_domain_name = "domain1" - media_type = "HDD" - use_rmcache = false - use_rfcache = true - #replication_journal_capacity = 34 - capacity_alert_high_threshold = 66 - capacity_alert_critical_threshold = 77 - zero_padding_enabled = false + name = "newstoragepool" + protection_domain_name = "domain1" + media_type = "HDD" + use_rmcache = false + use_rfcache = true + replication_journal_capacity = 34 + zero_padding_enabled = false + rebalance_enabled = false + + # Alert Thresholds + # Critical threshold must be greater than high threshold + capacity_alert_high_threshold = 66 + capacity_alert_critical_threshold = 77 + + # Protected Maintenance Mode Parameters + # When the policy is set to "favorAppIos", then concurrent IOs and bandwidth limit can be set. + # When the policy is set to "limitNumOfConcurrentIos", then only concurrent IOs can be set. + # When the policy is set to "unlimited", then concurrent IOs and bandwidth limit can't be set. protected_maintenance_mode_io_priority_policy = "favorAppIos" protected_maintenance_mode_num_of_concurrent_ios_per_device = 7 protected_maintenance_mode_bw_limit_per_device_in_kbps = 1028 - rebalance_enabled = false - rebalance_io_priority_policy = "favorAppIos" - rebalance_num_of_concurrent_ios_per_device = 7 - rebalance_bw_limit_per_device_in_kbps = 1032 - vtree_migration_io_priority_policy = "favorAppIos" - vtree_migration_num_of_concurrent_ios_per_device = 7 - vtree_migration_bw_limit_per_device_in_kbps = 1030 - spare_percentage = 66 - rm_cache_write_handling_mode = "Passthrough" - rebuild_enabled = true - rebuild_rebalance_parallelism = 5 - fragmentation = false + + # Rebalance Parameters + # When the policy is set to "favorAppIos", then concurrent IOs and bandwidth limit can be set. + # When the policy is set to "limitNumOfConcurrentIos", then only concurrent IOs can be set. + # When the policy is set to "unlimited", then concurrent IOs and bandwidth limit can't be set. + rebalance_io_priority_policy = "favorAppIos" + rebalance_num_of_concurrent_ios_per_device = 7 + rebalance_bw_limit_per_device_in_kbps = 1032 + + #VTree Migration Parameters + # When the policy is set to "favorAppIos", then concurrent IOs and bandwidth limit can be set. + # When the policy is set to "limitNumOfConcurrentIos", then only concurrent IOs can be set. + vtree_migration_io_priority_policy = "favorAppIos" + vtree_migration_num_of_concurrent_ios_per_device = 7 + vtree_migration_bw_limit_per_device_in_kbps = 1030 + + + spare_percentage = 66 + rm_cache_write_handling_mode = "Passthrough" + rebuild_enabled = true + rebuild_rebalance_parallelism = 5 + fragmentation = false } output "created_storagepool" { @@ -93,6 +111,8 @@ output "created_storagepool" { } ``` +After the execution of above resource block, storage pool would have been created on the PowerFlex array. For more information, Please check the terraform state file. + ## Schema @@ -117,7 +137,7 @@ output "created_storagepool" { - `rebalance_num_of_concurrent_ios_per_device` (Number) The maximum number of concurrent rebalance I/Os per device - `rebuild_enabled` (Boolean) Enable or disable rebuilds in the specified Storage Pool - `rebuild_rebalance_parallelism` (Number) Maximum number of concurrent rebuild and rebalance activities on SDSs in the Storage Pool -- `replication_journal_capacity` (Number) This defines the maximum percentage of Storage Pool capacity that can be used by replication for the journal. +- `replication_journal_capacity` (Number) This defines the maximum percentage of Storage Pool capacity that can be used by replication for the journal. Before deleting the storage pool, this has to be set to 0. - `rm_cache_write_handling_mode` (String) Sets the Read RAM Cache write handling mode of the specified Storage Pool - `spare_percentage` (Number) Sets the spare capacity reservation policy - `use_rfcache` (Boolean) Enable/Disable RFcache on a specific storage pool @@ -136,13 +156,19 @@ output "created_storagepool" { Import is supported using the following syntax: ```shell -# Below are the steps to import storage pool : -# Step 1 - To import a storage pool , we need the id of that storage pool -# Step 2 - To check the id of the storage pool we can make use of storage pool datasource . Please refer storagepool_datasource.tf for more info. -# Step 3 - create a tf file with empty resource block . Refer the example below. -# Example : -# resource "powerflex_storage_pool" "resource_block_name" { -# } -# Step 4 - execute the command: terraform import "powerflex_storage_pool.resource_block_name" "id_of_the_storage_pool" (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 +# /* +# Copyright (c) 2023 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. +# */ + +# import storage pool by it's id +terraform import powerflex_storage_pool.storage_pool_import_by_id "" ``` \ No newline at end of file diff --git a/docs/resources/user.md b/docs/resources/user.md index 06de56e4..237bfe8e 100644 --- a/docs/resources/user.md +++ b/docs/resources/user.md @@ -19,13 +19,12 @@ linkTitle: "powerflex_user" page_title: "powerflex_user Resource - powerflex" subcategory: "" description: |- - This resource can be used to manage user on a PowerFlex array. + This resource is used to manage the User entity of PowerFlex Array. We can Create, Update and Delete the user using this resource. We can also import an existing user from PowerFlex array.However, password cannot be updated using this resource. --- # powerflex_user (Resource) -This resource can be used to manage user on a PowerFlex array. - +This resource is used to manage the User entity of PowerFlex Array. We can Create, Update and Delete the user using this resource. We can also import an existing user from PowerFlex array.However, password cannot be updated using this resource. ## Example Usage @@ -50,15 +49,18 @@ limitations under the License. # terraform init && terraform plan && terraform apply # Create, Update, Delete is supported for this resource # Import is supported. -# name, role and password is the required parameter to create or update resource "powerflex_user" "newUser" { - name = "StorageAdmin" - role = "Monitor" + + # name, role and password is the required parameter to create or update. Only role can be updated. + name = "StorageAdmin" + role = "Monitor" password = "Password" } ``` +After the execution of above resource block, new user would have been created on the PowerFlex array. For more information, Please check the terraform state file. + ## Schema @@ -78,13 +80,25 @@ resource "powerflex_user" "newUser" { Import is supported using the following syntax: ```shell -# Below are the steps to import a user : -# Step 1 - To import a user , we either need id or username of that user -# Step 3 - create a tf file with empty resource block . Refer the example below. -# Example : -# resource "powerflex_user" "resource_block_name" { -# } -# Step 4 - execute the command: terraform import "powerflex_user.resource_block_name" "name:userName" (where userName is the name of the user which you wanna import) -# 2nd approach to import the user is using the id. The import command to import using the id is : terraform import "powerflex_user.resource_block_name" "id:userId" OR terraform import "powerflex_user.resource_block_name" "userId" -# Step 5 - After successful execution of the command , check the state file +# /* +# Copyright (c) 2023 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. +# */ + +# import user by it's id +terraform import powerflex_user.user_import_by_id "" + +# import user by it's id - alternative approach by prefixing it with "id:" +terraform import powerflex_user.user_import_by_id "" + +# import user by it's name +terraform import powerflex_user.user_import_by_name "" ``` \ No newline at end of file diff --git a/docs/resources/volume.md b/docs/resources/volume.md index 38ce3a13..bc877003 100644 --- a/docs/resources/volume.md +++ b/docs/resources/volume.md @@ -19,18 +19,19 @@ linkTitle: "powerflex_volume" page_title: "powerflex_volume Resource - powerflex" subcategory: "" description: |- - This resource can be used to manage volumes on a PowerFlex array. + This resource is used to manage the Volume entity of PowerFlex Array. We can Create, Update and Delete the volume using this resource. We can also import an existing volume from PowerFlex array. --- # powerflex_volume (Resource) -This resource can be used to manage volumes on a PowerFlex array. +This resource is used to manage the Volume entity of PowerFlex Array. We can Create, Update and Delete the volume using this resource. We can also import an existing volume from PowerFlex array. -!> **Caution:** Volume creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. +> **Caution:** Volume creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. One can manually remove the taint and try applying the configuration (after making necessary adjustments). If the taint is not removed, terraform will destroy and recreate the resource. -~> **Note:** Exactly one of `protection_domain_name` and `protection_domain_id` and exactly one of `storage_pool_name` and `storage_pool_id` are required. +> **Note:** Exactly one of `protection_domain_name` or `protection_domain_id` is required. Not both can be provided together. +> **Note:** Exactly one of `storage_pool_name` or `storage_pool_id` are required. Not both can be provided together. ## Example Usage @@ -54,39 +55,34 @@ limitations under the License. # Command to run this tf file : terraform init && terraform plan && terraform apply # Create, Update, Delete is supported for this resource -# To import , check volume_resource_import.tf for more info -# To create / update, either storage_pool_id or storage_pool_name must be provided -# Also , to create / update, either protection_domain_id or protection_domain_name must be provided +# To import , check import.sh for more info # name, size is the required parameter to create or update # other atrributes like : capacity_unit, volume_type, use_rm_cache, compression_method, access_mode, remove_mode are optional -# To check which attributes of the snapshot can be updated, please refer Product Guide in the documentation +# To check which attributes of the volume can be updated, please refer Product Guide in the documentation resource "powerflex_volume" "avengers-volume-create" { - name = "avengers-volume-create" + name = "avengers-volume-create" + + # To create / update, either protection_domain_id or protection_domain_name must be provided protection_domain_name = "domain1" - storage_pool_name = "pool1" #pool1 have medium granularity - size = 8 - use_rm_cache = true - volume_type = "ThickProvisioned" - access_mode = "ReadWrite" -} + # To create / update, either storage_pool_id or storage_pool_name must be provided + storage_pool_name = "pool1" -# General guidlines for furnishing this resource block -# resource "powerflex_volume" "avengers-volume-create"{ -# name = "" -# protection_domain_name = "" -# storage_pool_name = "" -# size = "" -# capacity_unit = "" -# use_rm_cache = "true/false for use rm cache" -# volume_type = "" -# access_mode = "" -# compression_method = "" -# } + # The unit of size of the volume is defined by capacity_unit whose default value is "GB". + size = 8 + capacity_unit = "GB" + + use_rm_cache = true + volume_type = "ThickProvisioned" # ThickProvisioned/ThinProvisioned volume type + access_mode = "ReadWrite" # ReadWrite/ReadOnly volume access mode + remove_mode = "INCLUDING_DESCENDANTS" # INCLUDING_DESCENDANTS/ONLY_ME remove mode +} ``` +After the execution of above resource block, volume would have been created on the PowerFlex array. For more information, Please check the terraform state file. + ## Schema @@ -118,15 +114,19 @@ resource "powerflex_volume" "avengers-volume-create" { Import is supported using the following syntax: ```shell -# Below are the steps to import volume : -# Step 1 - To import a volume , we need the id of that volume -# Step 2 - To check the id of the volume we can make use of volume datasource . Please refer volume_datasource.tf for more info. -# Step 3 - create a tf file with empty resource block . Refer the example below. -# Example : -# resource "powerflex_volume" "resource_block_name" { -# } -# Step 4 - execute the command: terraform import "powerflex_volume.resource_block_name" "id_of_the_volume" (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 -# For volume resource, the user will not find the value for protection_domain_name, size attributes in the state file. -# For protection_domain_name and size, refer GUI +# /* +# Copyright (c) 2023 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. +# */ + +# import volume by it's id +terraform import powerflex_volume.volume_import_by_id "" ``` \ No newline at end of file diff --git a/examples/data-sources/powerflex_storage_pool/data-source.tf b/examples/data-sources/powerflex_storage_pool/data-source.tf index acaf3ad9..5165a14c 100644 --- a/examples/data-sources/powerflex_storage_pool/data-source.tf +++ b/examples/data-sources/powerflex_storage_pool/data-source.tf @@ -31,6 +31,6 @@ data "powerflex_storage_pool" "example" { } -output "allsdcresult" { +output "storagePoolresult" { value = data.powerflex_storage_pool.example.storage_pools } diff --git a/examples/data-sources/powerflex_volume/data-source.tf b/examples/data-sources/powerflex_volume/data-source.tf index 073b9f05..ebda2466 100644 --- a/examples/data-sources/powerflex_volume/data-source.tf +++ b/examples/data-sources/powerflex_volume/data-source.tf @@ -15,17 +15,15 @@ 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 # 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 a empty datsource block , then it will read all the volumes +# 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 -# Only one of the attribute can be provided among id, name, storage_pool_id, storage_pool_name data "powerflex_volume" "volume" { - #name = "cosu-ce5b8a2c48" id = "4570761d00000024" + #name = "cosu-ce5b8a2c48" #storage_pool_id= "c98e26e500000000" #storage_pool_name= "pool2" } diff --git a/examples/data-sources/powerflex_vtree/data-source.tf b/examples/data-sources/powerflex_vtree/data-source.tf index 1392fa23..dded77aa 100644 --- a/examples/data-sources/powerflex_vtree/data-source.tf +++ b/examples/data-sources/powerflex_vtree/data-source.tf @@ -16,8 +16,8 @@ limitations under the License. */ # commands to run this tf file : terraform init && terraform apply --auto-approve -# empty block of the powerflex_vtree datasource will give list of all VTrees within the system +# Get all VTrees details present on the cluster data "powerflex_vtree" "example1" { } diff --git a/examples/provider/provider.tf b/examples/provider/provider.tf index 6186d50c..f48ef142 100644 --- a/examples/provider/provider.tf +++ b/examples/provider/provider.tf @@ -29,4 +29,118 @@ provider "powerflex" { endpoint = var.endpoint insecure = true timeout = 120 +} + +resource "powerflex_protection_domain" "pd" { + name = "domain_1" +} + +resource "powerflex_sds" "sds1" { + name = "sds_1" + protection_domain_id = powerflex_protection_domain.pd.id + ip_list = [ + { + ip = "10.10.10.1" + role = "all" + } + ] + depends_on = [powerflex_protection_domain.pd] +} + +resource "powerflex_sds" "sds2" { + name = "sds_2" + protection_domain_id = powerflex_protection_domain.pd.id + ip_list = [ + { + ip = "10.10.10.2" + role = "all" + } + ] + depends_on = [powerflex_protection_domain.pd] +} + +resource "powerflex_sds" "sds3" { + name = "sds_3" + protection_domain_id = powerflex_protection_domain.pd.id + ip_list = [ + { + ip = "10.10.10.3" + role = "all" + } + ] + depends_on = [powerflex_protection_domain.pd] +} + +resource "powerflex_storage_pool" "sp" { + name = "SP" + protection_domain_id = powerflex_protection_domain.pd.id + media_type = "HDD" + use_rmcache = true + use_rfcache = true +} + +resource "powerflex_device" "device1" { + name = "device1" + device_path = "/dev/sdb" + sds_id = powerflex_sds.sds1.id + storage_pool_id = powerflex_storage_pool.sp.id + media_type = "HDD" + external_acceleration_type = "ReadAndWrite" + depends_on = [powerflex_storage_pool.sp] +} + +resource "powerflex_device" "device2" { + name = "device2" + device_path = "/dev/sdb" + sds_id = powerflex_sds.sds2.id + storage_pool_id = powerflex_storage_pool.sp.id + media_type = "HDD" + external_acceleration_type = "ReadAndWrite" + depends_on = [powerflex_storage_pool.sp] +} + +resource "powerflex_device" "device3" { + name = "device3" + device_path = "/dev/sdb" + sds_id = powerflex_sds.sds3.id + storage_pool_id = powerflex_storage_pool.sp.id + media_type = "HDD" + external_acceleration_type = "ReadAndWrite" + depends_on = [powerflex_storage_pool.sp] +} + +resource "powerflex_volume" "volume" { + name = "volume1" + protection_domain_id = powerflex_protection_domain.pd.id + storage_pool_id = powerflex_storage_pool.sp.id + size = 16 + volume_type = "ThinProvisioned" + depends_on = [powerflex_device.device1, powerflex_device.device2, powerflex_device.device3] +} + +resource "powerflex_sdc_volumes_mapping" "map" { + id = "e3d105e900000005" + volume_list = [ + { + volume_id = powerflex_volume.volume.id + limit_iops = 140 + limit_bw_in_mbps = 19 + access_mode = "ReadOnly" + }, + ] + depends_on = [powerflex_volume.volume] +} + +resource "powerflex_package" "upload-test" { + file_path = ["/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-lia-3.6-700.103.el7.x86_64.rpm", + "/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-mdm-3.6-700.103.el7.x86_64.rpm", + "/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-sds-3.6-700.103.el7.x86_64.rpm", + "/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-sdc-3.6-700.103.el7.x86_64.rpm", + "/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-sdr-3.6-700.103.el7.x86_64.rpm"] +} + +resource "powerflex_user" "user" { + name = "NewUser" + role = "Monitor" + password = "Password123" } \ No newline at end of file diff --git a/examples/resources/powerflex_cluster/import.sh b/examples/resources/powerflex_cluster/import.sh index 27a82b36..ffd1bf67 100644 --- a/examples/resources/powerflex_cluster/import.sh +++ b/examples/resources/powerflex_cluster/import.sh @@ -1,8 +1,15 @@ -# Below are the steps to import Cluster : -# Step 1 - To import a Cluster , we need the MDM IP, MDM Password, LIA Password of that Cluster -# Step 2 - create a tf file with empty resource block . Refer the example below. -# Example : -# resource "powerflex_cluster" "resource_block_name" { -# } -# Step 3 - execute the command : terraform init && terraform import "powerflex_cluster.resource_block_name" "MDM_IP,MDM_Password,LIA_Password" (resource_block_name must be taken from 2) -# Step 4 - After successful execution of the command , check the state file +# /* +# Copyright (c) 2023 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. +# */ + +# import existing cluster +terraform import powerflex_cluster.cluster_data ",," diff --git a/examples/resources/powerflex_cluster/resource.tf b/examples/resources/powerflex_cluster/resource.tf index 4059534c..94af4cf8 100644 --- a/examples/resources/powerflex_cluster/resource.tf +++ b/examples/resources/powerflex_cluster/resource.tf @@ -20,67 +20,102 @@ limitations under the License. # To perform Cluster Installation resource "powerflex_cluster" "test" { - mdm_password = "Password" - lia_password= "Password" - allow_non_secure_communication_with_lia= false - allow_non_secure_communication_with_mdm= false - disable_non_mgmt_components_auth= false - cluster = [ - { - ips= "10.10.10.1", - username= "root", - password= "Password", - operating_system= "linux", - is_mdm_or_tb= "primary", - is_sds= "yes", - sds_name= "sds1", - is_sdc= "yes", - sdc_name= "sdc1", - protection_domain = "domain_1" - sds_storage_device_list = "/dev/sdb" - storage_pool_list = "pool1" - perf_profile_for_sdc= "High", - ia_rfcache= "No", - is_sdr= "Yes", - sdr_all_ips = "10.10.20.1" - }, - { - ips= "10.10.10.2", - username= "root", - password= "Password", - operating_system= "linux", - is_mdm_or_tb= "Secondary", - protection_domain = "domain_1" - sds_storage_device_list = "/dev/sdb" - storage_pool_list = "pool1" - is_sds= "yes", - sds_name= "sds2", - is_sdc= "yes", - sdc_name= "sdc2", - perf_profile_for_sdc= "compact", - ia_rfcache= "No", - is_sdr= "No", - }, - { - ips= "10.10.10.3", - username= "root", - password= "Password", - operating_system= "linux", - is_mdm_or_tb= "TB", - is_sds= "No", - is_sdc= "yes", - sdc_name= "sdc3", - perf_profile_for_sdc= "compact", - ia_rfcache= "No", - is_sdr= "No", - }, - ] - storage_pools = [ - { - media_type = "HDD" - protection_domain = "domain_1" - storage_pool = "pool1" - replication_journal_capacity_percentage = "50" - } - ] + + # Security Related Field + mdm_password = "Password" + lia_password = "Password" + + # Advance Security Configuration + allow_non_secure_communication_with_lia = false + allow_non_secure_communication_with_mdm = false + disable_non_mgmt_components_auth = false + + # Cluster Configuration related fields + cluster = [ + { + # MDM Configuration Fields + ips = "10.10.10.1", + username = "root", + password = "Password", + operating_system = "linux", + is_mdm_or_tb = "primary", + mdm_ips = "10.10.10.1", + mdm_mgmt_ip = "10.10.10.1", + mdm_name = "MDM_1", + perf_profile_for_mdm = "HighPerformance", + virtual_ips = "10.30.30.1", + virtual_ip_nics = "ens192", + + # SDS Configuration Fields + is_sds = "yes", + sds_name = "sds1", + sds_all_ips = "10.20.20.3", # conflict with sds_to_sds_only_ips,sds_to_sdc_only_ips + # sds_to_sdc_only_ips = "10.20.20.2", + # sds_to_sds_only_ips = "10.20.20.1", + fault_set = "fs1", + protection_domain = "domain_1" + sds_storage_device_list = "/dev/sdb" + sds_storage_device_names = "device1" + storage_pool_list = "pool1" + perf_profile_for_sds = "HighPerformance" + + # SDC Configuration Fields + is_sdc = "yes", + sdc_name = "sdc1", + perf_profile_for_sdc = "HighPerformance", + + # Rfcache Configuration Fields + is_rfcache = "No", + rf_cache_ssd_device_list = "/dev/sdd" + + # SDR Configuration Fields + is_sdr = "Yes", + sdr_name = "SDR_1" + sdr_port = "2000" + # sdr_application_ips = "10.20.30.1" + # sdr_storage_ips = "10.20.30.2" + # sdr_external_ips = "10.20.30.3" + sdr_all_ips = "10.10.20.1" # conflict with sdr_application_ips, sdr_storage_ips, sdr_external_ips + perf_profile_for_sdr = "Compact" + }, + { + ips = "10.10.10.2", + username = "root", + password = "Password", + operating_system = "linux", + is_mdm_or_tb = "Secondary", + protection_domain = "domain_1" + sds_storage_device_list = "/dev/sdb" + storage_pool_list = "pool1" + is_sds = "yes", + sds_name = "sds2", + is_sdc = "yes", + sdc_name = "sdc2", + perf_profile_for_sdc = "compact", + is_rfcache = "No", + is_sdr = "No", + }, + { + ips = "10.10.10.3", + username = "root", + password = "Password", + operating_system = "linux", + is_mdm_or_tb = "TB", + is_sds = "No", + is_sdc = "yes", + sdc_name = "sdc3", + perf_profile_for_sdc = "compact", + is_rfcache = "No", + is_sdr = "No", + }, + ] + # Storage Pool Configuration Fields + storage_pools = [ + { + media_type = "HDD" + protection_domain = "domain_1" + storage_pool = "pool1" + replication_journal_capacity_percentage = "50" + } + ] } \ No newline at end of file diff --git a/examples/resources/powerflex_device/import.sh b/examples/resources/powerflex_device/import.sh index 1d5ff632..1dab89a8 100644 --- a/examples/resources/powerflex_device/import.sh +++ b/examples/resources/powerflex_device/import.sh @@ -1,11 +1,15 @@ -# Below are the steps to import device : -# Step 1 - To import a device , we need the id of that device -# Step 2 - To check the id of the device we can make use of device datasource . Please refer device_datasource.tf for more info. -# Step 3 - create a tf file with empty resource block . Refer the example below. -# Example : -# resource "powerflex_device" "resource_block_name" { -# } -# Step 4 - execute the command: terraform import "powerflex_device.resource_block_name" "id_of_the_device" (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 - +# /* +# Copyright (c) 2023 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. +# */ +# import Protection Device by it's id +terraform import powerflex_device.device_data "" diff --git a/examples/resources/powerflex_device/resource.tf b/examples/resources/powerflex_device/resource.tf index 785575ca..35906512 100644 --- a/examples/resources/powerflex_device/resource.tf +++ b/examples/resources/powerflex_device/resource.tf @@ -16,10 +16,6 @@ limitations under the License. */ # Command to run this tf file : terraform init && terraform plan && terraform apply. -# Create, Update, Read, Delete and Import operations are supported for this resource. -# To add device, device_path is mandatory along with storage_pool_name/storage_pool_id and sds_name/sds_id. -# Along with storage_pool_name, we have to specify protection_domain_id or protection_domain_name. -# To check which attributes of the device resource can be updated, please refer Product Guide in the documentation resource "powerflex_device" "test-device" { device_path = "/dev/sdc" diff --git a/examples/resources/powerflex_mdm_cluster/resource.tf b/examples/resources/powerflex_mdm_cluster/resource.tf index 99580c9b..38eddfa7 100644 --- a/examples/resources/powerflex_mdm_cluster/resource.tf +++ b/examples/resources/powerflex_mdm_cluster/resource.tf @@ -18,15 +18,15 @@ limitations under the License. # Command to run this tf file : terraform init && terraform plan && terraform apply. # Create, Update, Read, and Delete operations are supported for this resource. # For this resource, primary_mdm, secondary_mdm, tiebreaker_mdm and cluster_mode are mandatory parameters. +# While specifying primary_mdm, secondary_mdm and tiebreaker_mdm, id or ips is mandatory. # For adding standby mdm, ips and role parameters are mandatory. -# To check which attributes of the device resource can be updated, please refer Product Guide in the documentation +# To check which attributes of the MDM cluster resource can be updated, please refer Product Guide in the documentation -# Example for adding standby MDMs +# Example for adding standby MDMs. Before adding standby MDMs, MDM package must be installed on VM with respective role. resource "powerflex_mdm_cluster" "test-mdm-cluster" { cluster_mode = "ThreeNodes" primary_mdm = { id = "7f328d0b71711801" - } secondary_mdm = [{ id = "10912d8a5d412800" @@ -46,16 +46,39 @@ resource "powerflex_mdm_cluster" "test-mdm-cluster" { ] } -# Example for switching cluster mode to 5 nodes +# Example for changing MDM ownership. In this case, the id of the primary and secondary MDM will be swapped. resource "powerflex_mdm_cluster" "test-mdm-cluster" { - cluster_mode = "FiveNodes" + cluster_mode = "ThreeNodes" primary_mdm = { + id = "10912d8a5d412800" + } + secondary_mdm = [{ id = "7f328d0b71711801" + }] + tiebreaker_mdm = [{ + id = "0e4f0a2f5978ae02" + }] + standby_mdm = [ + { + ips = ["10.xxx.xx.xxx"] + role = "Manager" + }, + { + ips = ["10.yyy.yy.yyy"] + role = "TieBreaker" + }, + ] +} +# Example for switching cluster mode to 5 nodes from 3 nodes. The cluster mode will be FiveNodes. Previously added standby MDMs will be added as Secondary/TieBreaker MDM. +resource "powerflex_mdm_cluster" "test-mdm-cluster" { + cluster_mode = "FiveNodes" + primary_mdm = { + id = "10912d8a5d412800" } secondary_mdm = [ { - id = "10912d8a5d412800" + id = "7f328d0b71711801" }, { ips = ["10.xxx.xx.xxx"] @@ -74,3 +97,50 @@ resource "powerflex_mdm_cluster" "test-mdm-cluster" { standby_mdm = [ ] } + +# Example for switching cluster mode to 3 nodes from 5 nodes. The cluster mode will be ThreeNodes. One of the active Secondary/TieBreaker MDM will be moved to standby MDMs. +resource "powerflex_mdm_cluster" "test-mdm-cluster" { + cluster_mode = "ThreeNodes" + primary_mdm = { + id = "10912d8a5d412800" + } + secondary_mdm = [ + { + id = "7f328d0b71711801" + } + ] + tiebreaker_mdm = [ + { + id = "0e4f0a2f5978ae02" + } + ] + standby_mdm = [ + { + ips = ["10.xxx.xx.xxx"] + role = "Manager" + }, + { + ips = ["10.yyy.yy.yyy"] + role = "TieBreaker" + }, + ] +} + +# Example for removing standby MDMs. In this case, standby_mdm will be empty list. +resource "powerflex_mdm_cluster" "test-mdm-cluster" { + cluster_mode = "ThreeNodes" + primary_mdm = { + id = "10912d8a5d412800" + } + secondary_mdm = [ + { + id = "7f328d0b71711801" + } + ] + tiebreaker_mdm = [ + { + id = "0e4f0a2f5978ae02" + } + ] + standby_mdm = [] +} \ No newline at end of file diff --git a/examples/resources/powerflex_package/resource.tf b/examples/resources/powerflex_package/resource.tf index 38c5df4e..a78e38fe 100644 --- a/examples/resources/powerflex_package/resource.tf +++ b/examples/resources/powerflex_package/resource.tf @@ -16,9 +16,9 @@ limitations under the License. */ resource "powerflex_package" "upload-test" { - file_path = ["/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-lia-3.6-700.103.el7.x86_64.rpm", - "/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-mdm-3.6-700.103.el7.x86_64.rpm", - "/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-sds-3.6-700.103.el7.x86_64.rpm", - "/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-sdc-3.6-700.103.el7.x86_64.rpm", - "/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-sdr-3.6-700.103.el7.x86_64.rpm"] + file_path = ["/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-lia-3.6-700.103.el7.x86_64.rpm", + "/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-mdm-3.6-700.103.el7.x86_64.rpm", + "/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-sds-3.6-700.103.el7.x86_64.rpm", + "/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-sdc-3.6-700.103.el7.x86_64.rpm", + "/root/powerflex_packages/PowerFlex_3.6.700.103_RHEL_OEL7/EMC-ScaleIO-sdr-3.6-700.103.el7.x86_64.rpm"] } diff --git a/examples/resources/powerflex_protection_domain/import.sh b/examples/resources/powerflex_protection_domain/import.sh index 303ac77b..0d9d834d 100644 --- a/examples/resources/powerflex_protection_domain/import.sh +++ b/examples/resources/powerflex_protection_domain/import.sh @@ -1,5 +1,15 @@ -# The command is -# terraform import powerflex_protection_domain.pd -# Example: -terraform import powerflex_protection_domain.pd 202b3d0300000004 -# after running this command, populate the name field in the config file to start managing this resource +# /* +# Copyright (c) 2023 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. +# */ + +# import Protection Domain by it's id +terraform import powerflex_protection_domain.pd_data "" diff --git a/examples/resources/powerflex_sdc/import.sh b/examples/resources/powerflex_sdc/import.sh index 18bbae07..a3fd1e75 100644 --- a/examples/resources/powerflex_sdc/import.sh +++ b/examples/resources/powerflex_sdc/import.sh @@ -1,11 +1,18 @@ -# Below are the steps to import SDC : -# 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" "resource_block_name" { -# } -# Step 4 - execute the command : terraform init && terraform import "powerflex_sdc.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 +# /* +# Copyright (c) 2023 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. +# */ +# import SDC by it's id +terraform import powerflex_sdc.sdc_data "" +# import SDC by multiple id +terraform import powerflex_sdc.sdc_data ",," diff --git a/examples/resources/powerflex_sdc/resource.tf b/examples/resources/powerflex_sdc/resource.tf index 3ce9fd57..d246123e 100644 --- a/examples/resources/powerflex_sdc/resource.tf +++ b/examples/resources/powerflex_sdc/resource.tf @@ -69,8 +69,3 @@ resource "powerflex_sdc" "expansion" { }, ] } - -# For Import Multiple SDC -resource "powerflex_sdc" "importing" { -} -#terraform import powerflex_sdc.importing ID1,ID2,ID3 \ No newline at end of file diff --git a/examples/resources/powerflex_sdc_volumes_mapping/import.sh b/examples/resources/powerflex_sdc_volumes_mapping/import.sh index 13d76a4a..0f8295a7 100644 --- a/examples/resources/powerflex_sdc_volumes_mapping/import.sh +++ b/examples/resources/powerflex_sdc_volumes_mapping/import.sh @@ -8,4 +8,21 @@ # 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. +# /* +# Copyright (c) 2023 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. +# */ + +# import using SDC id +terraform import powerflex_sdc_volumes_mapping.sdc_mapping_import_by_id "" + + diff --git a/examples/resources/powerflex_sdc_volumes_mapping/resource.tf b/examples/resources/powerflex_sdc_volumes_mapping/resource.tf index 2f9ff8bf..5fd3e052 100644 --- a/examples/resources/powerflex_sdc_volumes_mapping/resource.tf +++ b/examples/resources/powerflex_sdc_volumes_mapping/resource.tf @@ -23,13 +23,21 @@ limitations under the License. # 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" { + # SDC id id = "e3ce1fb600000001" volume_list = [ { - volume_id = "edb2059700000002" - limit_iops = 140 + # id of the volume which needs to be mapped. + # either volume_id or volume_name can be used. + volume_id = "edb2059700000002" + + # Valid values are 0 or integers greater than 10 + limit_iops = 140 + + # Default value is 0 limit_bw_in_mbps = 19 - access_mode = "ReadOnly" + + access_mode = "ReadOnly" # ReadOnly/ReadWrite/NoAccess }, { volume_name = "terraform-vol" @@ -42,7 +50,7 @@ resource "powerflex_sdc_volumes_mapping" "mapping-test" { # To unmap all the volumes mapped to SDC, below config can be used. -resource "powerflex_sdc_volumes_mapping" "mapping-test" { - id = "e3ce1fb600000001" - volume_list = [] -} +# resource "powerflex_sdc_volumes_mapping" "mapping-test" { +# id = "e3ce1fb600000001" +# volume_list = [] +# } diff --git a/examples/resources/powerflex_sds/import.sh b/examples/resources/powerflex_sds/import.sh index 551715cc..2861d158 100644 --- a/examples/resources/powerflex_sds/import.sh +++ b/examples/resources/powerflex_sds/import.sh @@ -1,11 +1,15 @@ -# Below are the steps to import SDS : -# Step 1 - To import a sds , we need the id of that sds -# Step 2 - To check the id of the sds we can make use of sds datasource . Please refer sds_datasource.tf for more info. -# Step 3 - create a tf file with empty resource block . Refer the example below. -# Example : -# resource "powerflex_sds" "resource_block_name" { -# } -# Step 4 - execute the command: terraform import "powerflex_sds.resource_block_name" "id_of_the_sds" (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 - +# /* +# Copyright (c) 2023 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. +# */ +# import SDS by it's id +terraform import powerflex_sds.sds_data "" diff --git a/examples/resources/powerflex_snapshot/import.sh b/examples/resources/powerflex_snapshot/import.sh index 62eea873..af38f463 100644 --- a/examples/resources/powerflex_snapshot/import.sh +++ b/examples/resources/powerflex_snapshot/import.sh @@ -1,10 +1,15 @@ -# Below are the steps to import snapshot : -# Step 1 - To import a snapshot , we need the id of that snapshot -# Step 2 - create a tf file with empty resource block . Refer the example below. -# Example : -# resource "powerflex_snapshot" "resource_block_name" { -# } -# Step 3 - execute the command: terraform import "powerflex_snapshot.resource_block_name" "id_of_the_snapshot" (resource_block_name must be taken from step 2) -# Step 4 - After successful execution of the command , check the state file - +# /* +# Copyright (c) 2023 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. +# */ +# import Snapshot by it's id +terraform import powerflex_snapshot.ss_data "" diff --git a/examples/resources/powerflex_storage_pool/import.sh b/examples/resources/powerflex_storage_pool/import.sh index 812e8ce9..dabe9d56 100644 --- a/examples/resources/powerflex_storage_pool/import.sh +++ b/examples/resources/powerflex_storage_pool/import.sh @@ -1,11 +1,15 @@ -# Below are the steps to import storage pool : -# Step 1 - To import a storage pool , we need the id of that storage pool -# Step 2 - To check the id of the storage pool we can make use of storage pool datasource . Please refer storagepool_datasource.tf for more info. -# Step 3 - create a tf file with empty resource block . Refer the example below. -# Example : -# resource "powerflex_storage_pool" "resource_block_name" { -# } -# Step 4 - execute the command: terraform import "powerflex_storage_pool.resource_block_name" "id_of_the_storage_pool" (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 - +# /* +# Copyright (c) 2023 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. +# */ +# import storage pool by it's id +terraform import powerflex_storage_pool.storage_pool_import_by_id "" diff --git a/examples/resources/powerflex_storage_pool/resource.tf b/examples/resources/powerflex_storage_pool/resource.tf index 28046046..2cbd58d9 100644 --- a/examples/resources/powerflex_storage_pool/resource.tf +++ b/examples/resources/powerflex_storage_pool/resource.tf @@ -24,31 +24,49 @@ limitations under the License. # To check which attributes of the storage pool can be updated, please refer Product Guide in the documentation resource "powerflex_storage_pool" "sp" { - name = "storagepool3" - #protection_domain_id = "202a046600000000" - protection_domain_name = "domain1" - media_type = "HDD" - use_rmcache = false - use_rfcache = true - #replication_journal_capacity = 34 - capacity_alert_high_threshold = 66 - capacity_alert_critical_threshold = 77 - zero_padding_enabled = false + name = "newstoragepool" + protection_domain_name = "domain1" + media_type = "HDD" + use_rmcache = false + use_rfcache = true + replication_journal_capacity = 34 + zero_padding_enabled = false + rebalance_enabled = false + + # Alert Thresholds + # Critical threshold must be greater than high threshold + capacity_alert_high_threshold = 66 + capacity_alert_critical_threshold = 77 + + # Protected Maintenance Mode Parameters + # When the policy is set to "favorAppIos", then concurrent IOs and bandwidth limit can be set. + # When the policy is set to "limitNumOfConcurrentIos", then only concurrent IOs can be set. + # When the policy is set to "unlimited", then concurrent IOs and bandwidth limit can't be set. protected_maintenance_mode_io_priority_policy = "favorAppIos" protected_maintenance_mode_num_of_concurrent_ios_per_device = 7 protected_maintenance_mode_bw_limit_per_device_in_kbps = 1028 - rebalance_enabled = false - rebalance_io_priority_policy = "favorAppIos" - rebalance_num_of_concurrent_ios_per_device = 7 - rebalance_bw_limit_per_device_in_kbps = 1032 - vtree_migration_io_priority_policy = "favorAppIos" - vtree_migration_num_of_concurrent_ios_per_device = 7 - vtree_migration_bw_limit_per_device_in_kbps = 1030 - spare_percentage = 66 - rm_cache_write_handling_mode = "Passthrough" - rebuild_enabled = true - rebuild_rebalance_parallelism = 5 - fragmentation = false + + # Rebalance Parameters + # When the policy is set to "favorAppIos", then concurrent IOs and bandwidth limit can be set. + # When the policy is set to "limitNumOfConcurrentIos", then only concurrent IOs can be set. + # When the policy is set to "unlimited", then concurrent IOs and bandwidth limit can't be set. + rebalance_io_priority_policy = "favorAppIos" + rebalance_num_of_concurrent_ios_per_device = 7 + rebalance_bw_limit_per_device_in_kbps = 1032 + + #VTree Migration Parameters + # When the policy is set to "favorAppIos", then concurrent IOs and bandwidth limit can be set. + # When the policy is set to "limitNumOfConcurrentIos", then only concurrent IOs can be set. + vtree_migration_io_priority_policy = "favorAppIos" + vtree_migration_num_of_concurrent_ios_per_device = 7 + vtree_migration_bw_limit_per_device_in_kbps = 1030 + + + spare_percentage = 66 + rm_cache_write_handling_mode = "Passthrough" + rebuild_enabled = true + rebuild_rebalance_parallelism = 5 + fragmentation = false } output "created_storagepool" { diff --git a/examples/resources/powerflex_user/import.sh b/examples/resources/powerflex_user/import.sh index 4d5e40bc..edf8440f 100644 --- a/examples/resources/powerflex_user/import.sh +++ b/examples/resources/powerflex_user/import.sh @@ -1,11 +1,21 @@ -# Below are the steps to import a user : -# Step 1 - To import a user , we either need id or username of that user -# Step 3 - create a tf file with empty resource block . Refer the example below. -# Example : -# resource "powerflex_user" "resource_block_name" { -# } -# Step 4 - execute the command: terraform import "powerflex_user.resource_block_name" "name:userName" (where userName is the name of the user which you wanna import) -# 2nd approach to import the user is using the id. The import command to import using the id is : terraform import "powerflex_user.resource_block_name" "id:userId" OR terraform import "powerflex_user.resource_block_name" "userId" -# Step 5 - After successful execution of the command , check the state file +# /* +# Copyright (c) 2023 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. +# */ +# import user by it's id +terraform import powerflex_user.user_import_by_id "" +# import user by it's id - alternative approach by prefixing it with "id:" +terraform import powerflex_user.user_import_by_id "" + +# import user by it's name +terraform import powerflex_user.user_import_by_name "" diff --git a/examples/resources/powerflex_user/resource.tf b/examples/resources/powerflex_user/resource.tf index c28d03f4..952df187 100644 --- a/examples/resources/powerflex_user/resource.tf +++ b/examples/resources/powerflex_user/resource.tf @@ -18,10 +18,11 @@ limitations under the License. # terraform init && terraform plan && terraform apply # Create, Update, Delete is supported for this resource # Import is supported. -# name, role and password is the required parameter to create or update resource "powerflex_user" "newUser" { - name = "StorageAdmin" - role = "Monitor" + + # name, role and password is the required parameter to create or update. Only role can be updated. + name = "StorageAdmin" + role = "Monitor" password = "Password" } diff --git a/examples/resources/powerflex_volume/import.sh b/examples/resources/powerflex_volume/import.sh index 264b7582..f95279db 100644 --- a/examples/resources/powerflex_volume/import.sh +++ b/examples/resources/powerflex_volume/import.sh @@ -1,13 +1,17 @@ -# Below are the steps to import volume : -# Step 1 - To import a volume , we need the id of that volume -# Step 2 - To check the id of the volume we can make use of volume datasource . Please refer volume_datasource.tf for more info. -# Step 3 - create a tf file with empty resource block . Refer the example below. -# Example : -# resource "powerflex_volume" "resource_block_name" { -# } -# Step 4 - execute the command: terraform import "powerflex_volume.resource_block_name" "id_of_the_volume" (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 -# For volume resource, the user will not find the value for protection_domain_name, size attributes in the state file. -# For protection_domain_name and size, refer GUI +# /* +# Copyright (c) 2023 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. +# */ + +# import volume by it's id +terraform import powerflex_volume.volume_import_by_id "" diff --git a/examples/resources/powerflex_volume/resource.tf b/examples/resources/powerflex_volume/resource.tf index eb2fcda0..4b088dbf 100644 --- a/examples/resources/powerflex_volume/resource.tf +++ b/examples/resources/powerflex_volume/resource.tf @@ -17,34 +17,27 @@ limitations under the License. # Command to run this tf file : terraform init && terraform plan && terraform apply # Create, Update, Delete is supported for this resource -# To import , check volume_resource_import.tf for more info -# To create / update, either storage_pool_id or storage_pool_name must be provided -# Also , to create / update, either protection_domain_id or protection_domain_name must be provided +# To import , check import.sh for more info # name, size is the required parameter to create or update # other atrributes like : capacity_unit, volume_type, use_rm_cache, compression_method, access_mode, remove_mode are optional -# To check which attributes of the snapshot can be updated, please refer Product Guide in the documentation +# To check which attributes of the volume can be updated, please refer Product Guide in the documentation resource "powerflex_volume" "avengers-volume-create" { - name = "avengers-volume-create" + name = "avengers-volume-create" + + # To create / update, either protection_domain_id or protection_domain_name must be provided protection_domain_name = "domain1" - storage_pool_name = "pool1" #pool1 have medium granularity - size = 8 - use_rm_cache = true - volume_type = "ThickProvisioned" - access_mode = "ReadWrite" -} - - -# General guidlines for furnishing this resource block -# resource "powerflex_volume" "avengers-volume-create"{ -# name = "" -# protection_domain_name = "" -# storage_pool_name = "" -# size = "" -# capacity_unit = "" -# use_rm_cache = "true/false for use rm cache" -# volume_type = "" -# access_mode = "" -# compression_method = "" -# } \ No newline at end of file + + # To create / update, either storage_pool_id or storage_pool_name must be provided + storage_pool_name = "pool1" + + # The unit of size of the volume is defined by capacity_unit whose default value is "GB". + size = 8 + capacity_unit = "GB" + + use_rm_cache = true + volume_type = "ThickProvisioned" # ThickProvisioned/ThinProvisioned volume type + access_mode = "ReadWrite" # ReadWrite/ReadOnly volume access mode + remove_mode = "INCLUDING_DESCENDANTS" # INCLUDING_DESCENDANTS/ONLY_ME remove mode +} \ No newline at end of file diff --git a/powerflex/provider/cluster_resource_schema.go b/powerflex/provider/cluster_resource_schema.go index 1e46ad55..8827c529 100644 --- a/powerflex/provider/cluster_resource_schema.go +++ b/powerflex/provider/cluster_resource_schema.go @@ -30,8 +30,8 @@ import ( // ClusterReourceSchema defines the schema for cluster resource var ClusterReourceSchema schema.Schema = schema.Schema{ - Description: "This resource can be used to install the PowerFlex Cluster.", - MarkdownDescription: "This resource can be used to install the PowerFlex Cluster.", + Description: "This terraform resource is used to deploy PowerFlex Cluster. We can Create and Delete the PowerFlex Cluster using this resource. We can also Import an existing Cluster of PowerFlex.", + MarkdownDescription: "This terraform resource is used to deploy PowerFlex Cluster. We can Create and Delete the PowerFlex Cluster using this resource. We can also Import an existing Cluster of PowerFlex.", Attributes: ClusterResourceModelSchema(), } diff --git a/powerflex/provider/device_datasource_schema.go b/powerflex/provider/device_datasource_schema.go index 1ebdeb63..42c20513 100644 --- a/powerflex/provider/device_datasource_schema.go +++ b/powerflex/provider/device_datasource_schema.go @@ -26,8 +26,8 @@ import ( // DeviceDataSourceSchema defines the schema for device datasource var DeviceDataSourceSchema schema.Schema = schema.Schema{ - Description: "This datasource can be used to fetch information related to devices from a PowerFlex array.", - MarkdownDescription: "This datasource can be used to fetch information related to devices from a PowerFlex array.", + Description: "This datasource is used to query the existing device from PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block.", + MarkdownDescription: "This datasource is used to query the existing device from PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block.", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Description: "Unique identifier Of The Device Instance." + diff --git a/powerflex/provider/device_resource.go b/powerflex/provider/device_resource.go index 2b59ba2d..980c8f4c 100644 --- a/powerflex/provider/device_resource.go +++ b/powerflex/provider/device_resource.go @@ -51,8 +51,8 @@ func (r *deviceResource) Metadata(_ context.Context, req resource.MetadataReques func (r *deviceResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - Description: "This resource can be used to manage devices on a PowerFlex array.", - MarkdownDescription: "This resource can be used to manage devices on a PowerFlex array.", + Description: "This resource is used to manage the Device entity of PowerFlex Array. We can Create, Update and Delete the PowerFlex Devices using this resource. We can also import an existing device from PowerFlex array.", + MarkdownDescription: "This resource is used to manage the Device entity of PowerFlex Array. We can Create, Update and Delete the PowerFlex Devices using this resource. We can also import an existing device from PowerFlex array.", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Description: "The ID of the device.", diff --git a/powerflex/provider/mdm_cluster_resource.go b/powerflex/provider/mdm_cluster_resource.go index 5825de4b..8beea897 100644 --- a/powerflex/provider/mdm_cluster_resource.go +++ b/powerflex/provider/mdm_cluster_resource.go @@ -68,8 +68,8 @@ func (d *mdmClusterResource) Schema(_ context.Context, _ resource.SchemaRequest, // MdmClusterResourceSchema defines the schema for Mdm resource var MdmClusterResourceSchema schema.Schema = schema.Schema{ - Description: "This resource can be used to manage MDM cluster on a PowerFlex array.", - MarkdownDescription: "This resource can be used to manage MDM cluster on a PowerFlex array.", + Description: "This resource can be used to manage MDM cluster on a PowerFlex array. Supports adding or removing standby MDMs, migrate from 3-node to 5-node cluster or vice-versa, changing MDM ownership, changing performance profile, and renaming MDMs.", + MarkdownDescription: "This resource can be used to manage MDM cluster on a PowerFlex array. Supports adding or removing standby MDMs, migrate from 3-node to 5-node cluster or vice-versa, changing MDM ownership, changing performance profile, and renaming MDMs.", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Description: "Unique identifier of the MDM cluster.", @@ -323,8 +323,8 @@ var MdmClusterResourceSchema schema.Schema = schema.Schema{ }, }, "port": schema.Int64Attribute{ - Description: "Port of the standby MDM.", - MarkdownDescription: "Port of the standby MDM.", + Description: "Port of the standby MDM. Cannot be updated.", + MarkdownDescription: "Port of the standby MDM. Cannot be updated.", Optional: true, Computed: true, PlanModifiers: []planmodifier.Int64{ diff --git a/powerflex/provider/package_resource.go b/powerflex/provider/package_resource.go index 7979603a..e2f3abae 100644 --- a/powerflex/provider/package_resource.go +++ b/powerflex/provider/package_resource.go @@ -48,8 +48,8 @@ func (r *packageResource) Metadata(_ context.Context, req resource.MetadataReque func (r *packageResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - Description: "This resource can be used to upload packages on a PowerFlex Gateway.", - MarkdownDescription: "This resource can be used to upload packages on a PowerFlex Gateway.", + Description: "This resource can be used to upload packages on a PowerFlex Gateway.We can add or remove packages from PowerFlex Gateway. Import functionality is not supported.", + MarkdownDescription: "This resource can be used to upload packages on a PowerFlex Gateway.We can add or remove packages from PowerFlex Gateway. Import functionality is not supported.", Attributes: map[string]schema.Attribute{ "file_path": schema.ListAttribute{ Description: "The list of path of packages", diff --git a/powerflex/provider/protection_domain_datasource_schema.go b/powerflex/provider/protection_domain_datasource_schema.go index 72575ace..4ffbf85f 100644 --- a/powerflex/provider/protection_domain_datasource_schema.go +++ b/powerflex/provider/protection_domain_datasource_schema.go @@ -26,8 +26,8 @@ import ( // ProtectionDomainDataSourceSchema defines the schema for Protection Domain datasource var ProtectionDomainDataSourceSchema schema.Schema = schema.Schema{ - Description: "This datasource can be used to fetch information related to protection domains from a PowerFlex array.", - MarkdownDescription: "This datasource can be used to fetch information related to protection domains from a PowerFlex array.", + Description: "This datasource is used to query the existing protection domain from PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block.", + MarkdownDescription: "This datasource is used to query the existing protection domain from PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block.", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Description: "Unique identifier of the protection domain instance." + diff --git a/powerflex/provider/protection_domain_resource_schema.go b/powerflex/provider/protection_domain_resource_schema.go index e20f7b36..09338d6a 100644 --- a/powerflex/provider/protection_domain_resource_schema.go +++ b/powerflex/provider/protection_domain_resource_schema.go @@ -31,8 +31,8 @@ import ( // ProtectionDomainResourceSchema defines the schema for Protection Domain resource var ProtectionDomainResourceSchema schema.Schema = schema.Schema{ - Description: "This resource can be used to manage protection domains on a PowerFlex array.", - MarkdownDescription: "This resource can be used to manage protection domains on a PowerFlex array.", + Description: "This resource is used to manage the Protection Domain entity of PowerFlex Array. We can Create, Update and Delete the protection domain using this resource. We can also import an existing protection domain from PowerFlex array.", + MarkdownDescription: "This resource is used to manage the Protection Domain entity of PowerFlex Array. We can Create, Update and Delete the protection domain using this resource. We can also import an existing protection domain from PowerFlex array.", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Description: "Unique identifier of the protection domain instance.", diff --git a/powerflex/provider/sdc_datasource_schema.go b/powerflex/provider/sdc_datasource_schema.go index d8dd1782..29aa5511 100644 --- a/powerflex/provider/sdc_datasource_schema.go +++ b/powerflex/provider/sdc_datasource_schema.go @@ -28,7 +28,8 @@ import ( // SDCDataSourceScheme is variable for schematic for SDC Data Source var SDCDataSourceScheme schema.Schema = schema.Schema{ - Description: "This data-source can be used to fetch information related to Storage Data Clients from a PowerFlex array.", + Description: "This datasource is used to query the existing Storage Data Clients from PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block.", + MarkdownDescription: "This datasource is used to query the existing Storage Data Clients from PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block.", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Description: "ID of the SDC to fetch." + diff --git a/powerflex/provider/sdc_resource_schema.go b/powerflex/provider/sdc_resource_schema.go index 91a37b78..69008a18 100644 --- a/powerflex/provider/sdc_resource_schema.go +++ b/powerflex/provider/sdc_resource_schema.go @@ -32,8 +32,8 @@ import ( // SDCReourceSchema - varible holds schema for SDC resource var SDCReourceSchema schema.Schema = schema.Schema{ - Description: "This resource can be used to Manage the SDC in PowerFlex Cluster.", - MarkdownDescription: "This resource can be used to Manage the SDC in PowerFlex Cluster.", + Description: "This terraform resource is used to manage the SDC entity of PowerFlex Array. We can Create, Update and Delete the PowerFlex SDC using this resource. We can also Import an existing SDC from PowerFlex array.", + MarkdownDescription: "This terraform resource is used to manage the SDC entity of PowerFlex Array. We can Create, Update and Delete the PowerFlex SDC using this resource. We can also Import an existing SDC from PowerFlex array.", Attributes: map[string]schema.Attribute{ "sdc_details": sdcDetailSchema, "mdm_password": schema.StringAttribute{ diff --git a/powerflex/provider/sdc_volumes_mapping_resource.go b/powerflex/provider/sdc_volumes_mapping_resource.go index 538183df..2773cde6 100644 --- a/powerflex/provider/sdc_volumes_mapping_resource.go +++ b/powerflex/provider/sdc_volumes_mapping_resource.go @@ -54,8 +54,8 @@ func (r *sdcVolumeMappingResource) Metadata(_ context.Context, req resource.Meta func (r *sdcVolumeMappingResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - Description: "This resource can be used to manage mapping of volumes to an SDC on a PowerFlex array.", - MarkdownDescription: "This resource can be used to manage mapping of volumes to an SDC on a PowerFlex array.", + Description: "This resource can be used to map/unmap volumes to an SDC on a PowerFlex array. User can even import an existing SDC and map volumes to it.", + MarkdownDescription: "This resource can be used to map/unmap volumes to an SDC on a PowerFlex array. User can even import an existing SDC and map volumes to it.", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Description: "The ID of the SDC.", diff --git a/powerflex/provider/sds_datasource_schema.go b/powerflex/provider/sds_datasource_schema.go index eeeb78e2..1e0829c6 100644 --- a/powerflex/provider/sds_datasource_schema.go +++ b/powerflex/provider/sds_datasource_schema.go @@ -28,7 +28,8 @@ import ( // SdsDataSourceSchema is the schema for reading the sds data var SdsDataSourceSchema schema.Schema = schema.Schema{ - Description: "This data-source can be used to fetch information related to Storage Data Servers from a PowerFlex array.", + Description: "This datasource is used to query the existing Storage Data Servers from PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block.", + MarkdownDescription: "This datasource is used to query the existing Storage Data Servers from PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block.", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Description: "Placeholder identifier attribute.", diff --git a/powerflex/provider/sds_resource_schema.go b/powerflex/provider/sds_resource_schema.go index 42bedb3a..c24c638c 100644 --- a/powerflex/provider/sds_resource_schema.go +++ b/powerflex/provider/sds_resource_schema.go @@ -30,8 +30,8 @@ import ( // SDSResourceSchema variable to define schema for the SDS resource var SDSResourceSchema schema.Schema = schema.Schema{ - Description: "This resource can be used to manage Storage Data Servers on a PowerFlex array.", - MarkdownDescription: "This resource can be used to manage Storage Data Servers on a PowerFlex array.", + Description: "This resource is used to manage the Storage Data Servers entity of PowerFlex Array. We can Create, Update and Delete the SDS using this resource. We can also import an existing SDS from PowerFlex array.", + MarkdownDescription: "This resource is used to manage the Storage Data Servers entity of PowerFlex Array. We can Create, Update and Delete the SDS using this resource. We can also import an existing SDS from PowerFlex array.", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Description: "The id of the SDS", diff --git a/powerflex/provider/snapshot_resource_schema.go b/powerflex/provider/snapshot_resource_schema.go index 8de4ad1d..7e9fbda1 100644 --- a/powerflex/provider/snapshot_resource_schema.go +++ b/powerflex/provider/snapshot_resource_schema.go @@ -30,8 +30,8 @@ import ( // SnapshotResourceSchema variable to define schema for the snapshot resource var SnapshotResourceSchema schema.Schema = schema.Schema{ - Description: "This resource can be used to manage snapshots of volumes on a PowerFlex array.", - MarkdownDescription: "This resource can be used to manage snapshots of volumes on a PowerFlex array.", + Description: "This resource is used to manage the Snapshot of volumes on PowerFlex Array. We can Create, Update and Delete the snapshots using this resource. We can also import an existing snapshot from PowerFlex array.", + MarkdownDescription: "This resource is used to manage the Snapshot of volumes on PowerFlex Array. We can Create, Update and Delete the snapshots using this resource. We can also import an existing snapshot from PowerFlex array.", Attributes: map[string]schema.Attribute{ "name": schema.StringAttribute{ Description: "The name of the snapshot.", diff --git a/powerflex/provider/snapshotpolicy_datasource_schema.go b/powerflex/provider/snapshotpolicy_datasource_schema.go index 075a3d40..3308e0d4 100644 --- a/powerflex/provider/snapshotpolicy_datasource_schema.go +++ b/powerflex/provider/snapshotpolicy_datasource_schema.go @@ -27,7 +27,8 @@ import ( // SnapshotPolicyDataSourceSchema is the schema for reading the snapshot policy data var SnapshotPolicyDataSourceSchema schema.Schema = schema.Schema{ - Description: "This data-source can be used to fetch information related to the snapshot policies from a PowerFlex array.", + Description: "This datasource is used to query the existing snapshot policies from PowerFlex array. The information fetched from this datasource can be used for getting the details.", + MarkdownDescription: "This datasource is used to query the existing snapshot policies from PowerFlex array. The information fetched from this datasource can be used for getting the details.", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Description: "Unique identifier of the snapshot policy instance to fetch." + diff --git a/powerflex/provider/storagepool_data_source_schema.go b/powerflex/provider/storagepool_data_source_schema.go index 3f334604..6b3bc023 100644 --- a/powerflex/provider/storagepool_data_source_schema.go +++ b/powerflex/provider/storagepool_data_source_schema.go @@ -28,7 +28,8 @@ import ( // DataSourceSchema is the schema for reading the storage pool data var DataSourceSchema schema.Schema = schema.Schema{ - Description: "This data-source can be used to fetch information related to the storage pools from a PowerFlex array.", + Description: "This datasource is used to query the existing storage pools from PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block.", + MarkdownDescription: "This datasource is used to query the existing storage pools from PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block.", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Description: "Placeholder identifier attribute.", diff --git a/powerflex/provider/storagepool_resource_schema.go b/powerflex/provider/storagepool_resource_schema.go index cd23dfeb..5ca7e768 100644 --- a/powerflex/provider/storagepool_resource_schema.go +++ b/powerflex/provider/storagepool_resource_schema.go @@ -27,7 +27,8 @@ import ( // StoragepoolReourceSchema - varible holds schema for Storagepool var StoragepoolReourceSchema schema.Schema = schema.Schema{ - Description: "This resource can be used to manage Storage Pools on a PowerFlex array.", + Description: "This resource is used to manage the Storage Pool entity of PowerFlex Array. We can Create, Update and Delete the storage pool using this resource. We can also import an existing storage pool from PowerFlex array.", + MarkdownDescription: "This resource is used to manage the Storage Pool entity of PowerFlex Array. We can Create, Update and Delete the storage pool using this resource. We can also import an existing storage pool from PowerFlex array.", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Description: "ID of the Storage pool", @@ -94,8 +95,8 @@ var StoragepoolReourceSchema schema.Schema = schema.Schema{ Computed: true, }, "replication_journal_capacity": schema.Int64Attribute{ - Description: "This defines the maximum percentage of Storage Pool capacity that can be used by replication for the journal.", - MarkdownDescription: "This defines the maximum percentage of Storage Pool capacity that can be used by replication for the journal.", + Description: "This defines the maximum percentage of Storage Pool capacity that can be used by replication for the journal. Before deleting the storage pool, this has to be set to 0.", + MarkdownDescription: "This defines the maximum percentage of Storage Pool capacity that can be used by replication for the journal. Before deleting the storage pool, this has to be set to 0.", Optional: true, Computed: true, }, diff --git a/powerflex/provider/user_resource.go b/powerflex/provider/user_resource.go index d594a59d..1cf24ade 100644 --- a/powerflex/provider/user_resource.go +++ b/powerflex/provider/user_resource.go @@ -53,8 +53,8 @@ func (r *userResource) Metadata(_ context.Context, req resource.MetadataRequest, func (r *userResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - Description: "This resource can be used to manage user on a PowerFlex array.", - MarkdownDescription: "This resource can be used to manage user on a PowerFlex array.", + Description: "This resource is used to manage the User entity of PowerFlex Array. We can Create, Update and Delete the user using this resource. We can also import an existing user from PowerFlex array. However, password cannot be updated using this resource.", + MarkdownDescription: "This resource is used to manage the User entity of PowerFlex Array. We can Create, Update and Delete the user using this resource. We can also import an existing user from PowerFlex array.However, password cannot be updated using this resource.", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Description: "The ID of the user.", diff --git a/powerflex/provider/volume_datasource_schema.go b/powerflex/provider/volume_datasource_schema.go index 1786613c..0f374b4d 100644 --- a/powerflex/provider/volume_datasource_schema.go +++ b/powerflex/provider/volume_datasource_schema.go @@ -26,8 +26,8 @@ import ( // VolumeDataSourceSchema is the schema for reading the volume data var VolumeDataSourceSchema schema.Schema = schema.Schema{ - Description: "This data-source can be used to fetch information related to volumes from a PowerFlex array.", - MarkdownDescription: "This data-source can be used to fetch information related to volumes from a PowerFlex array.", + Description: "This datasource is used to query the existing volume from PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block.", + MarkdownDescription: "This datasource is used to query the existing volume from PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block.", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Description: "Unique identifier of the volume instance." + diff --git a/powerflex/provider/volume_resource_schema.go b/powerflex/provider/volume_resource_schema.go index f66dfcd6..04ac0156 100644 --- a/powerflex/provider/volume_resource_schema.go +++ b/powerflex/provider/volume_resource_schema.go @@ -31,8 +31,8 @@ import ( // VolumeResourceSchema variable to define schema for the volume resource var VolumeResourceSchema schema.Schema = schema.Schema{ - Description: "This resource can be used to manage volumes on a PowerFlex array.", - MarkdownDescription: "This resource can be used to manage volumes on a PowerFlex array.", + Description: "This resource is used to manage the Volume entity of PowerFlex Array. We can Create, Update and Delete the volume using this resource. We can also import an existing volume from PowerFlex array.", + MarkdownDescription: "This resource is used to manage the Volume entity of PowerFlex Array. We can Create, Update and Delete the volume using this resource. We can also import an existing volume from PowerFlex array.", Attributes: map[string]schema.Attribute{ "name": schema.StringAttribute{ Description: "The name of the volume.", diff --git a/powerflex/provider/vtree_datasource.go b/powerflex/provider/vtree_datasource.go index 42535d96..e0487aad 100644 --- a/powerflex/provider/vtree_datasource.go +++ b/powerflex/provider/vtree_datasource.go @@ -159,8 +159,8 @@ func (d *vtreeDataSource) Read(ctx context.Context, req datasource.ReadRequest, // VTreeDataSourceSchema defines the schema for VTree data source var VTreeDataSourceSchema schema.Schema = schema.Schema{ - Description: "This datasource can be used to fetch information related to VTrees from a PowerFlex array.", - MarkdownDescription: "This datasource can be used to fetch information related to VTrees from a PowerFlex array.", + Description: "This datasource is used to query the existing vtrees from PowerFlex array. The information fetched from this datasource can be used for getting the details.", + MarkdownDescription: "This datasource is used to query the existing vtrees from PowerFlex array. The information fetched from this datasource can be used for getting the details.", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Description: "Placeholder identifier attribute.", diff --git a/templates/data-sources/device.md.tmpl b/templates/data-sources/device.md.tmpl new file mode 100644 index 00000000..9dab7d5c --- /dev/null +++ b/templates/data-sources/device.md.tmpl @@ -0,0 +1,41 @@ +--- +# Copyright (c) 2023 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. + +title: "{{.Name }} {{.Type | lower}}" +linkTitle: "{{.Name}}" +page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" +subcategory: "" +description: |- +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} +--- + +# {{.Name }} ({{.Type}}) + +{{ .Description | trimspace }} + +> **Note:** Only one of `name` and `id` can be provided at a time. + +{{ if .HasExample -}} +## Example Usage + +{{tffile .ExampleFile }} +{{- end }} + +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_device.dev.attribute_name` where attribute_name is the attribute which user wants to fetch. + +{{ .SchemaMarkdown | trimspace }} + + diff --git a/templates/data-sources/protection_domain.md.tmpl b/templates/data-sources/protection_domain.md.tmpl index e9af784d..168343d7 100644 --- a/templates/data-sources/protection_domain.md.tmpl +++ b/templates/data-sources/protection_domain.md.tmpl @@ -26,7 +26,7 @@ description: |- {{ .Description | trimspace }} -~> **Note:** Only one of `name` and `id` can be provided at a time. +> **Note:** Only one of `name` and `id` can be provided at a time. {{ if .HasExample -}} ## Example Usage @@ -34,6 +34,8 @@ description: |- {{tffile .ExampleFile }} {{- end }} +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_protection_domain.pd.attribute_name` where attribute_name is the attribute which user wants to fetch. + {{ .SchemaMarkdown | trimspace }} diff --git a/templates/data-sources/sdc.md.tmpl b/templates/data-sources/sdc.md.tmpl index e9af784d..3eb022df 100644 --- a/templates/data-sources/sdc.md.tmpl +++ b/templates/data-sources/sdc.md.tmpl @@ -26,7 +26,7 @@ description: |- {{ .Description | trimspace }} -~> **Note:** Only one of `name` and `id` can be provided at a time. +> **Note:** Only one of `name` and `id` can be provided at a time. {{ if .HasExample -}} ## Example Usage @@ -34,6 +34,8 @@ description: |- {{tffile .ExampleFile }} {{- end }} +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_sdc.selected.attribute_name` where attribute_name is the attribute which user wants to fetch. + {{ .SchemaMarkdown | trimspace }} diff --git a/templates/data-sources/sds.md.tmpl b/templates/data-sources/sds.md.tmpl index 4439df3f..b4475a53 100644 --- a/templates/data-sources/sds.md.tmpl +++ b/templates/data-sources/sds.md.tmpl @@ -26,9 +26,9 @@ description: |- {{ .Description | trimspace }} -~> **Note:** Exactly one of `protection_domain_name` and `protection_domain_id` is required. +> **Note:** Exactly one of `protection_domain_name` and `protection_domain_id` is required. -~> **Note:** Only one of `sds_names` and `sds_ids` can be provided at a time. +> **Note:** Only one of `sds_names` and `sds_ids` can be provided at a time. {{ if .HasExample -}} ## Example Usage @@ -36,6 +36,8 @@ description: |- {{tffile .ExampleFile }} {{- end }} +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_sds.example2.attribute_name` where attribute_name is the attribute which user wants to fetch. + {{ .SchemaMarkdown | trimspace }} diff --git a/templates/data-sources/snapshot_policy.md.tmpl b/templates/data-sources/snapshot_policy.md.tmpl index e9af784d..b3e77a01 100644 --- a/templates/data-sources/snapshot_policy.md.tmpl +++ b/templates/data-sources/snapshot_policy.md.tmpl @@ -26,7 +26,7 @@ description: |- {{ .Description | trimspace }} -~> **Note:** Only one of `name` and `id` can be provided at a time. +> **Note:** Only one of `name` and `id` can be provided at a time. {{ if .HasExample -}} ## Example Usage @@ -34,6 +34,8 @@ description: |- {{tffile .ExampleFile }} {{- end }} +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_powerflex_snapshot_policy.sp.attribute_name` where attribute_name is the attribute which user wants to fetch. + {{ .SchemaMarkdown | trimspace }} diff --git a/templates/data-sources/storage_pool.md.tmpl b/templates/data-sources/storage_pool.md.tmpl index 87219d1d..369a95b7 100644 --- a/templates/data-sources/storage_pool.md.tmpl +++ b/templates/data-sources/storage_pool.md.tmpl @@ -26,9 +26,9 @@ description: |- {{ .Description | trimspace }} -~> **Note:** Exactly one of `protection_domain_name` and `protection_domain_id` is required. +> **Note:** Exactly one of `protection_domain_name` and `protection_domain_id` is required. -~> **Note:** Only one of `storage_pool_names` and `storage_pool_ids` can be provided at a time. +> **Note:** Only one of `storage_pool_names` and `storage_pool_ids` can be provided at a time. {{ if .HasExample -}} ## Example Usage @@ -36,6 +36,8 @@ description: |- {{tffile .ExampleFile }} {{- end }} +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_storage_pool.example.attribute_name` where attribute_name is the attribute which user wants to fetch. + {{ .SchemaMarkdown | trimspace }} diff --git a/templates/data-sources/volume.md.tmpl b/templates/data-sources/volume.md.tmpl index 2668a701..20d39430 100644 --- a/templates/data-sources/volume.md.tmpl +++ b/templates/data-sources/volume.md.tmpl @@ -26,7 +26,7 @@ description: |- {{ .Description | trimspace }} -~> **Note:** Only one of `names`, `id`, `storage_pool_id` and `storage_pool_name` can be provided at a time. +> **Note:** Only one of `names`, `id`, `storage_pool_id` and `storage_pool_name` can be provided at a time. {{ if .HasExample -}} ## Example Usage @@ -34,6 +34,8 @@ description: |- {{tffile .ExampleFile }} {{- end }} +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. + {{ .SchemaMarkdown | trimspace }} diff --git a/templates/data-sources/vtree.md.tmpl b/templates/data-sources/vtree.md.tmpl index 5f5f6f03..90dff3de 100644 --- a/templates/data-sources/vtree.md.tmpl +++ b/templates/data-sources/vtree.md.tmpl @@ -32,6 +32,8 @@ description: |- {{tffile .ExampleFile }} {{- end }} +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. + {{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources/cluster.md.tmpl b/templates/resources/cluster.md.tmpl new file mode 100644 index 00000000..c72a8d28 --- /dev/null +++ b/templates/resources/cluster.md.tmpl @@ -0,0 +1,58 @@ +--- +# Copyright (c) 2023 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. + +title: "{{.Name }} {{.Type | lower}}" +linkTitle: "{{.Name }}" +page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" +subcategory: "" +description: |- +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} +--- + +# {{.Name }} ({{.Type}}) + +{{ .Description | trimspace }} + +> **Note:** Gateway server should be installed. + +> **Note:** Support is provided for creating, importing, and deleting operations for this resource. + +> **Note:** If during installation using a Gateway on one server, all binaries are successfully installed, but another server encounters issues during installation, there won't be any rollback function for the server where the installation was successful. + +> **Note:** If any SDR, SDS, or SDC is installed separately and connected to the cluster, during the destroy process, if you encounter any security certificate issues, you will need to resolve them manually by accepting the security certificate. + +> **Note:** During the destroy process, the entire cluster will be destroyed, not just specific individual resources. + +> **Note:** To follow the installation process, you can refer to the [Deployment Guide](https://www.dell.com/support/manuals/en-us/scaleio/pfx_deploy_guide_3.6.x/deploy-powerflex?guid=guid-e9f70972-baac-42c9-9ff9-a3d2b0722f54&lang=en-us) + +{{ if .HasExample -}} +## Example Usage + +{{tffile .ExampleFile }} +{{- end }} + +After the execution of above resource block, Cluster would have been created on the PowerFlex array. For more information, Please check the terraform state file. + +{{ .SchemaMarkdown | trimspace }} + +{{ if .HasImport -}} +## Import + +Import is supported using the following syntax: + +{{codefile "shell" .ImportFile }} + +{{- end }} \ No newline at end of file diff --git a/templates/resources/device.md.tmpl b/templates/resources/device.md.tmpl index 38be08eb..04d81af1 100644 --- a/templates/resources/device.md.tmpl +++ b/templates/resources/device.md.tmpl @@ -26,11 +26,15 @@ description: |- {{ .Description | trimspace }} -!> **Caution:** Device creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. +> **Caution:** Device creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. One can manually remove the taint and try applying the configuration (after making necessary adjustments). If the taint is not removed, terraform will destroy and recreate the resource. -~> **Note:** Exactly one of `storage_pool_name` and `storage_pool_id` is required. Exactly one of `sds_name` and `sds_id` is required. +> **Note:** Exactly one of `storage_pool_name` and `storage_pool_id` is required. Not both can be provided together. + +> **Note:** Exactly one of `sds_name` and `sds_id` is required. Not both can be provided together. + +> **Note:** If `storage_pool_name` is mentioned, we have to specify `protection_domain_id` or `protection_domain_name`. {{ if .HasExample -}} ## Example Usage @@ -38,6 +42,8 @@ If the taint is not removed, terraform will destroy and recreate the resource. {{tffile .ExampleFile }} {{- end }} +After the execution of above resource block, device would have been created on the PowerFlex array. For more information, Please check the terraform state file. + {{ .SchemaMarkdown | trimspace }} {{ if .HasImport -}} diff --git a/templates/resources/mdm_cluster.md.tmpl b/templates/resources/mdm_cluster.md.tmpl index bad654f7..b408bb90 100644 --- a/templates/resources/mdm_cluster.md.tmpl +++ b/templates/resources/mdm_cluster.md.tmpl @@ -26,11 +26,11 @@ description: |- {{ .Description | trimspace }} -!> **Caution:** MDM cluster creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. +> **Caution:** MDM cluster creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. One can manually remove the taint and try applying the configuration (after making necessary adjustments). If the taint is not removed, terraform will destroy and recreate the resource. -~> **Note:** Use of MDM cluster resource requires the presence of the MDM cluster. +> **Note:** Use of MDM cluster resource requires the presence of the MDM cluster. The purpose of this resource is to update MDM cluster, not create or delete. Import operation is not supported for MDM cluster. {{ if .HasExample -}} ## Example Usage @@ -38,6 +38,8 @@ If the taint is not removed, terraform will destroy and recreate the resource. {{tffile .ExampleFile }} {{- end }} +After the execution of the above resource block, the MDM cluster would become a 3-node cluster. For more information, please check the state file. + {{ .SchemaMarkdown | trimspace }} {{ if .HasImport -}} diff --git a/templates/resources/package.md.tmpl b/templates/resources/package.md.tmpl new file mode 100644 index 00000000..5c481292 --- /dev/null +++ b/templates/resources/package.md.tmpl @@ -0,0 +1,47 @@ +--- +# Copyright (c) 2023 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. + +title: "{{.Name }} {{.Type | lower}}" +linkTitle: "{{.Name }}" +page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" +subcategory: "" +description: |- +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} +--- + +# {{.Name }} ({{.Type}}) + +{{ .Description | trimspace }} + + +{{ if .HasExample -}} +## Example Usage + +{{tffile .ExampleFile }} +{{- end }} + +After the execution of above resource block, package would have been uploaded on the PowerFlex Gateway. For more information, Please check the terraform state file. + +{{ .SchemaMarkdown | trimspace }} + +{{ if .HasImport -}} +## Import + +Import is supported using the following syntax: + +{{codefile "shell" .ImportFile }} + +{{- end }} \ No newline at end of file diff --git a/templates/resources/protection_domain.md.tmpl b/templates/resources/protection_domain.md.tmpl index 9e33670e..d32815e5 100644 --- a/templates/resources/protection_domain.md.tmpl +++ b/templates/resources/protection_domain.md.tmpl @@ -26,7 +26,7 @@ description: |- {{ .Description | trimspace }} -!> **Caution:** Protection Domain creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. +> **Caution:** Protection Domain creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. One can manually remove the taint and try applying the configuration (after making necessary adjustments). If the taint is not removed, terraform will destroy and recreate the resource. @@ -36,6 +36,8 @@ If the taint is not removed, terraform will destroy and recreate the resource. {{tffile .ExampleFile }} {{- end }} +After the execution of above resource block, protection domain would have been created on the PowerFlex array. For more information, Please check the terraform state file. + {{ .SchemaMarkdown | trimspace }} {{ if .HasImport -}} diff --git a/templates/resources/sdc.md.tmpl b/templates/resources/sdc.md.tmpl new file mode 100644 index 00000000..40d2445a --- /dev/null +++ b/templates/resources/sdc.md.tmpl @@ -0,0 +1,47 @@ +--- +# Copyright (c) 2023 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. + +title: "{{.Name }} {{.Type | lower}}" +linkTitle: "{{.Name }}" +page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" +subcategory: "" +description: |- +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} +--- + +# {{.Name }} ({{.Type}}) + +{{ .Description | trimspace }} + + +{{ if .HasExample -}} +## Example Usage + +{{tffile .ExampleFile }} +{{- end }} + +After the execution of above resource block, sdc would have been created on the PowerFlex array. For more information, Please check the terraform state file. + +{{ .SchemaMarkdown | trimspace }} + +{{ if .HasImport -}} +## Import + +Import is supported using the following syntax: + +{{codefile "shell" .ImportFile }} + +{{- end }} \ No newline at end of file diff --git a/templates/resources/sdc_volumes_mapping.md.tmpl b/templates/resources/sdc_volumes_mapping.md.tmpl index 29573172..ac43e669 100644 --- a/templates/resources/sdc_volumes_mapping.md.tmpl +++ b/templates/resources/sdc_volumes_mapping.md.tmpl @@ -26,11 +26,13 @@ description: |- {{ .Description | trimspace }} -!> **Caution:** SDC Volume mapping creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. +> **Caution:** SDC Volume mapping creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. One can manually remove the taint and try applying the configuration (after making necessary adjustments). If the taint is not removed, terraform will destroy and recreate the resource. -~> **Note:** Exactly one of `id` and `name` is required. Exactly one of `volume_id` and `volume_name` is required. +> **Note:** Exactly one of `id` or `name` is required. Not both can be provided together. + +> **Note:** Exactly one of `volume_id` or `volume_name` is required. Not both can be provided together. {{ if .HasExample -}} ## Example Usage @@ -38,6 +40,8 @@ If the taint is not removed, terraform will destroy and recreate the resource. {{tffile .ExampleFile }} {{- end }} +After the execution of above resource block, two volumes would have been mapped to SDC on the PowerFlex array. For more information, Please check the terraform state file + {{ .SchemaMarkdown | trimspace }} {{ if .HasImport -}} diff --git a/templates/resources/sds.md.tmpl b/templates/resources/sds.md.tmpl index 47745eb3..f4c262e8 100644 --- a/templates/resources/sds.md.tmpl +++ b/templates/resources/sds.md.tmpl @@ -26,18 +26,20 @@ description: |- {{ .Description | trimspace }} -~> **Note:** Exactly one of `protection_domain_name` and `protection_domain_id` is required. - -!> **Caution:** SDS creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. +> **Caution:** SDS creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. One can manually remove the taint and try applying the configuration (after making necessary adjustments). If the taint is not removed, terraform will destroy and recreate the resource. +> **Note:** Exactly one of `protection_domain_name` and `protection_domain_id` is required. + {{ if .HasExample -}} ## Example Usage {{tffile .ExampleFile }} {{- end }} +After the execution of above resource block, sds would have been created on the PowerFlex array. For more information, Please check the terraform state file. + {{ .SchemaMarkdown | trimspace }} {{ if .HasImport -}} diff --git a/templates/resources/snapshot.md.tmpl b/templates/resources/snapshot.md.tmpl index 79ece1a6..2915c94c 100644 --- a/templates/resources/snapshot.md.tmpl +++ b/templates/resources/snapshot.md.tmpl @@ -26,11 +26,11 @@ description: |- {{ .Description | trimspace }} -!> **Caution:** Snapshot creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. +> **Caution:** Snapshot creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. One can manually remove the taint and try applying the configuration (after making necessary adjustments). If the taint is not removed, terraform will destroy and recreate the resource. -~> **Note:** Exactly one of `volume_name` and `volume_id` is required. +> **Note:** Exactly one of `volume_name` and `volume_id` is required. In case of partial create/update operation, retention will not be set. {{ if .HasExample -}} @@ -39,6 +39,8 @@ In case of partial create/update operation, retention will not be set. {{tffile .ExampleFile }} {{- end }} +After the execution of above resource block, snapshot would have been created on the PowerFlex array. For more information, Please check the terraform state file. + {{ .SchemaMarkdown | trimspace }} {{ if .HasImport -}} diff --git a/templates/resources/storage_pool.md.tmpl b/templates/resources/storage_pool.md.tmpl index 689c0626..2bbc9e72 100644 --- a/templates/resources/storage_pool.md.tmpl +++ b/templates/resources/storage_pool.md.tmpl @@ -26,11 +26,11 @@ description: |- {{ .Description | trimspace }} -!> **Caution:** Storage Pool creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. +> **Caution:** Storage Pool creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. One can manually remove the taint and try applying the configuration (after making necessary adjustments). If the taint is not removed, terraform will destroy and recreate the resource. -~> **Note:** Exactly one of `protection_domain_name` and `protection_domain_id` is required. +> **Note:** Exactly one of `protection_domain_name` or `protection_domain_id` is required. Not both can be provided together. {{ if .HasExample -}} ## Example Usage @@ -38,6 +38,8 @@ If the taint is not removed, terraform will destroy and recreate the resource. {{tffile .ExampleFile }} {{- end }} +After the execution of above resource block, storage pool would have been created on the PowerFlex array. For more information, Please check the terraform state file. + {{ .SchemaMarkdown | trimspace }} {{ if .HasImport -}} diff --git a/templates/resources/user.md.tmpl b/templates/resources/user.md.tmpl new file mode 100644 index 00000000..1d2d49f5 --- /dev/null +++ b/templates/resources/user.md.tmpl @@ -0,0 +1,46 @@ +--- +# Copyright (c) 2023 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. + +title: "{{.Name }} {{.Type | lower}}" +linkTitle: "{{.Name }}" +page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" +subcategory: "" +description: |- +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} +--- + +# {{.Name }} ({{.Type}}) + +{{ .Description | trimspace }} + +{{ if .HasExample -}} +## Example Usage + +{{tffile .ExampleFile }} +{{- end }} + +After the execution of above resource block, new user would have been created on the PowerFlex array. For more information, Please check the terraform state file. + +{{ .SchemaMarkdown | trimspace }} + +{{ if .HasImport -}} +## Import + +Import is supported using the following syntax: + +{{codefile "shell" .ImportFile }} + +{{- end }} \ No newline at end of file diff --git a/templates/resources/volume.md.tmpl b/templates/resources/volume.md.tmpl index 2e5c54aa..73c5d54b 100644 --- a/templates/resources/volume.md.tmpl +++ b/templates/resources/volume.md.tmpl @@ -26,11 +26,12 @@ description: |- {{ .Description | trimspace }} -!> **Caution:** Volume creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. +> **Caution:** Volume creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. One can manually remove the taint and try applying the configuration (after making necessary adjustments). If the taint is not removed, terraform will destroy and recreate the resource. -~> **Note:** Exactly one of `protection_domain_name` and `protection_domain_id` and exactly one of `storage_pool_name` and `storage_pool_id` are required. +> **Note:** Exactly one of `protection_domain_name` or `protection_domain_id` is required. Not both can be provided together. +> **Note:** Exactly one of `storage_pool_name` or `storage_pool_id` are required. Not both can be provided together. {{ if .HasExample -}} ## Example Usage @@ -38,6 +39,8 @@ If the taint is not removed, terraform will destroy and recreate the resource. {{tffile .ExampleFile }} {{- end }} +After the execution of above resource block, volume would have been created on the PowerFlex array. For more information, Please check the terraform state file. + {{ .SchemaMarkdown | trimspace }} {{ if .HasImport -}}