diff --git a/go.mod b/go.mod index b1547b47f0..2f341e95f6 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.18 require ( github.com/IBM-Cloud/bluemix-go v0.0.0-20230914140903-40534e34a2a5 github.com/IBM-Cloud/container-services-go-sdk v0.0.0-20230822142550-30562e113de9 - github.com/IBM-Cloud/power-go-client v1.2.4 + github.com/IBM-Cloud/power-go-client v1.4.0 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 176ad812b9..7d5374def5 100644 --- a/go.sum +++ b/go.sum @@ -105,8 +105,8 @@ github.com/IBM-Cloud/bluemix-go v0.0.0-20230914140903-40534e34a2a5/go.mod h1:cO5 github.com/IBM-Cloud/container-services-go-sdk v0.0.0-20230822142550-30562e113de9 h1:sXRzCK3Glxpyu66Tu2NjztLdT5sDwj4qly+MJKRhdWY= github.com/IBM-Cloud/container-services-go-sdk v0.0.0-20230822142550-30562e113de9/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.2.4 h1:4y/ubiOXpMg3xyBryfgfsa8hae/9Dn5WLdvphoxvgsQ= -github.com/IBM-Cloud/power-go-client v1.2.4/go.mod h1:0YVWoIQN5I5IvyhO/m4yxgPJqCh9QjceN2FNlVpYlOQ= +github.com/IBM-Cloud/power-go-client v1.4.0 h1:YZnfb+kzRcHhDQoYGirgKUDf108F0TqWGJgwb28FtxE= +github.com/IBM-Cloud/power-go-client v1.4.0/go.mod h1:5tBI990pkUZo1tKXoAsFDsHzpHcKwP8mRaCgUt3sFtc= 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_image.go b/ibm/service/power/resource_ibm_pi_image.go index 3f83a8df26..36c2ada367 100644 --- a/ibm/service/power/resource_ibm_pi_image.go +++ b/ibm/service/power/resource_ibm_pi_image.go @@ -111,10 +111,11 @@ func ResourceIBMPIImage() *schema.Resource { ForceNew: true, }, helpers.PIImageStorageType: { - Type: schema.TypeString, - Optional: true, - Description: "Type of storage", - ForceNew: true, + Type: schema.TypeString, + Optional: true, + Description: "Type of storage", + RequiredWith: []string{helpers.PIImageBucketName}, + ForceNew: true, }, helpers.PIImageStoragePool: { Type: schema.TypeString, diff --git a/website/docs/r/pi_image.html.markdown b/website/docs/r/pi_image.html.markdown index ecdc35a01b..35987826b7 100644 --- a/website/docs/r/pi_image.html.markdown +++ b/website/docs/r/pi_image.html.markdown @@ -79,7 +79,7 @@ Review the argument references that you can specify for your resource. - `pi_image_secret_key` - (Optional, String, Sensitive) Cloud Object Storage secret key; required for buckets with private access. - `pi_image_secret_key` is required with `pi_image_access_key` - `pi_image_storage_pool` - (Optional, String) Storage pool where the image will be loaded, if provided then `pi_image_storage_type` and `pi_affinity_policy` will be ignored. -- `pi_image_storage_type` - (Optional, String) Type of storage. Will be ignored if `pi_image_storage_pool` or `pi_affinity_policy` is provided. If only using `pi_image_storage_type` for storage selection then the storage pool with the most available space will be selected. +- `pi_image_storage_type` - (Optional, String) Type of storage. Required if `pi_image_storage_pool` or `pi_affinity_policy` is provided when importing an image from cloud storage. ## Attribute reference