Skip to content

Commit

Permalink
addressed reviews for one resource and datasource (#125)
Browse files Browse the repository at this point in the history
* Doc changes
  • Loading branch information
AnikaAgiwal2711 authored Sep 20, 2023
1 parent 06322bd commit d1f7f42
Show file tree
Hide file tree
Showing 84 changed files with 1,529 additions and 578 deletions.
8 changes: 6 additions & 2 deletions docs/data-sources/device.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 generated by tfplugindocs -->
## Schema

Expand Down
8 changes: 5 additions & 3 deletions docs/data-sources/protection_domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 generated by tfplugindocs -->
## Schema

Expand Down
8 changes: 5 additions & 3 deletions docs/data-sources/sdc.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 generated by tfplugindocs -->
## Schema

Expand Down
10 changes: 6 additions & 4 deletions docs/data-sources/sds.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 generated by tfplugindocs -->
## Schema

Expand Down
8 changes: 5 additions & 3 deletions docs/data-sources/snapshot_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 generated by tfplugindocs -->
## Schema

Expand Down
12 changes: 7 additions & 5 deletions docs/data-sources/storage_pool.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 generated by tfplugindocs -->
## Schema

Expand Down
14 changes: 7 additions & 7 deletions docs/data-sources/volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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"
}
Expand All @@ -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 generated by tfplugindocs -->
## Schema

Expand Down
8 changes: 5 additions & 3 deletions docs/data-sources/vtree.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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" {
}
Expand All @@ -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 generated by tfplugindocs -->
## Schema

Expand Down
114 changes: 114 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit d1f7f42

Please sign in to comment.