Skip to content

Commit 0a84a14

Browse files
authored
Ensure state and actual resource are consistent (#245)
- Ensure state and actual resources are consistent for partial update - Update NVMe related datasource/resource docs - Update dependencies
1 parent 6952be4 commit 0a84a14

File tree

20 files changed

+118
-87
lines changed

20 files changed

+118
-87
lines changed

docs/data-sources/nvme_host.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ description: |-
2626

2727
This datasource is used to query the existing NVMe hosts from the PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block.
2828

29+
> **Note:**
30+
NVMe over TCP is supported in PowerFlex 4.0 and later versions, therefore this datasource is not supported in PowerFlex 3.x.
31+
2932
## Example Usage
3033

3134
```terraform
@@ -55,6 +58,8 @@ data "powerflex_nvme_host" "example1" {
5558
// If multiple filter fields are provided then it will show the intersection of all of those fields.
5659
// If there is no intersection between the filters then an empty datasource will be returned
5760
// For more information about how we do our datasource filtering check out our guides: https://dell.github.io/terraform-docs/docs/storage/platforms/powerflex/product_guide/examples/
61+
// Please note that NVMe over TCP is supported in PowerFlex 4.0 and later versions, therefore this datasource is not supported in PowerFlex 3.x.
62+
5863
data "powerflex_nvme_host" "example2" {
5964
filter {
6065
name = ["name1", "name2"]

docs/data-sources/nvme_target.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ description: |-
2626

2727
This datasource is used to query the existing NVMe targets from the PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block.
2828

29+
> **Note:**
30+
NVMe over TCP is supported in PowerFlex 4.0 and later versions, therefore this datasource is not supported in PowerFlex 3.x.
31+
2932
## Example Usage
3033

3134
```terraform
@@ -55,6 +58,8 @@ data "powerflex_nvme_target" "example1" {
5558
// If multiple filter fields are provided then it will show the intersection of all of those fields.
5659
// If there is no intersection between the filters then an empty datasource will be returned
5760
// For more information about how we do our datasource filtering check out our guides: https://dell.github.io/terraform-docs/docs/storage/platforms/powerflex/product_guide/examples/
61+
// Please note that NVMe over TCP is supported in PowerFlex 4.0 and later versions, therefore this datasource is not supported in PowerFlex 3.x.
62+
5863
data "powerflex_nvme_target" "example" {
5964
filter {
6065
name = ["name1", "name2"]

docs/resources/cluster.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ This terraform resource is used to deploy the PowerFlex Cluster. We can Create a
4646

4747
9. To follow the installation process, you can refer to the [Deployment Guide 3.x](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) & [Deployment Guide 4.x](https://www.dell.com/support/manuals/en-us/scaleio/powerflex_install_upgrade_guide_4.5.x/introduction?guid=guid-e798f431-7df4-450c-8f86-60ee7f3d1e3e&lang=en-us)
4848

49+
10. NVMe over TCP is supported in PowerFlex 4.0 and later versions, therefore SDT deployment is not supported in PowerFlex 3.x.
50+
4951
## Example Usage
5052

5153
```terraform

docs/resources/nvme_host.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ description: |-
2626

2727
This resource is used to manager NVMe host from the PowerFlex array. We can Create, Update and Delete the PowerFlex NVMe host using this resource. We can also import an existing NVMe host from PowerFlex array.
2828

29-
Please note that due to certain limitations, updating the NVMe host in PowerFlex versions earlier than 4.6 is not supported
29+
> **Note:**
30+
> - NVMe over TCP is supported in PowerFlex 4.0 and later versions, therefore this resource is not supported in PowerFlex 3.x.
31+
> - Due to certain limitations, updating the NVMe host in PowerFlex versions earlier than 4.6 is not supported
32+
3033

3134
## Example Usage
3235

@@ -53,7 +56,9 @@ limitations under the License.
5356
# To import , check import.sh for more info
5457
# nqn is the required parameter to create
5558
# To check which attributes can be updated, please refer Product Guide in the documentation
56-
# Please note that due to certain limitations, updating the NVMe host in PowerFlex versions earlier than 4.6 is not supported
59+
# Please note that
60+
# 1. NVMe over TCP is supported in PowerFlex 4.0 and later versions, therefore this resource is not supported in PowerFlex 3.x.
61+
# 2. Due to certain limitations, updating the NVMe host in PowerFlex versions earlier than 4.6 is not supported
5762
5863
# Example for adding NVMe host.
5964
resource "powerflex_nvme_host" "test-nvme-host" {

docs/resources/nvme_target.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,14 @@ description: |-
2727
This resource is used to manager NVMe target from the PowerFlex array. We can Create, Update and Delete the PowerFlex NVMe target using this resource. We can also import an existing NVMe target from PowerFlex array.
2828
**Note:** Either `protection_domain_id` or `protection_domain_name` must be specified.
2929

30-
To avoid potential issues, it is recommended to operate NVMe targets using the default ports.
30+
> **Caution:** <span style='color: red;' >NVMe target creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted.
31+
One can manually remove the taint and try applying the configuration (after making necessary adjustments).
32+
If the taint is not removed, terraform will destroy and recreate the resource.</span>
33+
34+
> **Note:**
35+
> - Either `protection_domain_name` and `protection_domain_id` is required. But not both.
36+
> - NVMe over TCP is supported in PowerFlex 4.0 and later versions, therefore this resource is not supported in PowerFlex 3.x.
37+
> - To avoid potential issues, it is recommended to operate NVMe targets using the default ports.
3138
3239
## Example Usage
3340

@@ -54,6 +61,7 @@ limitations under the License.
5461
# To import , check import.sh for more info.
5562
# name and ip_list attributes are required, and either protection_domain_name or protection_domain_id must be specified.
5663
# To check which attributes can be updated, please refer Product Guide in the documentation
64+
# Please note that NVMe over TCP is supported in PowerFlex 4.0 and later versions, therefore this resource is not supported in PowerFlex 3.x.
5765
# To avoid potential issues, it is recommended to operate NVMe targets using the default ports.
5866
5967
# Example for adding NVMe target.

examples/data-sources/powerflex_nvme_host/data-source.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ data "powerflex_nvme_host" "example1" {
2424
// If multiple filter fields are provided then it will show the intersection of all of those fields.
2525
// If there is no intersection between the filters then an empty datasource will be returned
2626
// For more information about how we do our datasource filtering check out our guides: https://dell.github.io/terraform-docs/docs/storage/platforms/powerflex/product_guide/examples/
27+
// Please note that NVMe over TCP is supported in PowerFlex 4.0 and later versions, therefore this datasource is not supported in PowerFlex 3.x.
28+
2729
data "powerflex_nvme_host" "example2" {
2830
filter {
2931
name = ["name1", "name2"]

examples/data-sources/powerflex_nvme_target/data-source.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ data "powerflex_nvme_target" "example1" {
2424
// If multiple filter fields are provided then it will show the intersection of all of those fields.
2525
// If there is no intersection between the filters then an empty datasource will be returned
2626
// For more information about how we do our datasource filtering check out our guides: https://dell.github.io/terraform-docs/docs/storage/platforms/powerflex/product_guide/examples/
27+
// Please note that NVMe over TCP is supported in PowerFlex 4.0 and later versions, therefore this datasource is not supported in PowerFlex 3.x.
28+
2729
data "powerflex_nvme_target" "example" {
2830
filter {
2931
name = ["name1", "name2"]

examples/resources/powerflex_nvme_host/resource.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ limitations under the License.
2020
# To import , check import.sh for more info
2121
# nqn is the required parameter to create
2222
# To check which attributes can be updated, please refer Product Guide in the documentation
23-
# Please note that due to certain limitations, updating the NVMe host in PowerFlex versions earlier than 4.6 is not supported
23+
# Please note that
24+
# 1. NVMe over TCP is supported in PowerFlex 4.0 and later versions, therefore this resource is not supported in PowerFlex 3.x.
25+
# 2. Due to certain limitations, updating the NVMe host in PowerFlex versions earlier than 4.6 is not supported
2426

2527
# Example for adding NVMe host.
2628
resource "powerflex_nvme_host" "test-nvme-host" {

examples/resources/powerflex_nvme_target/resource.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ limitations under the License.
2020
# To import , check import.sh for more info.
2121
# name and ip_list attributes are required, and either protection_domain_name or protection_domain_id must be specified.
2222
# To check which attributes can be updated, please refer Product Guide in the documentation
23+
# Please note that NVMe over TCP is supported in PowerFlex 4.0 and later versions, therefore this resource is not supported in PowerFlex 3.x.
2324
# To avoid potential issues, it is recommended to operate NVMe targets using the default ports.
2425

2526
# Example for adding NVMe target.

go.mod

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ require (
88
github.com/bramvdbogaerde/go-scp v1.5.0
99
github.com/bytedance/mockey v1.2.13
1010
github.com/dell/goscaleio v1.17.1-0.20241116014606-58a85e67edac
11-
github.com/hashicorp/terraform-plugin-framework v1.11.0
12-
github.com/hashicorp/terraform-plugin-framework-validators v0.13.0
13-
github.com/hashicorp/terraform-plugin-go v0.23.0
11+
github.com/hashicorp/terraform-plugin-framework v1.13.0
12+
github.com/hashicorp/terraform-plugin-framework-validators v0.15.0
13+
github.com/hashicorp/terraform-plugin-go v0.25.0
1414
github.com/hashicorp/terraform-plugin-log v0.9.0
1515
github.com/hashicorp/terraform-plugin-testing v1.10.0
1616
github.com/masterzen/winrm v0.0.0-20240702205601-3fad6e106085
1717
github.com/packer-community/winrmcp v0.0.0-20221126162354-6e900dd2c68f
1818
github.com/stretchr/testify v1.9.0
19-
golang.org/x/crypto v0.26.0
19+
golang.org/x/crypto v0.29.0
2020
)
2121

2222
require (
@@ -57,9 +57,9 @@ require (
5757
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
5858
golang.org/x/arch v0.11.0 // indirect
5959
golang.org/x/mod v0.19.0 // indirect
60-
golang.org/x/sync v0.8.0 // indirect
60+
golang.org/x/sync v0.9.0 // indirect
6161
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
62-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect
62+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect
6363
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
6464
gopkg.in/yaml.v3 v3.0.1 // indirect
6565
)
@@ -76,7 +76,7 @@ require (
7676
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
7777
github.com/hashicorp/go-hclog v1.6.3 // indirect
7878
github.com/hashicorp/go-multierror v1.1.1 // indirect
79-
github.com/hashicorp/go-plugin v1.6.0 // indirect
79+
github.com/hashicorp/go-plugin v1.6.2 // indirect
8080
github.com/hashicorp/go-uuid v1.0.3 // indirect
8181
github.com/hashicorp/go-version v1.7.0 // indirect
8282
github.com/hashicorp/hc-install v0.8.0 // indirect
@@ -94,12 +94,12 @@ require (
9494
github.com/sirupsen/logrus v1.9.3 // indirect
9595
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
9696
github.com/zclconf/go-cty v1.15.0 // indirect
97-
golang.org/x/net v0.25.0 // indirect
97+
golang.org/x/net v0.28.0 // indirect
9898
golang.org/x/sys v0.27.0 // indirect
99-
golang.org/x/text v0.17.0 // indirect
99+
golang.org/x/text v0.20.0 // indirect
100100
google.golang.org/appengine v1.6.8 // indirect
101-
google.golang.org/grpc v1.63.2 // indirect
102-
google.golang.org/protobuf v1.34.0 // indirect
101+
google.golang.org/grpc v1.67.1 // indirect
102+
google.golang.org/protobuf v1.35.1 // indirect
103103
)
104104

105105
exclude gopkg.in/yaml.v2 v2.2.2

0 commit comments

Comments
 (0)