diff --git a/go.mod b/go.mod index 5bd188fa96..a784b178ad 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ toolchain go1.22.5 require ( github.com/IBM-Cloud/bluemix-go v0.0.0-20240719075425-078fcb3a55be github.com/IBM-Cloud/container-services-go-sdk v0.0.0-20240725064144-454a2ae23113 - github.com/IBM-Cloud/power-go-client v1.8.0-beta4 + github.com/IBM-Cloud/power-go-client v1.8.1 github.com/IBM/apigateway-go-sdk v0.0.0-20210714141226-a5d5d49caaca github.com/IBM/appconfiguration-go-admin-sdk v0.3.0 github.com/IBM/appid-management-go-sdk v0.0.0-20210908164609-dd0e0eaf732f diff --git a/go.sum b/go.sum index 0c14b47274..6e1a9cdfea 100644 --- a/go.sum +++ b/go.sum @@ -118,8 +118,8 @@ github.com/IBM-Cloud/bluemix-go v0.0.0-20240719075425-078fcb3a55be/go.mod h1:/7h github.com/IBM-Cloud/container-services-go-sdk v0.0.0-20240725064144-454a2ae23113 h1:f2Erqfea1dKpaTFagTJM6W/wnD3JGq/Vn9URh8nuRwk= github.com/IBM-Cloud/container-services-go-sdk v0.0.0-20240725064144-454a2ae23113/go.mod h1:xUQL9SGAjoZFd4GNjrjjtEpjpkgU7RFXRyHesbKTjiY= github.com/IBM-Cloud/ibm-cloud-cli-sdk v0.5.3/go.mod h1:RiUvKuHKTBmBApDMUQzBL14pQUGKcx/IioKQPIcRQjs= -github.com/IBM-Cloud/power-go-client v1.8.0-beta4 h1:mT3UaAo3RIJCsvjDZWQuqjr7CooDmB95VyI1ogKl4IY= -github.com/IBM-Cloud/power-go-client v1.8.0-beta4/go.mod h1:oAkZiHX25cmr2Yun5V0q6CpnUemegvSrpcEy/oQcjzU= +github.com/IBM-Cloud/power-go-client v1.8.1 h1:tx1aPJmIQrNru1MD1VHGNasGx3eRIs0zzPZ0KvdFQrg= +github.com/IBM-Cloud/power-go-client v1.8.1/go.mod h1:N4RxrsMUvBQjSQ/qPk0iMZ8zK+fZPRTnHi/gTaASw0g= github.com/IBM-Cloud/softlayer-go v1.0.5-tf h1:koUAyF9b6X78lLLruGYPSOmrfY2YcGYKOj/Ug9nbKNw= github.com/IBM-Cloud/softlayer-go v1.0.5-tf/go.mod h1:6HepcfAXROz0Rf63krk5hPZyHT6qyx2MNvYyHof7ik4= github.com/IBM/apigateway-go-sdk v0.0.0-20210714141226-a5d5d49caaca h1:crniVcf+YcmgF03NmmfonXwSQ73oJF+IohFYBwknMxs= diff --git a/ibm/service/power/resource_ibm_pi_volume.go b/ibm/service/power/resource_ibm_pi_volume.go index 7d78be9904..7a868ce114 100644 --- a/ibm/service/power/resource_ibm_pi_volume.go +++ b/ibm/service/power/resource_ibm_pi_volume.go @@ -259,7 +259,7 @@ func resourceIBMPIVolumeCreate(ctx context.Context, d *schema.ResourceData, meta body.ReplicationSites = flex.ExpandStringList(v.([]interface{})) } } else { - return diag.Errorf("Replication must be enabled if replication sites are specified.") + return diag.Errorf("Replication (%s) must be enabled if replication sites are specified.", Arg_ReplicationEnabled) } } if ap, ok := d.GetOk(Arg_AffinityPolicy); ok { @@ -346,9 +346,7 @@ func resourceIBMPIVolumeRead(ctx context.Context, d *schema.ResourceData, meta i d.Set(Attr_MirroringState, vol.MirroringState) d.Set(Attr_PrimaryRole, vol.PrimaryRole) d.Set(Arg_ReplicationEnabled, vol.ReplicationEnabled) - if len(vol.ReplicationSites) > 0 { - d.Set(Attr_ReplicationSites, vol.ReplicationSites) - } + d.Set(Attr_ReplicationSites, vol.ReplicationSites) d.Set(Attr_ReplicationStatus, vol.ReplicationStatus) d.Set(Attr_ReplicationType, vol.ReplicationType) d.Set(Attr_VolumeStatus, vol.State) diff --git a/website/docs/r/pi_volume.html.markdown b/website/docs/r/pi_volume.html.markdown index 0b46a901eb..0b60d0dbf5 100644 --- a/website/docs/r/pi_volume.html.markdown +++ b/website/docs/r/pi_volume.html.markdown @@ -60,10 +60,9 @@ Review the argument references that you can specify for your resource. - `pi_cloud_instance_id` - (Required, String) The GUID of the service instance associated with an account. - `pi_replication_enabled` - (Optional, Boolean) Indicates if the volume should be replication enabled or not. - **Note:** `replication_sites` will be populated automatically if set to true and sites are not specified. - -- `pi_replication_sites` - (Optional, List) List of replication sites for volume replication. + **Note:** `replication_sites` will be populated automatically with default sites if set to true and sites are not specified. +- `pi_replication_sites` - (Optional, List) List of replication sites for volume replication. Must set `pi_replication_enabled` to true to use. - `pi_volume_name` - (Required, String) The name of the volume. - `pi_volume_pool` - (Optional, String) Volume pool where the volume will be created; if provided then `pi_affinity_policy` values will be ignored. - `pi_volume_shareable` - (Required, Boolean) If set to **true**, the volume can be shared across Power Systems Virtual Server instances. If set to **false**, you can attach it only to one instance.