diff --git a/go.mod b/go.mod index 42e8bb4760..09fcaf5d23 100644 --- a/go.mod +++ b/go.mod @@ -54,7 +54,7 @@ require ( github.com/google/uuid v1.6.0 github.com/hashicorp/go-uuid v1.0.3 github.com/hashicorp/go-version v1.7.0 - github.com/hashicorp/terraform-plugin-sdk/v2 v2.29.0 + github.com/hashicorp/terraform-plugin-sdk/v2 v2.35.0 github.com/jinzhu/copier v0.3.2 github.com/minsikl/netscaler-nitro-go v0.0.0-20170827154432-5b14ce3643e3 github.com/mitchellh/go-homedir v1.1.0 @@ -64,12 +64,20 @@ require ( github.com/rook/rook v1.11.4 github.com/softlayer/softlayer-go v1.0.3 github.com/stretchr/testify v1.9.0 - golang.org/x/crypto v0.28.0 + golang.org/x/crypto v0.29.0 gopkg.in/yaml.v3 v3.0.1 gotest.tools v2.2.0+incompatible k8s.io/api v0.26.3 k8s.io/apimachinery v0.26.3 k8s.io/client-go v0.26.1 +) + +require ( + github.com/hashicorp/terraform-plugin-framework v1.11.0 + github.com/hashicorp/terraform-plugin-framework-validators v0.13.0 + github.com/hashicorp/terraform-plugin-go v0.25.0 + github.com/hashicorp/terraform-plugin-mux v0.16.0 + github.com/hashicorp/terraform-plugin-testing v1.11.0 k8s.io/utils v0.0.0-20230313181309-38a27ef9d749 sigs.k8s.io/controller-runtime v0.14.1 ) @@ -79,7 +87,7 @@ require ( cloud.google.com/go/monitoring v1.13.0 // indirect github.com/Logicalis/asn1 v0.0.0-20190312173541-d60463189a56 // indirect github.com/PromonLogicalis/asn1 v0.0.0-20190312173541-d60463189a56 // indirect - github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect + github.com/ProtonMail/go-crypto v1.1.0-alpha.2 // indirect github.com/agext/levenshtein v1.2.2 // indirect github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 // indirect github.com/apex/log v1.9.0 // indirect @@ -88,7 +96,7 @@ require ( github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v3 v3.2.2 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cloudflare/circl v1.3.7 // indirect github.com/cloudfoundry/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21 // indirect github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect @@ -122,7 +130,7 @@ require ( github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.22.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/gnostic v0.6.9 // indirect github.com/google/go-querystring v1.1.0 // indirect @@ -134,22 +142,21 @@ require ( github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-plugin v1.5.1 // indirect + github.com/hashicorp/go-plugin v1.6.2 // indirect github.com/hashicorp/go-retryablehttp v0.7.7 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7 // indirect github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect github.com/hashicorp/go-sockaddr v1.0.2 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect - github.com/hashicorp/hc-install v0.6.1 // indirect + github.com/hashicorp/hc-install v0.9.0 // indirect github.com/hashicorp/hcl v1.0.1-vault-5 // indirect - github.com/hashicorp/hcl/v2 v2.18.0 // indirect + github.com/hashicorp/hcl/v2 v2.23.0 // indirect github.com/hashicorp/logutils v1.0.0 // indirect - github.com/hashicorp/terraform-exec v0.19.0 // indirect - github.com/hashicorp/terraform-json v0.17.1 // indirect - github.com/hashicorp/terraform-plugin-go v0.19.0 // indirect + github.com/hashicorp/terraform-exec v0.21.0 // indirect + github.com/hashicorp/terraform-json v0.23.0 // indirect github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect - github.com/hashicorp/terraform-registry-address v0.2.2 // indirect + github.com/hashicorp/terraform-registry-address v0.2.3 // indirect github.com/hashicorp/terraform-svchost v0.1.1 // indirect github.com/hashicorp/vault v1.13.7 // indirect github.com/hashicorp/vault/api v1.9.2 // indirect @@ -204,25 +211,27 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect - github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect + github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect - github.com/zclconf/go-cty v1.14.1 // indirect + github.com/zclconf/go-cty v1.15.0 // indirect go.mongodb.org/mongo-driver v1.16.1 // indirect go.opentelemetry.io/otel v1.14.0 // indirect go.opentelemetry.io/otel/trace v1.14.0 // indirect go.uber.org/ratelimit v0.2.0 // indirect golang.org/x/mod v0.21.0 // indirect golang.org/x/net v0.30.0 // indirect - golang.org/x/oauth2 v0.7.0 // indirect + golang.org/x/oauth2 v0.22.0 // indirect + golang.org/x/sync v0.9.0 // indirect golang.org/x/sys v0.28.0 // indirect - golang.org/x/term v0.25.0 // indirect - golang.org/x/text v0.19.0 // indirect + golang.org/x/term v0.26.0 // indirect + golang.org/x/text v0.20.0 // indirect golang.org/x/time v0.3.0 // indirect + golang.org/x/tools v0.26.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect - google.golang.org/grpc v1.57.1 // indirect - google.golang.org/protobuf v1.34.1 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/grpc v1.67.1 // indirect + google.golang.org/protobuf v1.35.1 // indirect gopkg.in/go-playground/validator.v9 v9.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/go.sum b/go.sum index d705306645..a4c985fde5 100644 --- a/go.sum +++ b/go.sum @@ -28,10 +28,12 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.19.1 h1:am86mquDUgjGNWxiGn+5PGLbmgiWXlE/yNWpIpNvuXY= -cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE= +cloud.google.com/go/compute v1.19.0 h1:+9zda3WGgW1ZSTlVppLCYFIr48Pa35q1uG2N1itbCEQ= +cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= +cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= @@ -113,11 +115,15 @@ github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3 github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.4.4/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/IBM-Cloud/bluemix-go v0.0.0-20240926024252-81b3928fd062 h1:VCFztsAnZBuzyVeOrpFEJFPiKDyx6tVOLe+p3VBsfWk= +github.com/IBM-Cloud/bluemix-go v0.0.0-20240926024252-81b3928fd062/go.mod h1:/7hMjdZA6fEpd/dQAOEABxKEwN0t72P3PlpEDu0Y7bE= github.com/IBM-Cloud/bluemix-go v0.0.0-20241117121028-a3be206688b3 h1:eIa+RXJZ188p1S5q+fu3feDiL6dtp0W2IB1LM0B/plE= github.com/IBM-Cloud/bluemix-go v0.0.0-20241117121028-a3be206688b3/go.mod h1:/7hMjdZA6fEpd/dQAOEABxKEwN0t72P3PlpEDu0Y7bE= 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.3 h1:QsBuIS6KvKsiEpe0yiHYKhWgXlqkcJ7XqFHtATj8Yh4= +github.com/IBM-Cloud/power-go-client v1.8.3/go.mod h1:UDyXeIKEp6r7yWUXYu3r0ZnFSlNZ2YeQTHwM2Tmlgv0= github.com/IBM-Cloud/power-go-client v1.9.0 h1:nnErpb/7TJQe8P7OfIlJPhSJVq5oyuCJlMje9Ry6XEY= github.com/IBM-Cloud/power-go-client v1.9.0/go.mod h1:UDyXeIKEp6r7yWUXYu3r0ZnFSlNZ2YeQTHwM2Tmlgv0= github.com/IBM-Cloud/softlayer-go v1.0.5-tf h1:koUAyF9b6X78lLLruGYPSOmrfY2YcGYKOj/Ug9nbKNw= @@ -128,6 +134,8 @@ github.com/IBM/appconfiguration-go-admin-sdk v0.3.0 h1:OqFxnDxro0JiRwHBKytCcseY2 github.com/IBM/appconfiguration-go-admin-sdk v0.3.0/go.mod h1:xPxAYhr/uywUIDEo/JqWbkUdTryPdzRdYBfUpA5IjoE= github.com/IBM/appid-management-go-sdk v0.0.0-20210908164609-dd0e0eaf732f h1:4c1kqY4GqmkQ+tO03rneDb74Tv7BhTj8jDiDB1p8mdM= github.com/IBM/appid-management-go-sdk v0.0.0-20210908164609-dd0e0eaf732f/go.mod h1:d22kTYY7RYBWcQlZpqrSdshpB/lJ16viWS5Sbjtlc8s= +github.com/IBM/cloud-databases-go-sdk v0.7.0 h1:prvLebKD1kcIk81D6yRhOr/TWp1VQJGLhGAasQr7RtA= +github.com/IBM/cloud-databases-go-sdk v0.7.0/go.mod h1:JYucI1PdwqbAd8XGdDAchxzxRP7bxOh1zUnseovHKsc= github.com/IBM/cloud-databases-go-sdk v0.7.1 h1:5kK4/3NUsGxZzmuUe+1ftajpOQbeDVh5VeemrPgROP4= github.com/IBM/cloud-databases-go-sdk v0.7.1/go.mod h1:JYucI1PdwqbAd8XGdDAchxzxRP7bxOh1zUnseovHKsc= github.com/IBM/cloud-db2-go-sdk v0.0.0-20241206113855-40a65de39906 h1:m5V+U7CKclw2CkxfHXW1+KHZB+9cb4tLaDPiF/qBrz4= @@ -136,6 +144,8 @@ github.com/IBM/cloudant-go-sdk v0.8.0 h1:XzaqZFy5fm1Q9+iK52X5zRW39SHaahT9pf5SRgV github.com/IBM/cloudant-go-sdk v0.8.0/go.mod h1:zDGBs8ideVtn9MehXbIQNI3852B68BsMtKJvq3iPn/Q= github.com/IBM/code-engine-go-sdk v0.0.0-20240808131715-b9d168602dac h1:9Y5TB9Ar2SM6JPr2kM6c9pHSdSuHMDCIcbvTa/hNTj4= github.com/IBM/code-engine-go-sdk v0.0.0-20240808131715-b9d168602dac/go.mod h1:sy4CocPPaCiS+T1znqVdw83dkoyxSMUFxkksqahUhbY= +github.com/IBM/configuration-aggregator-go-sdk v0.0.1 h1:bgJqfd39hzKqtLxgrmOZ7UgjhB2lgZ4jWqRfgqa0VTk= +github.com/IBM/configuration-aggregator-go-sdk v0.0.1/go.mod h1:iMQUJgo42cbRk1XW06lmeHzm9/Nfk5/laBscGdPnSqY= github.com/IBM/configuration-aggregator-go-sdk v0.0.2 h1:IRDIrGyLNXq+wQRj/js/Bzr74iQk7xaHiYB8g3TcMyY= github.com/IBM/configuration-aggregator-go-sdk v0.0.2/go.mod h1:Ql2N5j4d4Pj1/GoLzFwZw0DomCG4b1O33kKs3TZ+O+I= github.com/IBM/container-registry-go-sdk v1.1.0 h1:sYyknIod8R4RJZQqAheiduP6wbSTphE9Ag8ho28yXjc= @@ -157,6 +167,8 @@ github.com/IBM/go-sdk-core/v5 v5.7.0/go.mod h1:+YbdhrjCHC84ls4MeBp+Hj4NZCni+tDAc github.com/IBM/go-sdk-core/v5 v5.9.5/go.mod h1:YlOwV9LeuclmT/qi/LAK2AsobbAP42veV0j68/rlZsE= github.com/IBM/go-sdk-core/v5 v5.10.2/go.mod h1:WZPFasUzsKab/2mzt29xPcfruSk5js2ywAPwW4VJjdI= github.com/IBM/go-sdk-core/v5 v5.17.4/go.mod h1:KsAAI7eStAWwQa4F96MLy+whYSh39JzNjklZRbN/8ns= +github.com/IBM/go-sdk-core/v5 v5.18.0 h1:ZB3qaLEsN4fccQWzMblfXeqLx5VztiVi+HfyIqmqask= +github.com/IBM/go-sdk-core/v5 v5.18.0/go.mod h1:3ywpylZ41WhWPusqtpJZWopYlt2brebcphV7mA2JncU= github.com/IBM/go-sdk-core/v5 v5.18.1 h1:wdftQO8xejECTWTKF3FGXyW0McKxxDAopH7MKwA187c= github.com/IBM/go-sdk-core/v5 v5.18.1/go.mod h1:3ywpylZ41WhWPusqtpJZWopYlt2brebcphV7mA2JncU= github.com/IBM/ibm-cos-sdk-go v1.10.3 h1:YfZSLqMiCrqDPbr3r+amY2sicIXlrd+3L5pok6QRXIQ= @@ -174,6 +186,8 @@ github.com/IBM/logs-go-sdk v0.3.0 h1:FHzTCCMyp9DvQGXgkppzcOPywC4ggt7x8xu0MR5h8xI github.com/IBM/logs-go-sdk v0.3.0/go.mod h1:yv/GCXC4/p+MZEeXl4xjZAOMvDAVRwu61WyHZFKFXQM= github.com/IBM/logs-router-go-sdk v1.0.5 h1:r0kC1+HfmSeQCD6zQTUp4PDI/zp4Ueo1Zo19ipHuNlw= github.com/IBM/logs-router-go-sdk v1.0.5/go.mod h1:tCN2vFgu5xG0ob9iJcxi5M4bJ6mWmu3nhmRPnvlwev0= +github.com/IBM/mqcloud-go-sdk v0.1.0 h1:fWt4uisg5GbbsfNmAxx5/6c5gQIPM+VrEsTtnimELeA= +github.com/IBM/mqcloud-go-sdk v0.1.0/go.mod h1:LesMQlKHXvdks4jqQLZH7HfATY5lvTzHuwQU5+y7b2g= github.com/IBM/mqcloud-go-sdk v0.2.0 h1:QOWk8ZGk0QfIL0MOGTKzNdM3Qe0Hk+ifAFtNSFQo5HU= github.com/IBM/mqcloud-go-sdk v0.2.0/go.mod h1:VZQKMtqmcdXKhmLhLiPuS/UHMs/5yo2tA/nD83cQt9E= github.com/IBM/networking-go-sdk v0.49.0 h1:lPS34u3C0JVrbxH+Ulua76Nwl6Frv8BEfq6LRkyvOv0= @@ -196,6 +210,8 @@ github.com/IBM/vmware-go-sdk v0.1.2 h1:5lKWFyInWz9e2hwGsoFTEoLa1jYkD30SReN0fQ10w github.com/IBM/vmware-go-sdk v0.1.2/go.mod h1:2UGPBJju3jiv5VKKBBm9a5L6bzF/aJdKOKAzJ7HaOjA= github.com/IBM/vpc-beta-go-sdk v0.8.0 h1:cEPpv4iw3Ba5W2d0AWg3TIbKeJ8y1nPuUuibR5Jt9eE= github.com/IBM/vpc-beta-go-sdk v0.8.0/go.mod h1:hORgIyTFRzXrZIK9IohaWmCRBBlYiDRagsufi7M6akE= +github.com/IBM/vpc-go-sdk v0.61.0 h1:VXT8ZwOQtl15/RSInj9+Z4OQC/vhE/Owoauu128BO4M= +github.com/IBM/vpc-go-sdk v0.61.0/go.mod h1:swmxiYLT+OfBsBYqJWGeRd6NPmBk4u/het2PZdtzIaw= github.com/IBM/vpc-go-sdk v0.63.1 h1:HqQeq2wGI2pF4y0/m18EaPsOEEXFjyml+xwlLC9AiXE= github.com/IBM/vpc-go-sdk v0.63.1/go.mod h1:VBR6bAznHsNCFA89Ue4JFQpqCcFp8F5neqbCFCyks4Q= github.com/Jeffail/gabs v1.1.1 h1:V0uzR08Hj22EX8+8QMhyI9sX2hwRu+/RJhJUmnwda/E= @@ -206,11 +222,11 @@ github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJ github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= -github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= -github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g= +github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60= -github.com/Masterminds/sprig/v3 v3.2.1 h1:n6EPaDyLSvCEa3frruQvAiHuNp2dhBlMSmkEr+HuzGc= -github.com/Masterminds/sprig/v3 v3.2.1/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= +github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= +github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= github.com/Microsoft/go-winio v0.4.13/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= @@ -221,8 +237,8 @@ github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8 github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PromonLogicalis/asn1 v0.0.0-20190312173541-d60463189a56 h1:zL3Ph7RCZadAPb7QV0gMIDmjuZHFawNhoPZ5erh6TRw= github.com/PromonLogicalis/asn1 v0.0.0-20190312173541-d60463189a56/go.mod h1:nE9BGpMlMfM9Z3U+P+mWtcHNDwHcGctalMx1VTkODAY= -github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg= -github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= +github.com/ProtonMail/go-crypto v1.1.0-alpha.2 h1:bkyFVUP+ROOARdgCiJzNQo2V2kiB97LyUpzH9P6Hrlg= +github.com/ProtonMail/go-crypto v1.1.0-alpha.2/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= @@ -236,8 +252,6 @@ github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWX github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af/go.mod h1:5Jv4cbFiHJMsVxt52+i0Ha45fjshj6wxYr1r19tB9bw= -github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= -github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE= github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= @@ -324,7 +338,6 @@ github.com/briankassouf/jose v0.9.2-0.20180619214549-d2569464773f/go.mod h1:HQhV github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v3 v3.0.0/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= @@ -339,6 +352,8 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chrismalek/oktasdk-go v0.0.0-20181212195951-3430665dfaa0/go.mod h1:5d8DqS60xkj9k3aXfL3+mXBH0DPYO0FQjcKosxl+b/Q= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= @@ -348,7 +363,6 @@ github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6D github.com/circonus-labs/circonusllhist v0.1.3 h1:TJH+oke8D16535+jHExHj4nQvzlZrj7ug5D7I/orNUA= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= github.com/cloudfoundry-community/go-cfclient v0.0.0-20190201205600-f136f9222381/go.mod h1:e5+USP2j8Le2M0Jo3qKPFnNhuo1wueU4nWHCXBOfQ14= @@ -486,6 +500,8 @@ github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUork github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= @@ -507,8 +523,8 @@ github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66D github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= -github.com/go-git/go-git/v5 v5.9.0 h1:cD9SFA7sHVRdJ7AYck1ZaAa/yeuBvGPxwXDL8cxrObY= -github.com/go-git/go-git/v5 v5.9.0/go.mod h1:RKIqga24sWdMGZF+1Ekv9kylsDz6LzdTSI2s/OsZWE0= +github.com/go-git/go-git/v5 v5.12.0 h1:7Md+ndsjrzZxbddRDZjF14qK+NN56sy6wkqaVrjZtys= +github.com/go-git/go-git/v5 v5.12.0/go.mod h1:FTM9VKtnI2m65hNI/TenDDDnUf2Q9FHnXYjuz9i5OEY= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -730,8 +746,9 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -906,8 +923,10 @@ github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9 github.com/hashicorp/go-plugin v1.0.0/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= github.com/hashicorp/go-plugin v1.4.3/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ= -github.com/hashicorp/go-plugin v1.5.1 h1:oGm7cWBaYIp3lJpx1RUEfLWophprE2EV/KUeqBYo+6k= -github.com/hashicorp/go-plugin v1.5.1/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= +github.com/hashicorp/go-plugin v1.6.0 h1:wgd4KxHJTVGGqWBq4QPB1i5BZNEx9BR8+OFmHDmTk8A= +github.com/hashicorp/go-plugin v1.6.0/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= +github.com/hashicorp/go-plugin v1.6.2 h1:zdGAEd0V1lCaU0u+MxWQhtSDQmahpkwOun8U8EiRVog= +github.com/hashicorp/go-plugin v1.6.2/go.mod h1:CkgLQ5CZqNmdL9U9JzM532t8ZiYQ35+pj3b1FD37R0Q= github.com/hashicorp/go-raftchunking v0.6.3-0.20191002164813-7e9e8525653a h1:FmnBDwGwlTgugDGbVxwV8UavqSMACbGrUpfc98yFLR4= github.com/hashicorp/go-raftchunking v0.6.3-0.20191002164813-7e9e8525653a/go.mod h1:xbXnmKqX9/+RhPkJ4zrEx4738HacP72aaUPlT2RZ4sU= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= @@ -967,13 +986,19 @@ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hc-install v0.6.1 h1:IGxShH7AVhPaSuSJpKtVi/EFORNjO+OYVJJrAtGG2mY= -github.com/hashicorp/hc-install v0.6.1/go.mod h1:0fW3jpg+wraYSnFDJ6Rlie3RvLf1bIqVIkzoon4KoVE= +github.com/hashicorp/hc-install v0.8.0 h1:LdpZeXkZYMQhoKPCecJHlKvUkQFixN/nvyR1CdfOLjI= +github.com/hashicorp/hc-install v0.8.0/go.mod h1:+MwJYjDfCruSD/udvBmRB22Nlkwwkwf5sAB6uTIhSaU= +github.com/hashicorp/hc-install v0.9.0 h1:2dIk8LcvANwtv3QZLckxcjyF5w8KVtiMxu6G6eLhghE= +github.com/hashicorp/hc-install v0.9.0/go.mod h1:+6vOP+mf3tuGgMApVYtmsnDoKWMDcFXeTxCACYZ8SFg= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/hcl v1.0.1-vault-5 h1:kI3hhbbyzr4dldA8UdTb7ZlVVlI2DACdCfz31RPDgJM= github.com/hashicorp/hcl v1.0.1-vault-5/go.mod h1:XYhtn6ijBSAj6n4YqAaf7RBPS4I06AItNorpy+MoQNM= -github.com/hashicorp/hcl/v2 v2.18.0 h1:wYnG7Lt31t2zYkcquwgKo6MWXzRUDIeIVU5naZwHLl8= -github.com/hashicorp/hcl/v2 v2.18.0/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE= +github.com/hashicorp/hcl/v2 v2.21.0 h1:lve4q/o/2rqwYOgUg3y3V2YPyD1/zkCLGjIV74Jit14= +github.com/hashicorp/hcl/v2 v2.21.0/go.mod h1:62ZYHrXgPoX8xBnzl8QzbWq4dyDsDtfCRgIq1rbJEvA= +github.com/hashicorp/hcl/v2 v2.22.0 h1:hkZ3nCtqeJsDhPRFz5EA9iwcG1hNWGePOTw6oyul12M= +github.com/hashicorp/hcl/v2 v2.22.0/go.mod h1:62ZYHrXgPoX8xBnzl8QzbWq4dyDsDtfCRgIq1rbJEvA= +github.com/hashicorp/hcl/v2 v2.23.0 h1:Fphj1/gCylPxHutVSEOf2fBOh1VE4AuLV7+kbJf3qos= +github.com/hashicorp/hcl/v2 v2.23.0/go.mod h1:62ZYHrXgPoX8xBnzl8QzbWq4dyDsDtfCRgIq1rbJEvA= github.com/hashicorp/hcp-sdk-go v0.23.0 h1:3WarkQSK0VzxJaH6psHIGQagag3ujL+NjWagZZHpiZM= github.com/hashicorp/hcp-sdk-go v0.23.0/go.mod h1:/9UoDY2FYYA8lFaKBb2HmM/jKYZGANmf65q9QRc/cVw= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= @@ -999,18 +1024,34 @@ github.com/hashicorp/raft-snapshot v1.0.4 h1:EuDuayAJPdiDmVk1ygTDnG2zDzrs0/6/yBu github.com/hashicorp/raft-snapshot v1.0.4/go.mod h1:5sL9eUn72lH5DzsFIJ9jaysITbHksSSszImWSOTC8Ic= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.8.3/go.mod h1:UpNcs7fFbpKIyZaUuSW6EPiH+eZC7OuyFD+wc1oal+k= -github.com/hashicorp/terraform-exec v0.19.0 h1:FpqZ6n50Tk95mItTSS9BjeOVUb4eg81SpgVtZNNtFSM= -github.com/hashicorp/terraform-exec v0.19.0/go.mod h1:tbxUpe3JKruE9Cuf65mycSIT8KiNPZ0FkuTE3H4urQg= -github.com/hashicorp/terraform-json v0.17.1 h1:eMfvh/uWggKmY7Pmb3T85u86E2EQg6EQHgyRwf3RkyA= -github.com/hashicorp/terraform-json v0.17.1/go.mod h1:Huy6zt6euxaY9knPAFKjUITn8QxUFIe9VuSzb4zn/0o= -github.com/hashicorp/terraform-plugin-go v0.19.0 h1:BuZx/6Cp+lkmiG0cOBk6Zps0Cb2tmqQpDM3iAtnhDQU= -github.com/hashicorp/terraform-plugin-go v0.19.0/go.mod h1:EhRSkEPNoylLQntYsk5KrDHTZJh9HQoumZXbOGOXmec= +github.com/hashicorp/terraform-exec v0.21.0 h1:uNkLAe95ey5Uux6KJdua6+cv8asgILFVWkd/RG0D2XQ= +github.com/hashicorp/terraform-exec v0.21.0/go.mod h1:1PPeMYou+KDUSSeRE9szMZ/oHf4fYUmB923Wzbq1ICg= +github.com/hashicorp/terraform-json v0.22.1 h1:xft84GZR0QzjPVWs4lRUwvTcPnegqlyS7orfb5Ltvec= +github.com/hashicorp/terraform-json v0.22.1/go.mod h1:JbWSQCLFSXFFhg42T7l9iJwdGXBYV8fmmD6o/ML4p3A= +github.com/hashicorp/terraform-json v0.23.0 h1:sniCkExU4iKtTADReHzACkk8fnpQXrdD2xoR+lppBkI= +github.com/hashicorp/terraform-json v0.23.0/go.mod h1:MHdXbBAbSg0GvzuWazEGKAn/cyNfIB7mN6y7KJN6y2c= +github.com/hashicorp/terraform-plugin-framework v1.11.0 h1:M7+9zBArexHFXDx/pKTxjE6n/2UCXY6b8FIq9ZYhwfE= +github.com/hashicorp/terraform-plugin-framework v1.11.0/go.mod h1:qBXLDn69kM97NNVi/MQ9qgd1uWWsVftGSnygYG1tImM= +github.com/hashicorp/terraform-plugin-framework-validators v0.13.0 h1:bxZfGo9DIUoLLtHMElsu+zwqI4IsMZQBRRy4iLzZJ8E= +github.com/hashicorp/terraform-plugin-framework-validators v0.13.0/go.mod h1:wGeI02gEhj9nPANU62F2jCaHjXulejm/X+af4PdZaNo= +github.com/hashicorp/terraform-plugin-go v0.23.0 h1:AALVuU1gD1kPb48aPQUjug9Ir/125t+AAurhqphJ2Co= +github.com/hashicorp/terraform-plugin-go v0.23.0/go.mod h1:1E3Cr9h2vMlahWMbsSEcNrOCxovCZhOOIXjFHbjc/lQ= +github.com/hashicorp/terraform-plugin-go v0.25.0 h1:oi13cx7xXA6QciMcpcFi/rwA974rdTxjqEhXJjbAyks= +github.com/hashicorp/terraform-plugin-go v0.25.0/go.mod h1:+SYagMYadJP86Kvn+TGeV+ofr/R3g4/If0O5sO96MVw= github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.29.0 h1:wcOKYwPI9IorAJEBLzgclh3xVolO7ZorYd6U1vnok14= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.29.0/go.mod h1:qH/34G25Ugdj5FcM95cSoXzUgIbgfhVLXCcEcYaMwq8= -github.com/hashicorp/terraform-registry-address v0.2.2 h1:lPQBg403El8PPicg/qONZJDC6YlgCVbWDtNmmZKtBno= -github.com/hashicorp/terraform-registry-address v0.2.2/go.mod h1:LtwNbCihUoUZ3RYriyS2wF/lGPB6gF9ICLRtuDk7hSo= +github.com/hashicorp/terraform-plugin-mux v0.16.0 h1:RCzXHGDYwUwwqfYYWJKBFaS3fQsWn/ZECEiW7p2023I= +github.com/hashicorp/terraform-plugin-mux v0.16.0/go.mod h1:PF79mAsPc8CpusXPfEVa4X8PtkB+ngWoiUClMrNZlYo= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1 h1:G9WAfb8LHeCxu7Ae8nc1agZlQOSCUWsb610iAogBhCs= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1/go.mod h1:xcOSYlRVdPLmDUoqPhO9fiO/YCN/l6MGYeTzGt5jgkQ= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.35.0 h1:wyKCCtn6pBBL46c1uIIBNUOWlNfYXfXpVo16iDyLp8Y= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.35.0/go.mod h1:B0Al8NyYVr8Mp/KLwssKXG1RqnTk7FySqSn4fRuLNgw= +github.com/hashicorp/terraform-plugin-testing v1.3.0 h1:4Pn8fSspPCRUc5zRGPNZYc00VhQmQPEH6y6Pv4e/42M= +github.com/hashicorp/terraform-plugin-testing v1.3.0/go.mod h1:mGOfGFTVIhP9buGPZyDQhmZFIO/Ig8E0Fo694UACr64= +github.com/hashicorp/terraform-plugin-testing v1.11.0 h1:MeDT5W3YHbONJt2aPQyaBsgQeAIckwPX41EUHXEn29A= +github.com/hashicorp/terraform-plugin-testing v1.11.0/go.mod h1:WNAHQ3DcgV/0J+B15WTE6hDvxcUdkPPpnB1FR3M910U= +github.com/hashicorp/terraform-registry-address v0.2.3 h1:2TAiKJ1A3MAkZlH1YI/aTVcLZRu7JseiXNRHbOAyoTI= +github.com/hashicorp/terraform-registry-address v0.2.3/go.mod h1:lFHA76T8jfQteVfT7caREqguFrW3c4MFSPhZB7HHgUM= github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ= github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc= github.com/hashicorp/vault v1.4.2/go.mod h1:500fLOj7p92Ys4X265LizqF78MzmHJUf1jV1zNJt060= @@ -1070,8 +1111,8 @@ github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbg github.com/hokaccha/go-prettyjson v0.0.0-20170213120834-e6b9231a2b1c h1:vlXZsaTgJ55QZrAkOrpq0tsJmuuM4ky5OMZOvXnhvqE= github.com/hokaccha/go-prettyjson v0.0.0-20170213120834-e6b9231a2b1c/go.mod h1:pFlLw2CfqZiIBOx6BuCeRLCrfxBJipTY0nIOF/VbGcI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= -github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4= +github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= @@ -1184,8 +1225,6 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kube-object-storage/lib-bucket-provisioner v0.0.0-20221122204822-d1a8c34382f1 h1:dQEHhTfi+bSIOSViQrKY9PqJvZenD6tFz+3lPzux58o= github.com/kube-object-storage/lib-bucket-provisioner v0.0.0-20221122204822-d1a8c34382f1/go.mod h1:my+EVjOJLeQ9lUR9uVkxRvNNkhO2saSGIgzV8GZT9HY= github.com/kubernetes-csi/external-snapshotter/client/v4 v4.0.0/go.mod h1:YBCo4DoEeDndqvAn6eeu0vWM7QdXmHEeI9cFWplmBys= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= @@ -1386,8 +1425,8 @@ github.com/onsi/gomega v1.27.8/go.mod h1:2J8vzI/s+2shY9XHRApDkdgPo1TKT7P2u6fXeJK github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0= -github.com/onsi/gomega v1.35.1 h1:Cwbd75ZBPxFSuZ6T+rN/WCb/gOc6YgFBXLlZLhC7Ds4= -github.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= +github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= +github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= @@ -1541,8 +1580,8 @@ github.com/sasha-s/go-deadlock v0.2.0/go.mod h1:StQn567HiB1fF2yJ44N9au7wOhrPS3iZ github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= -github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= +github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= github.com/sethvargo/go-limiter v0.7.2 h1:FgC4N7RMpV5gMrUdda15FaFTkQ/L4fEqM7seXMs4oO8= github.com/sethvargo/go-limiter v0.7.2/go.mod h1:C0kbSFbiriE5k2FFOe18M1YZbAR2Fiwf72uGu0CXCcU= github.com/shirou/gopsutil v2.19.9+incompatible h1:IrPVlK4nfwW10DF7pW+7YJKws9NkgNzWozwwWv9FsgY= @@ -1561,8 +1600,8 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/skeema/knownhosts v1.2.0 h1:h9r9cf0+u7wSE+M183ZtMGgOJKiL96brpaz5ekfJCpM= -github.com/skeema/knownhosts v1.2.0/go.mod h1:g4fPeYpque7P0xefxtGzV81ihjC8sX2IqpAoNkjxbMo= +github.com/skeema/knownhosts v1.2.2 h1:Iug2P4fLmDw9f41PB6thxUkNUkJzB5i+1/exaj40L3A= +github.com/skeema/knownhosts v1.2.2/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= github.com/smartystreets/assertions v0.0.0-20180725160413-e900ae048470/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= @@ -1645,8 +1684,8 @@ github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= -github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= -github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= +github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8= +github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/vmware/govmomi v0.18.0 h1:f7QxSmP7meCtoAmiKZogvVbLInT+CZx6Px6K5rYsJZo= @@ -1679,8 +1718,10 @@ github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -github.com/zclconf/go-cty v1.14.1 h1:t9fyA35fwjjUMcmL5hLER+e/rEPqrbCK1/OSE4SI9KA= -github.com/zclconf/go-cty v1.14.1/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= +github.com/zclconf/go-cty v1.15.0 h1:tTCRWxsexYUmtt/wVxgDClUe+uQusuI443uL6e+5sXQ= +github.com/zclconf/go-cty v1.15.0/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= +github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940 h1:4r45xpDWB6ZMSMNJFMOjqrGHynW3DIBuR2H9j0ug+Mo= +github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940/go.mod h1:CmBdvvj3nqzfzJ6nTCIwDTPZ56aVGvDrmztiO5g3qrM= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= @@ -1769,9 +1810,7 @@ golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= @@ -1780,8 +1819,12 @@ golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= +golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= +golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1792,6 +1835,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1827,6 +1872,8 @@ golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1908,6 +1955,8 @@ golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1928,8 +1977,10 @@ golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g= -golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= +golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= +golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= +golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= +golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1949,6 +2000,8 @@ golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= +golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2060,6 +2113,10 @@ golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= @@ -2080,8 +2137,12 @@ golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= +golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= +golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU= +golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2104,8 +2165,12 @@ golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= +golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2197,6 +2262,8 @@ golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= +golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2243,8 +2310,9 @@ google.golang.org/appengine v1.6.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20181219182458-5a97ab628bfb/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= @@ -2293,12 +2361,16 @@ google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 h1:9NWlQfY2ePejTmfwUH1OWwmznFa+0kKcHGPDvcPza9M= -google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 h1:m8v1xLLLzMe1m5P+gCTF8nJB9epwZQUBERm20Oy1poQ= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 h1:0nDDozoAU19Qb2HwhXadU8OcsiO/09cnTqhUtq2MEOM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= +google.golang.org/genproto v0.0.0-20230330154414-c0448cd141ea h1:yJv4O9/Q178wILoVkpoaERo7wMSIAqftxsa4y/5nP+8= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= @@ -2327,8 +2399,10 @@ google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= -google.golang.org/grpc v1.57.1 h1:upNTNqv0ES+2ZOOqACwVtS3Il8M12/+Hz41RCPzAjQg= -google.golang.org/grpc v1.57.1/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -2345,6 +2419,8 @@ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/ibm/acctest/acctestframework.go b/ibm/acctest/acctestframework.go new file mode 100644 index 0000000000..dbe21b5d3e --- /dev/null +++ b/ibm/acctest/acctestframework.go @@ -0,0 +1,62 @@ +// Copyright IBM Corp. 2017, 2021 All Rights Reserved. +// Licensed under the Mozilla Public License v2.0 + +package acctest + +import ( + "context" + "log" + "os" + "sync" + + "github.com/IBM-Cloud/terraform-provider-ibm/ibm/provider" + "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/vpc" + "github.com/hashicorp/terraform-plugin-go/tfprotov6" +) + +func init() { + testlogger := os.Getenv("TF_LOG") + if testlogger != "" { + os.Setenv("IBMCLOUD_BLUEMIX_GO_TRACE", "true") + } +} + +var ( + // ProtoV6ProviderFactories are used to instantiate a provider during + // acceptance testing. The factory function will be invoked for every Terraform + // CLI command executed to create a provider server to which the CLI can reattach. + ProtoV6ProviderFactories map[string]func() (tfprotov6.ProviderServer, error) = protoV6ProviderFactoriesInit(context.Background(), ProviderName) + + // testAccProviderConfigure ensures Provider is only configured once +) + +// testAccProviderConfigure ensures Provider is only configured once +// +// The PreCheck(t) function is invoked for every test and this prevents +// extraneous reconfiguration to the same values each time. However, this does +// not prevent reconfiguration that may happen should the address of +// Provider be errantly reused in ProviderFactories. +var testAccProviderFrameworkConfigure sync.Once + +func protoV6ProviderFactoriesInit(ctx context.Context, providerNames ...string) map[string]func() (tfprotov6.ProviderServer, error) { + // Initialize logging + log.Printf("[INFO] UJJK context is %v", vpc.BeautifyResponse(ctx)) + if testlogger := os.Getenv("TF_LOG"); testlogger != "" { + os.Setenv("IBMCLOUD_BLUEMIX_GO_TRACE", "true") + } + factories := make(map[string]func() (tfprotov6.ProviderServer, error), len(providerNames)) + + for _, name := range providerNames { + factories[name] = func() (tfprotov6.ProviderServer, error) { + providerServerFactory, _, err := provider.ProtoV6ProviderServerFactory(ctx) + + if err != nil { + return nil, err + } + + return providerServerFactory(), nil + } + } + + return factories +} diff --git a/ibm/conns/utils.go b/ibm/conns/utils.go index 7fefb6d9c3..8a2d499b83 100644 --- a/ibm/conns/utils.go +++ b/ibm/conns/utils.go @@ -6,12 +6,12 @@ package conns import ( "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" ) // Used for retry logic on resource timeout. func IsResourceTimeoutError(err error) bool { - timeoutErr, ok := err.(*resource.TimeoutError) + timeoutErr, ok := err.(*retry.TimeoutError) return ok && timeoutErr.LastError == nil } func GetPrivateServiceURLForRegion(region string) (string, error) { diff --git a/ibm/flex/structures.go b/ibm/flex/structures.go index 0580cd7bba..61cdba0c15 100644 --- a/ibm/flex/structures.go +++ b/ibm/flex/structures.go @@ -44,7 +44,9 @@ import ( rg "github.com/IBM/platform-services-go-sdk/resourcemanagerv2" "github.com/apache/openwhisk-client-go/whisk" "github.com/go-openapi/strfmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/sl" @@ -2712,7 +2714,7 @@ func UpdateGlobalTagsUsingCRN(oldList, newList interface{}, meta interface{}, re func WaitForTagsAvailable(meta interface{}, resourceID, resourceType, tagType string, desired *schema.Set, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for tag attachment (%s) to be successful.", resourceID) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pending"}, Target: []string{"success", "error"}, Refresh: tagsRefreshFunc(meta, resourceID, resourceType, tagType, desired), @@ -2723,7 +2725,7 @@ func WaitForTagsAvailable(meta interface{}, resourceID, resourceType, tagType st return stateConf.WaitForState() } -func tagsRefreshFunc(meta interface{}, resourceID, resourceType, tagType string, desired *schema.Set) resource.StateRefreshFunc { +func tagsRefreshFunc(meta interface{}, resourceID, resourceType, tagType string, desired *schema.Set) retry.StateRefreshFunc { return func() (interface{}, string, error) { tags, err := GetGlobalTagsUsingCRN(meta, resourceID, resourceType, tagType) if err != nil { @@ -4612,3 +4614,200 @@ func Stringify(v interface{}) string { } return "" } + +func UpdateGlobalTagsElementsUsingCRN(oldList, newList []attr.Value, meta interface{}, resourceID, resourceType, tagType string) error { + gtClient, err := meta.(conns.ClientSession).GlobalTaggingAPIv1() + if err != nil { + return fmt.Errorf("[ERROR] Error getting global tagging client settings: %s", err) + } + + userDetails, err := meta.(conns.ClientSession).BluemixUserDetails() + if err != nil { + return err + } + acctID := userDetails.UserAccount + + resources := []globaltaggingv1.Resource{} + r := globaltaggingv1.Resource{ResourceID: PtrToString(resourceID), ResourceType: PtrToString(resourceType)} + resources = append(resources, r) + + add, remove, news := processLists(oldList, newList) + + if strings.TrimSpace(tagType) == "" || tagType == "user" { + schematicTags := os.Getenv("IC_ENV_TAGS") + var envTags []string + if schematicTags != "" { + envTags = strings.Split(schematicTags, ",") + add = append(add, envTags...) + } + } + + if len(remove) > 0 { + detachTagOptions := &globaltaggingv1.DetachTagOptions{} + detachTagOptions.Resources = resources + detachTagOptions.TagNames = remove + if len(tagType) > 0 { + detachTagOptions.TagType = PtrToString(tagType) + if tagType == "service" { + detachTagOptions.AccountID = PtrToString(acctID) + } + } + + _, resp, err := gtClient.DetachTag(detachTagOptions) + if err != nil { + return fmt.Errorf("[ERROR] Error detaching database tags %v: %s\n%s", remove, err, resp) + } + for _, v := range remove { + delTagOptions := &globaltaggingv1.DeleteTagOptions{ + TagName: PtrToString(v), + } + _, resp, err := gtClient.DeleteTag(delTagOptions) + if err != nil { + return fmt.Errorf("[ERROR] Error deleting database tag %v: %s\n%s", v, err, resp) + } + } + } + + if len(add) > 0 { + AttachTagOptions := &globaltaggingv1.AttachTagOptions{} + AttachTagOptions.Resources = resources + AttachTagOptions.TagNames = add + if len(tagType) > 0 { + AttachTagOptions.TagType = PtrToString(tagType) + if tagType == "service" { + AttachTagOptions.AccountID = PtrToString(acctID) + } + } + + _, resp, err := gtClient.AttachTag(AttachTagOptions) + if err != nil { + return fmt.Errorf("[ERROR] Error updating database tags %v : %s\n%s", add, err, resp) + } + response, errored := WaitForTagsAvailable(meta, resourceID, resourceType, tagType, news, 30*time.Second) + if errored != nil { + log.Printf(`[ERROR] Error waiting for resource tags %s : %v +%v`, resourceID, errored, response) + } + } + + return nil +} + +func processLists(oldList, newList []attr.Value) ([]string, []string, *schema.Set) { + // Check if either list is nil and assign an empty array if so + if oldList == nil { + oldList = []attr.Value{} + } + if newList == nil { + newList = []attr.Value{} + } + stringSet := &schema.Set{F: schema.HashString} + // Create sets for efficient difference calculation + oldSet := make(map[string]bool) + newSet := make(map[string]bool) + + // Populate the sets + for _, v := range oldList { + if strVal, ok := v.(basetypes.StringValue); ok { + oldSet[strVal.ValueString()] = true + } + } + for _, v := range newList { + if strVal, ok := v.(basetypes.StringValue); ok { + stringSet.Add(strVal.ValueString()) + newSet[strVal.ValueString()] = true + } + } + // Calculate differences + var remove, add []string + // Items in oldList but not in newList (to be removed) + for k := range oldSet { + if !newSet[k] { + remove = append(remove, k) + } + } + // Items in newList but not in oldList (to be added) + for k := range newSet { + if !oldSet[k] { + add = append(add, k) + } + } + return remove, add, stringSet +} + +func GetGlobalTagsElementsUsingCRN(meta interface{}, resourceID, resourceType, tagType string) ([]string, error) { + userDetails, err := meta.(conns.ClientSession).BluemixUserDetails() + if err != nil { + return nil, err + } + accountID := userDetails.UserAccount + ListTagsOptions := &globaltaggingv1.ListTagsOptions{} + if resourceID != "" { + ListTagsOptions.AttachedTo = &resourceID + } + if strings.HasPrefix(resourceType, "Softlayer_") { + ListTagsOptions.Providers = []string{"ims"} + } + if len(tagType) > 0 { + ListTagsOptions.TagType = PtrToString(tagType) + + if tagType == "service" { + ListTagsOptions.AccountID = PtrToString(accountID) + } + } + taggingResult, err := GetGlobalTagsElementsUsingSearchAPI(meta, resourceID, resourceType, tagType) + if err != nil { + return nil, err + } + return taggingResult, nil +} + +func GetGlobalTagsElementsUsingSearchAPI(meta interface{}, resourceID, resourceType, tagType string) ([]string, error) { + + gsClient, err := meta.(conns.ClientSession).GlobalSearchAPIV2() + if err != nil { + return nil, fmt.Errorf("[ERROR] Error getting global search client settings: %s", err) + } + options := globalsearchv2.SearchOptions{} + var query string + if strings.Contains(resourceType, "SoftLayer_") { + query = fmt.Sprintf("doc.id:%s AND family:ims", resourceID) + options.SetQuery(query) + } else { + query = fmt.Sprintf("crn:\"%s\"", resourceID) + options.SetQuery(query) + } + if tagType == "service" { + userDetails, err := meta.(conns.ClientSession).BluemixUserDetails() + if err != nil { + return nil, err + } + options.SetAccountID(userDetails.UserAccount) + } + options.SetFields([]string{"access_tags", "tags", "service_tags"}) + result, resp, err := gsClient.Search(&options) + if err != nil { + return nil, fmt.Errorf("[ERROR] Error to query the tags for the resource: %s %s", err, resp) + } + var taglist []string + var t interface{} + if len(result.Items) > 0 { + if tagType == "access" { + t = result.Items[0].GetProperty("access_tags") + } else if tagType == "service" { + t = result.Items[0].GetProperty("service_tags") + } else { + t = result.Items[0].GetProperty("tags") + } + switch reflect.TypeOf(t).Kind() { + case reflect.Slice: + s := reflect.ValueOf(t) + + for i := 0; i < s.Len(); i++ { + t := fmt.Sprintf("%s", (s.Index(i))) + taglist = append(taglist, t) + } + } + } + return taglist, nil +} diff --git a/ibm/provider/factory.go b/ibm/provider/factory.go new file mode 100644 index 0000000000..7068198e9f --- /dev/null +++ b/ibm/provider/factory.go @@ -0,0 +1,41 @@ +// Copyright IBM Corp. 2024 All Rights Reserved. +// Licensed under the Mozilla Public License v2.0 +package provider + +import ( + "context" + "log" + + "github.com/IBM-Cloud/terraform-provider-ibm/version" + "github.com/hashicorp/terraform-plugin-framework/providerserver" + "github.com/hashicorp/terraform-plugin-go/tfprotov6" + "github.com/hashicorp/terraform-plugin-mux/tf5to6server" + "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" +) + +// ProtoV6ProviderServerFactory returns a muxed terraform-plugin-go protocol v6 provider factory function. +// This factory function is suitable for use with the terraform-plugin-go Serve function. +// The primary (Plugin SDK) provider server is also returned (useful for testing). +func ProtoV6ProviderServerFactory(ctx context.Context) (func() tfprotov6.ProviderServer, *schema.Provider, error) { + primary := New(version.Version)() + upgradedSdkServer, err := tf5to6server.UpgradeServer( + ctx, + primary.GRPCProvider, + ) + if err != nil { + log.Fatal(err) + } + + frameworkServer := providerserver.NewProtocol6(NewFrameworkProvider(version.Version)()) + + muxServer, err := tf6muxserver.NewMuxServer( + ctx, + func() tfprotov6.ProviderServer { return upgradedSdkServer }, + frameworkServer, + ) + if err != nil { + log.Fatal(err) + } + return muxServer.ProviderServer, primary, nil +} diff --git a/ibm/provider/factory_test.go b/ibm/provider/factory_test.go new file mode 100644 index 0000000000..31246d5c7b --- /dev/null +++ b/ibm/provider/factory_test.go @@ -0,0 +1,24 @@ +// Copyright IBM Corp. 2024 All Rights Reserved. +// Licensed under the Mozilla Public License v2.0 + +package provider_test + +import ( + "context" + "testing" + + "github.com/IBM-Cloud/terraform-provider-ibm/ibm/provider" +) + +// go test -bench=BenchmarkProtoV6ProviderServerFactory -benchtime 1x -benchmem -run=Bench -v ./internal/provider +func BenchmarkProtoV6ProviderServerFactory(b *testing.B) { + _, p, err := provider.ProtoV6ProviderServerFactory(context.Background()) + + if err != nil { + b.Fatal(err) + } + + if b.N == 1 { + b.Logf("%d resources, %d data sources", len(p.ResourcesMap), len(p.DataSourcesMap)) + } +} diff --git a/ibm/provider/helpers.go b/ibm/provider/helpers.go new file mode 100644 index 0000000000..5f1dd487ce --- /dev/null +++ b/ibm/provider/helpers.go @@ -0,0 +1,53 @@ +// Copyright IBM Corp. 2024 All Rights Reserved. +// Licensed under the Mozilla Public License v2.0 +package provider + +import ( + "os" + "strconv" + + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" +) + +// GetStringFromEnv checks environment variables for a value if the given StringValue is null +func GetStringFromEnv(value basetypes.StringValue, envVars []string) basetypes.StringValue { + if !value.IsNull() { + return value + } + for _, envVar := range envVars { + if envValue := os.Getenv(envVar); envValue != "" { + return basetypes.NewStringValue(envValue) + } + } + return basetypes.NewStringNull() +} + +// GetInt64FromEnv checks environment variables for a value if the given Int64Value is null +func GetInt64FromEnv(value basetypes.Int64Value, envVars []string) basetypes.Int64Value { + if !value.IsNull() { + return value + } + for _, envVar := range envVars { + if envValue := os.Getenv(envVar); envValue != "" { + if intValue, err := strconv.ParseInt(envValue, 10, 64); err == nil { + return basetypes.NewInt64Value(intValue) + } + } + } + return basetypes.NewInt64Null() +} + +// GetBoolFromEnv checks environment variables for a value if the given BoolValue is null +func GetBoolFromEnv(value basetypes.BoolValue, envVars []string) basetypes.BoolValue { + if !value.IsNull() { + return value + } + for _, envVar := range envVars { + if envValue := os.Getenv(envVar); envValue != "" { + if boolValue, err := strconv.ParseBool(envValue); err == nil { + return basetypes.NewBoolValue(boolValue) + } + } + } + return basetypes.NewBoolNull() +} diff --git a/ibm/provider/provider.go b/ibm/provider/provider.go index f758b20e4c..4630816f5d 100644 --- a/ibm/provider/provider.go +++ b/ibm/provider/provider.go @@ -1640,6 +1640,12 @@ func Provider() *schema.Provider { return &wrappedProvider } +func New(version string) func() *schema.Provider { + return func() *schema.Provider { + return Provider() + } +} + func wrapProvider(provider schema.Provider) schema.Provider { wrappedResourcesMap := map[string]*schema.Resource{} wrappedDataSourcesMap := map[string]*schema.Resource{} diff --git a/ibm/provider/provider_framework.go b/ibm/provider/provider_framework.go new file mode 100644 index 0000000000..cdf2f370c5 --- /dev/null +++ b/ibm/provider/provider_framework.go @@ -0,0 +1,306 @@ +// Copyright IBM Corp. 2024 All Rights Reserved. +// Licensed under the Mozilla Public License v2.0 +package provider + +import ( + "context" + "fmt" + "os" + "time" + + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/provider" + "github.com/hashicorp/terraform-plugin-framework/provider/schema" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-plugin-framework/types" + + "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" + "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/vpc" +) + +// Ensure the implementation satisfies the provider.Provider interface. +var _ provider.Provider = &IbmCloudProvider{} + +type IbmCloudProvider struct { + version string + clientSession interface{} +} + +func NewFrameworkProvider(version string) func() provider.Provider { + return func() provider.Provider { + return &IbmCloudProvider{ + version: version, + } + } +} + +func (p *IbmCloudProvider) Metadata(_ context.Context, _ provider.MetadataRequest, resp *provider.MetadataResponse) { + resp.TypeName = "ibm" + resp.Version = p.version +} + +func (p *IbmCloudProvider) Schema(_ context.Context, _ provider.SchemaRequest, resp *provider.SchemaResponse) { + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + "bluemix_api_key": schema.StringAttribute{ + Optional: true, + Description: "The Bluemix API Key", + DeprecationMessage: "This field is deprecated please use ibmcloud_api_key", + }, + "ibmcloud_api_key": schema.StringAttribute{ + Optional: true, + Description: "The IBM Cloud API Key", + }, + "iam_token": schema.StringAttribute{ + Optional: true, + Description: "IAM Authentication token", + }, + "iam_refresh_token": schema.StringAttribute{ + Optional: true, + Description: "IAM Authentication refresh token", + }, + "iam_profile_id": schema.StringAttribute{ + Optional: true, + Description: "IAM Trusted Profile Authentication token", + }, + "softlayer_username": schema.StringAttribute{ + Optional: true, + Description: "The SoftLayer user name", + DeprecationMessage: "This field is deprecated please use iaas_classic_username", + }, + "iaas_classic_username": schema.StringAttribute{ + Optional: true, + Description: "The Classic Infrastructure API user name", + }, + "softlayer_api_key": schema.StringAttribute{ + Optional: true, + Description: "The SoftLayer API Key", + DeprecationMessage: "This field is deprecated please use iaas_classic_api_key", + }, + "iaas_classic_api_key": schema.StringAttribute{ + Optional: true, + Description: "The Classic Infrastructure API Key", + }, + "softlayer_endpoint_url": schema.StringAttribute{ + Optional: true, + Description: "The Softlayer Endpoint", + DeprecationMessage: "This field is deprecated please use iaas_classic_endpoint_url", + }, + "iaas_classic_endpoint_url": schema.StringAttribute{ + Optional: true, + Description: "The Classic Infrastructure Endpoint", + }, + "softlayer_timeout": schema.Int64Attribute{ + Optional: true, + Description: "The timeout (in seconds) to set for any SoftLayer API calls made.", + DeprecationMessage: "This field is deprecated please use iaas_classic_timeout", + }, + "generation": schema.Int64Attribute{ + Optional: true, + Description: "Generation of Virtual Private Cloud. Default is 2", + DeprecationMessage: "The generation field is deprecated and will be removed after couple of releases", + }, + "iaas_classic_timeout": schema.Int64Attribute{ + Optional: true, + Description: "The timeout (in seconds) to set for any Classic Infrastructure API calls made.", + }, + "bluemix_timeout": schema.Int64Attribute{ + Optional: true, + Description: "The timeout (in seconds) to set for any Bluemix API calls made.", + DeprecationMessage: "This field is deprecated please use ibmcloud_timeout", + }, + "ibmcloud_timeout": schema.Int64Attribute{ + Optional: true, + Description: "The timeout (in seconds) to set for any IBM Cloud API calls made.", + }, + "visibility": schema.StringAttribute{ + Optional: true, + Description: "Visibility of the provider if it is private or public.", + Validators: []validator.String{ + stringvalidator.OneOf("public", "private", "public-and-private"), + }, + }, + "endpoints_file_path": schema.StringAttribute{ + Optional: true, + Description: "Path of the file that contains private and public regional endpoints mapping", + }, + "resource_group": schema.StringAttribute{ + Optional: true, + Description: "The Resource group id.", + }, + "region": schema.StringAttribute{ + Optional: true, + Description: "The IBM cloud Region (for example 'us-south').", + }, + "zone": schema.StringAttribute{ + Optional: true, + Description: "The IBM cloud Region zone (for example 'us-south-1') for power resources.", + }, + "max_retries": schema.Int64Attribute{ + Optional: true, + Description: "The retry count to set for API calls.", + }, + "function_namespace": schema.StringAttribute{ + Optional: true, + Description: "The IBM Cloud Function namespace", + DeprecationMessage: "This field will be deprecated soon", + }, + "riaas_endpoint": schema.StringAttribute{ + Optional: true, + Description: "The next generation infrastructure service endpoint url.", + DeprecationMessage: "This field is deprecated use generation", + }, + }, + } +} + +func (p *IbmCloudProvider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse) { + var config ProviderFrameworkModel + if diags := req.Config.Get(ctx, &config); diags.HasError() { + resp.Diagnostics = diags + return + } + config.IBMCloudAPIKey = GetStringFromEnv(config.IBMCloudAPIKey, []string{"IC_API_KEY", "IBMCLOUD_API_KEY"}) + config.IBMCloudTimeout = GetInt64FromEnv(config.IBMCloudTimeout, []string{"IC_TIMEOUT", "IBMCLOUD_TIMEOUT"}) + config.Region = GetStringFromEnv(config.Region, []string{"IC_REGION", "IBMCLOUD_REGION", "BM_REGION", "BLUEMIX_REGION"}) + config.Zone = GetStringFromEnv(config.Zone, []string{"IC_ZONE", "IBMCLOUD_ZONE"}) + config.ResourceGroup = GetStringFromEnv(config.ResourceGroup, []string{"IC_RESOURCE_GROUP", "IBMCLOUD_RESOURCE_GROUP", "BM_RESOURCE_GROUP", "BLUEMIX_RESOURCE_GROUP"}) + config.IAASClassicAPIKey = GetStringFromEnv(config.IAASClassicAPIKey, []string{"IAAS_CLASSIC_API_KEY"}) + config.IAASClassicUsername = GetStringFromEnv(config.IAASClassicUsername, []string{"IAAS_CLASSIC_USERNAME"}) + config.IAASClassicEndpointURL = GetStringFromEnv(config.IAASClassicEndpointURL, []string{"IAAS_CLASSIC_ENDPOINT_URL"}) + config.IAASClassicTimeout = GetInt64FromEnv(config.IAASClassicTimeout, []string{"IAAS_CLASSIC_TIMEOUT"}) + config.MaxRetries = GetInt64FromEnv(config.MaxRetries, []string{"MAX_RETRIES"}) + config.IAMProfileID = GetStringFromEnv(config.IAMProfileID, []string{"IC_IAM_PROFILE_ID", "IBMCLOUD_IAM_PROFILE_ID"}) + config.IAMToken = GetStringFromEnv(config.IAMToken, []string{"IC_IAM_TOKEN", "IBMCLOUD_IAM_TOKEN"}) + config.IAMRefreshToken = GetStringFromEnv(config.IAMRefreshToken, []string{"IC_IAM_REFRESH_TOKEN", "IBMCLOUD_IAM_REFRESH_TOKEN"}) + config.Visibility = GetStringFromEnv(config.Visibility, []string{"IC_VISIBILITY", "IBMCLOUD_VISIBILITY"}) + config.EndpointsFilePath = GetStringFromEnv(config.EndpointsFilePath, []string{"IC_ENDPOINTS_FILE_PATH", "IBMCLOUD_ENDPOINTS_FILE_PATH"}) + + bluemixAPIKey := config.BluemixAPIKey.ValueString() + if bluemixAPIKey == "" { + bluemixAPIKey = config.IBMCloudAPIKey.ValueString() + } + + iamToken := config.IAMToken.ValueString() + iamRefreshToken := config.IAMRefreshToken.ValueString() + iamTrustedProfileId := config.IAMProfileID.ValueString() + + softlayerUsername := config.SoftLayerUsername.ValueString() + if softlayerUsername == "" { + softlayerUsername = config.IAASClassicUsername.ValueString() + } + + softlayerAPIKey := config.SoftLayerAPIKey.ValueString() + if softlayerAPIKey == "" { + softlayerAPIKey = config.IAASClassicAPIKey.ValueString() + } + + softlayerEndpointUrl := config.SoftLayerEndpointURL.ValueString() + if softlayerEndpointUrl == "" { + softlayerEndpointUrl = config.IAASClassicEndpointURL.ValueString() + } + + softlayerTimeout := int(config.SoftLayerTimeout.ValueInt64()) + if softlayerTimeout == 0 { + softlayerTimeout = int(config.IAASClassicTimeout.ValueInt64()) + } + + bluemixTimeout := int(config.BluemixTimeout.ValueInt64()) + if bluemixTimeout == 0 { + bluemixTimeout = int(config.IBMCloudTimeout.ValueInt64()) + } + + visibility := config.Visibility.ValueString() + endpointsFilePath := config.EndpointsFilePath.ValueString() + resourceGroup := config.ResourceGroup.ValueString() + region := config.Region.ValueString() + zone := config.Zone.ValueString() + retryCount := int(config.MaxRetries.ValueInt64()) + functionNamespace := config.FunctionNamespace.ValueString() + riaasEndpoint := config.RIAASEndpoint.ValueString() + + if functionNamespace == "" { + functionNamespace = os.Getenv("FUNCTION_NAMESPACE") + } + if functionNamespace != "" { + os.Setenv("FUNCTION_NAMESPACE", functionNamespace) + } + + providerConfig := conns.Config{ + BluemixAPIKey: bluemixAPIKey, + Region: region, + ResourceGroup: resourceGroup, + BluemixTimeout: time.Duration(bluemixTimeout) * time.Second, + SoftLayerTimeout: time.Duration(softlayerTimeout) * time.Second, + SoftLayerUserName: softlayerUsername, + SoftLayerAPIKey: softlayerAPIKey, + RetryCount: retryCount, + SoftLayerEndpointURL: softlayerEndpointUrl, + RetryDelay: conns.RetryAPIDelay, + FunctionNameSpace: functionNamespace, + RiaasEndPoint: riaasEndpoint, + IAMToken: iamToken, + IAMRefreshToken: iamRefreshToken, + Zone: zone, + Visibility: visibility, + EndpointsFile: endpointsFilePath, + IAMTrustedProfileID: iamTrustedProfileId, + } + + clientSession, err := providerConfig.ClientSession() + if err != nil { + resp.Diagnostics.AddError( + "Unable to create client session", + fmt.Sprintf("Unable to create client session: %v", err), + ) + return + } + p.clientSession = clientSession +} + +func (p *IbmCloudProvider) DataSources(_ context.Context) []func() datasource.DataSource { + return []func() datasource.DataSource{ + // Add your data sources here + func() datasource.DataSource { + return vpc.NewIsSshKeyDataSource(p.clientSession) + }, + } +} + +func (p *IbmCloudProvider) Resources(_ context.Context) []func() resource.Resource { + return []func() resource.Resource{ + func() resource.Resource { + return vpc.NewSSHKeyResource(p.clientSession) + }, + } + +} + +type ProviderFrameworkModel struct { + BluemixAPIKey types.String `tfsdk:"bluemix_api_key"` + IBMCloudAPIKey types.String `tfsdk:"ibmcloud_api_key"` + IAMToken types.String `tfsdk:"iam_token"` + IAMRefreshToken types.String `tfsdk:"iam_refresh_token"` + IAMProfileID types.String `tfsdk:"iam_profile_id"` + SoftLayerUsername types.String `tfsdk:"softlayer_username"` + IAASClassicUsername types.String `tfsdk:"iaas_classic_username"` + SoftLayerAPIKey types.String `tfsdk:"softlayer_api_key"` + IAASClassicAPIKey types.String `tfsdk:"iaas_classic_api_key"` + SoftLayerEndpointURL types.String `tfsdk:"softlayer_endpoint_url"` + IAASClassicEndpointURL types.String `tfsdk:"iaas_classic_endpoint_url"` + SoftLayerTimeout types.Int64 `tfsdk:"softlayer_timeout"` + IAASClassicTimeout types.Int64 `tfsdk:"iaas_classic_timeout"` + BluemixTimeout types.Int64 `tfsdk:"bluemix_timeout"` + IBMCloudTimeout types.Int64 `tfsdk:"ibmcloud_timeout"` + Visibility types.String `tfsdk:"visibility"` + EndpointsFilePath types.String `tfsdk:"endpoints_file_path"` + ResourceGroup types.String `tfsdk:"resource_group"` + Region types.String `tfsdk:"region"` + Zone types.String `tfsdk:"zone"` + MaxRetries types.Int64 `tfsdk:"max_retries"` + Generation types.Int64 `tfsdk:"generation"` + FunctionNamespace types.String `tfsdk:"function_namespace"` + RIAASEndpoint types.String `tfsdk:"riaas_endpoint"` +} diff --git a/ibm/service/apigateway/data_source_ibm_api_gateway_test.go b/ibm/service/apigateway/data_source_ibm_api_gateway_test.go index 5b286d75d9..cc6f52a8ec 100644 --- a/ibm/service/apigateway/data_source_ibm_api_gateway_test.go +++ b/ibm/service/apigateway/data_source_ibm_api_gateway_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMAPIGatewayDataSource_basic(t *testing.T) { diff --git a/ibm/service/apigateway/resource_ibm_api_gateway_endpoint_subscription_test.go b/ibm/service/apigateway/resource_ibm_api_gateway_endpoint_subscription_test.go index 67921150ba..4187decc30 100644 --- a/ibm/service/apigateway/resource_ibm_api_gateway_endpoint_subscription_test.go +++ b/ibm/service/apigateway/resource_ibm_api_gateway_endpoint_subscription_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" apigatewaysdk "github.com/IBM/apigateway-go-sdk/apigatewaycontrollerapiv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMAPIGatewaySubscription_Basic(t *testing.T) { diff --git a/ibm/service/apigateway/resource_ibm_api_gateway_endpoint_test.go b/ibm/service/apigateway/resource_ibm_api_gateway_endpoint_test.go index f15d7a910e..007467ee0f 100644 --- a/ibm/service/apigateway/resource_ibm_api_gateway_endpoint_test.go +++ b/ibm/service/apigateway/resource_ibm_api_gateway_endpoint_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" apigatewaysdk "github.com/IBM/apigateway-go-sdk/apigatewaycontrollerapiv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMAPIGatewayEndpoint_Basic(t *testing.T) { diff --git a/ibm/service/appconfiguration/data_source_ibm_app_config_collection_test.go b/ibm/service/appconfiguration/data_source_ibm_app_config_collection_test.go index 5e32de02bd..ae26c509f2 100644 --- a/ibm/service/appconfiguration/data_source_ibm_app_config_collection_test.go +++ b/ibm/service/appconfiguration/data_source_ibm_app_config_collection_test.go @@ -4,10 +4,11 @@ package appconfiguration_test import ( "fmt" - acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "testing" + + acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmAppConfigCollectionDataSource(t *testing.T) { diff --git a/ibm/service/appconfiguration/data_source_ibm_app_config_collections_test.go b/ibm/service/appconfiguration/data_source_ibm_app_config_collections_test.go index 60d6e21b5f..7d45e4a45e 100644 --- a/ibm/service/appconfiguration/data_source_ibm_app_config_collections_test.go +++ b/ibm/service/appconfiguration/data_source_ibm_app_config_collections_test.go @@ -4,10 +4,11 @@ package appconfiguration_test import ( "fmt" - acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "testing" + + acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmAppConfigCollectionsDataSource(t *testing.T) { diff --git a/ibm/service/appconfiguration/data_source_ibm_app_config_environment_test.go b/ibm/service/appconfiguration/data_source_ibm_app_config_environment_test.go index 554e205a2a..668eb40687 100644 --- a/ibm/service/appconfiguration/data_source_ibm_app_config_environment_test.go +++ b/ibm/service/appconfiguration/data_source_ibm_app_config_environment_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmAppConfigEnvironmentDataSourceBasic(t *testing.T) { diff --git a/ibm/service/appconfiguration/data_source_ibm_app_config_environments_test.go b/ibm/service/appconfiguration/data_source_ibm_app_config_environments_test.go index a8bebc5d5b..b4ff1ee841 100644 --- a/ibm/service/appconfiguration/data_source_ibm_app_config_environments_test.go +++ b/ibm/service/appconfiguration/data_source_ibm_app_config_environments_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmAppConfigEnvironmentsDataSourceBasic(t *testing.T) { diff --git a/ibm/service/appconfiguration/data_source_ibm_app_config_feature_test.go b/ibm/service/appconfiguration/data_source_ibm_app_config_feature_test.go index 0f8cfffbd7..9a60d96a8e 100644 --- a/ibm/service/appconfiguration/data_source_ibm_app_config_feature_test.go +++ b/ibm/service/appconfiguration/data_source_ibm_app_config_feature_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmAppConfigFeatureDataSource(t *testing.T) { diff --git a/ibm/service/appconfiguration/data_source_ibm_app_config_features_test.go b/ibm/service/appconfiguration/data_source_ibm_app_config_features_test.go index f5ab7045aa..c6d042aba6 100644 --- a/ibm/service/appconfiguration/data_source_ibm_app_config_features_test.go +++ b/ibm/service/appconfiguration/data_source_ibm_app_config_features_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmAppConfigFeaturesDataSourceBasic(t *testing.T) { diff --git a/ibm/service/appconfiguration/data_source_ibm_app_config_properties_test.go b/ibm/service/appconfiguration/data_source_ibm_app_config_properties_test.go index 5c0c829d8f..d6817aa159 100644 --- a/ibm/service/appconfiguration/data_source_ibm_app_config_properties_test.go +++ b/ibm/service/appconfiguration/data_source_ibm_app_config_properties_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmAppConfigPropertiesDataSourceBasic(t *testing.T) { diff --git a/ibm/service/appconfiguration/data_source_ibm_app_config_property_test.go b/ibm/service/appconfiguration/data_source_ibm_app_config_property_test.go index 27db8f1f4b..64e8f40308 100644 --- a/ibm/service/appconfiguration/data_source_ibm_app_config_property_test.go +++ b/ibm/service/appconfiguration/data_source_ibm_app_config_property_test.go @@ -8,8 +8,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmAppConfigPropertyDataSource(t *testing.T) { diff --git a/ibm/service/appconfiguration/data_source_ibm_app_config_segment_test.go b/ibm/service/appconfiguration/data_source_ibm_app_config_segment_test.go index 4d7ba04e05..6d4e010a42 100644 --- a/ibm/service/appconfiguration/data_source_ibm_app_config_segment_test.go +++ b/ibm/service/appconfiguration/data_source_ibm_app_config_segment_test.go @@ -5,11 +5,12 @@ package appconfiguration_test import ( "fmt" - acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" ) func TestAccIbmAppConfigSegmentDataSource(t *testing.T) { diff --git a/ibm/service/appconfiguration/data_source_ibm_app_config_segments_test.go b/ibm/service/appconfiguration/data_source_ibm_app_config_segments_test.go index 9f6da32239..7eda2e0689 100644 --- a/ibm/service/appconfiguration/data_source_ibm_app_config_segments_test.go +++ b/ibm/service/appconfiguration/data_source_ibm_app_config_segments_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmAppConfigSegmentsDataSourceBasic(t *testing.T) { diff --git a/ibm/service/appconfiguration/resource_ibm_app_config_collection_test.go b/ibm/service/appconfiguration/resource_ibm_app_config_collection_test.go index bdc125f832..a250ec5e6f 100644 --- a/ibm/service/appconfiguration/resource_ibm_app_config_collection_test.go +++ b/ibm/service/appconfiguration/resource_ibm_app_config_collection_test.go @@ -5,14 +5,15 @@ package appconfiguration_test import ( "fmt" + "testing" + acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "testing" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/appconfiguration-go-admin-sdk/appconfigurationv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" ) func TestAccIbmIbmAppConfigCollectionBasic(t *testing.T) { diff --git a/ibm/service/appconfiguration/resource_ibm_app_config_environment_test.go b/ibm/service/appconfiguration/resource_ibm_app_config_environment_test.go index b06eb51c55..d55d235090 100644 --- a/ibm/service/appconfiguration/resource_ibm_app_config_environment_test.go +++ b/ibm/service/appconfiguration/resource_ibm_app_config_environment_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/appconfiguration-go-admin-sdk/appconfigurationv1" ) diff --git a/ibm/service/appconfiguration/resource_ibm_app_config_feature_test.go b/ibm/service/appconfiguration/resource_ibm_app_config_feature_test.go index 9b8eadd90d..54b6ea1d74 100644 --- a/ibm/service/appconfiguration/resource_ibm_app_config_feature_test.go +++ b/ibm/service/appconfiguration/resource_ibm_app_config_feature_test.go @@ -10,9 +10,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/appconfiguration-go-admin-sdk/appconfigurationv1" ) diff --git a/ibm/service/appconfiguration/resource_ibm_app_config_property_test.go b/ibm/service/appconfiguration/resource_ibm_app_config_property_test.go index 417be1bd9c..fcd643a406 100644 --- a/ibm/service/appconfiguration/resource_ibm_app_config_property_test.go +++ b/ibm/service/appconfiguration/resource_ibm_app_config_property_test.go @@ -5,14 +5,15 @@ package appconfiguration_test import ( "fmt" + "testing" + acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "testing" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/appconfiguration-go-admin-sdk/appconfigurationv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" ) func TestAccIbmIbmAppConfigPropertyBasic(t *testing.T) { diff --git a/ibm/service/appconfiguration/resource_ibm_app_config_segment_test.go b/ibm/service/appconfiguration/resource_ibm_app_config_segment_test.go index 62f18a1467..54af877948 100644 --- a/ibm/service/appconfiguration/resource_ibm_app_config_segment_test.go +++ b/ibm/service/appconfiguration/resource_ibm_app_config_segment_test.go @@ -2,14 +2,15 @@ package appconfiguration_test import ( "fmt" + "testing" + acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "testing" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/appconfiguration-go-admin-sdk/appconfigurationv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" ) func TestAccIbmIbmAppConfigSegmentBasic(t *testing.T) { diff --git a/ibm/service/appid/data_source_ibm_appid_action_url_test.go b/ibm/service/appid/data_source_ibm_appid_action_url_test.go index e36a2401f5..7b6c65b400 100644 --- a/ibm/service/appid/data_source_ibm_appid_action_url_test.go +++ b/ibm/service/appid/data_source_ibm_appid_action_url_test.go @@ -6,7 +6,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMAppIDActionURLDataSource_basic(t *testing.T) { diff --git a/ibm/service/appid/data_source_ibm_appid_apm_test.go b/ibm/service/appid/data_source_ibm_appid_apm_test.go index af9247eeb2..688c95a19f 100644 --- a/ibm/service/appid/data_source_ibm_appid_apm_test.go +++ b/ibm/service/appid/data_source_ibm_appid_apm_test.go @@ -6,7 +6,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMAppIDAPMDataSource_basic(t *testing.T) { diff --git a/ibm/service/appid/data_source_ibm_appid_application_roles_test.go b/ibm/service/appid/data_source_ibm_appid_application_roles_test.go index bce20f91e2..5fe7bec94f 100644 --- a/ibm/service/appid/data_source_ibm_appid_application_roles_test.go +++ b/ibm/service/appid/data_source_ibm_appid_application_roles_test.go @@ -6,8 +6,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMAppIDApplicationRolesDataSource_basic(t *testing.T) { diff --git a/ibm/service/appid/data_source_ibm_appid_application_scopes_test.go b/ibm/service/appid/data_source_ibm_appid_application_scopes_test.go index 1b0af6739f..dbb88090af 100644 --- a/ibm/service/appid/data_source_ibm_appid_application_scopes_test.go +++ b/ibm/service/appid/data_source_ibm_appid_application_scopes_test.go @@ -6,8 +6,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMAppIDApplicationScopesDataSource_basic(t *testing.T) { diff --git a/ibm/service/appid/data_source_ibm_appid_application_test.go b/ibm/service/appid/data_source_ibm_appid_application_test.go index 7d859d9d38..f256c67aa9 100644 --- a/ibm/service/appid/data_source_ibm_appid_application_test.go +++ b/ibm/service/appid/data_source_ibm_appid_application_test.go @@ -6,8 +6,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMAppIDApplicationDataSource_basic(t *testing.T) { diff --git a/ibm/service/appid/data_source_ibm_appid_applications_test.go b/ibm/service/appid/data_source_ibm_appid_applications_test.go index b2075b0d8a..032275aa8c 100644 --- a/ibm/service/appid/data_source_ibm_appid_applications_test.go +++ b/ibm/service/appid/data_source_ibm_appid_applications_test.go @@ -6,8 +6,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMAppIDApplicationsDataSource_basic(t *testing.T) { diff --git a/ibm/service/appid/data_source_ibm_appid_audit_status_test.go b/ibm/service/appid/data_source_ibm_appid_audit_status_test.go index ddb822c683..628cec0075 100644 --- a/ibm/service/appid/data_source_ibm_appid_audit_status_test.go +++ b/ibm/service/appid/data_source_ibm_appid_audit_status_test.go @@ -6,7 +6,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMAppIDAuditStatusDataSource_basic(t *testing.T) { diff --git a/ibm/service/appid/data_source_ibm_appid_cloud_directory_template_test.go b/ibm/service/appid/data_source_ibm_appid_cloud_directory_template_test.go index 7112bcc7fd..945c9bdfdc 100644 --- a/ibm/service/appid/data_source_ibm_appid_cloud_directory_template_test.go +++ b/ibm/service/appid/data_source_ibm_appid_cloud_directory_template_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMAppIDCloudDirectoryTemplateDataSource_basic(t *testing.T) { diff --git a/ibm/service/appid/data_source_ibm_appid_cloud_directory_user_test.go b/ibm/service/appid/data_source_ibm_appid_cloud_directory_user_test.go index 603ad79ae3..31125ebfbb 100644 --- a/ibm/service/appid/data_source_ibm_appid_cloud_directory_user_test.go +++ b/ibm/service/appid/data_source_ibm_appid_cloud_directory_user_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMAppIDCloudDirectoryUserDataSource_basic(t *testing.T) { diff --git a/ibm/service/appid/data_source_ibm_appid_idp_cloud_directory_test.go b/ibm/service/appid/data_source_ibm_appid_idp_cloud_directory_test.go index f55f696764..db3ceff2cc 100644 --- a/ibm/service/appid/data_source_ibm_appid_idp_cloud_directory_test.go +++ b/ibm/service/appid/data_source_ibm_appid_idp_cloud_directory_test.go @@ -6,7 +6,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMAppIDIDPCloudDirectoryDataSource_basic(t *testing.T) { diff --git a/ibm/service/appid/data_source_ibm_appid_idp_custom_test.go b/ibm/service/appid/data_source_ibm_appid_idp_custom_test.go index 872ad15f6b..a8a99d0a0b 100644 --- a/ibm/service/appid/data_source_ibm_appid_idp_custom_test.go +++ b/ibm/service/appid/data_source_ibm_appid_idp_custom_test.go @@ -7,7 +7,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMAppIDIDPCustomDataSource_basic(t *testing.T) { diff --git a/ibm/service/appid/data_source_ibm_appid_idp_facebook_test.go b/ibm/service/appid/data_source_ibm_appid_idp_facebook_test.go index 62dd6b5c6c..872c34686c 100644 --- a/ibm/service/appid/data_source_ibm_appid_idp_facebook_test.go +++ b/ibm/service/appid/data_source_ibm_appid_idp_facebook_test.go @@ -6,7 +6,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccAppIDIDPFacebookDataSource_basic(t *testing.T) { diff --git a/ibm/service/appid/data_source_ibm_appid_idp_google_test.go b/ibm/service/appid/data_source_ibm_appid_idp_google_test.go index f5db682906..d3e56ebf0d 100644 --- a/ibm/service/appid/data_source_ibm_appid_idp_google_test.go +++ b/ibm/service/appid/data_source_ibm_appid_idp_google_test.go @@ -6,7 +6,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccAppIDIDPGoogleDataSource_basic(t *testing.T) { diff --git a/ibm/service/appid/data_source_ibm_appid_idp_saml_metadata_test.go b/ibm/service/appid/data_source_ibm_appid_idp_saml_metadata_test.go index 1ec41feb94..1e17380582 100644 --- a/ibm/service/appid/data_source_ibm_appid_idp_saml_metadata_test.go +++ b/ibm/service/appid/data_source_ibm_appid_idp_saml_metadata_test.go @@ -6,7 +6,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMAppIDIDPSAMLMetadataDataSource_basic(t *testing.T) { diff --git a/ibm/service/appid/data_source_ibm_appid_idp_saml_test.go b/ibm/service/appid/data_source_ibm_appid_idp_saml_test.go index 4111b4f94c..844683b798 100644 --- a/ibm/service/appid/data_source_ibm_appid_idp_saml_test.go +++ b/ibm/service/appid/data_source_ibm_appid_idp_saml_test.go @@ -6,8 +6,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMAppIDIDPSamlDataSource_basic(t *testing.T) { diff --git a/ibm/service/appid/data_source_ibm_appid_languages_test.go b/ibm/service/appid/data_source_ibm_appid_languages_test.go index c569b28ab3..a961cd02fa 100644 --- a/ibm/service/appid/data_source_ibm_appid_languages_test.go +++ b/ibm/service/appid/data_source_ibm_appid_languages_test.go @@ -7,7 +7,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMAppIDLanguagesDataSource_basic(t *testing.T) { diff --git a/ibm/service/appid/data_source_ibm_appid_mfa_channel_test.go b/ibm/service/appid/data_source_ibm_appid_mfa_channel_test.go index c9c7f1acfe..ff3897bba2 100644 --- a/ibm/service/appid/data_source_ibm_appid_mfa_channel_test.go +++ b/ibm/service/appid/data_source_ibm_appid_mfa_channel_test.go @@ -6,7 +6,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccAppIDMFAChannelDataSource_basic(t *testing.T) { diff --git a/ibm/service/appid/data_source_ibm_appid_mfa_test.go b/ibm/service/appid/data_source_ibm_appid_mfa_test.go index 2814402377..64f9cc168c 100644 --- a/ibm/service/appid/data_source_ibm_appid_mfa_test.go +++ b/ibm/service/appid/data_source_ibm_appid_mfa_test.go @@ -6,7 +6,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccAppIDMFADataSource_basic(t *testing.T) { diff --git a/ibm/service/appid/data_source_ibm_appid_password_regex_test.go b/ibm/service/appid/data_source_ibm_appid_password_regex_test.go index 3a35b13b04..92c0332433 100644 --- a/ibm/service/appid/data_source_ibm_appid_password_regex_test.go +++ b/ibm/service/appid/data_source_ibm_appid_password_regex_test.go @@ -6,7 +6,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMAppIDPasswordRegexDataSource_basic(t *testing.T) { diff --git a/ibm/service/appid/data_source_ibm_appid_redirect_urls_test.go b/ibm/service/appid/data_source_ibm_appid_redirect_urls_test.go index c86739eec1..997d7ae63b 100644 --- a/ibm/service/appid/data_source_ibm_appid_redirect_urls_test.go +++ b/ibm/service/appid/data_source_ibm_appid_redirect_urls_test.go @@ -6,7 +6,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMAppIDRedirectURLsDataSource_basic(t *testing.T) { diff --git a/ibm/service/appid/data_source_ibm_appid_role_test.go b/ibm/service/appid/data_source_ibm_appid_role_test.go index b31847bc42..4f8d243167 100644 --- a/ibm/service/appid/data_source_ibm_appid_role_test.go +++ b/ibm/service/appid/data_source_ibm_appid_role_test.go @@ -6,8 +6,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMAppIDRoleDataSource_basic(t *testing.T) { diff --git a/ibm/service/appid/data_source_ibm_appid_roles_test.go b/ibm/service/appid/data_source_ibm_appid_roles_test.go index 38fe6018b9..34eaed13f3 100644 --- a/ibm/service/appid/data_source_ibm_appid_roles_test.go +++ b/ibm/service/appid/data_source_ibm_appid_roles_test.go @@ -6,8 +6,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMAppIDRolesDataSource_basic(t *testing.T) { diff --git a/ibm/service/appid/data_source_ibm_appid_theme_color_test.go b/ibm/service/appid/data_source_ibm_appid_theme_color_test.go index 19b3761549..0611914377 100644 --- a/ibm/service/appid/data_source_ibm_appid_theme_color_test.go +++ b/ibm/service/appid/data_source_ibm_appid_theme_color_test.go @@ -6,7 +6,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccThemeColorDataSource_basic(t *testing.T) { diff --git a/ibm/service/appid/data_source_ibm_appid_theme_text_test.go b/ibm/service/appid/data_source_ibm_appid_theme_text_test.go index c857312cc1..961555b52a 100644 --- a/ibm/service/appid/data_source_ibm_appid_theme_text_test.go +++ b/ibm/service/appid/data_source_ibm_appid_theme_text_test.go @@ -6,7 +6,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccThemeTextDataSource_basic(t *testing.T) { diff --git a/ibm/service/appid/data_source_ibm_appid_token_config_test.go b/ibm/service/appid/data_source_ibm_appid_token_config_test.go index cab69fa7e3..20aa302f47 100644 --- a/ibm/service/appid/data_source_ibm_appid_token_config_test.go +++ b/ibm/service/appid/data_source_ibm_appid_token_config_test.go @@ -11,7 +11,7 @@ import ( "github.com/IBM-Cloud/bluemix-go/helpers" appid "github.com/IBM/appid-management-go-sdk/appidmanagementv4" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" "gotest.tools/assert" ) diff --git a/ibm/service/appid/data_source_ibm_appid_user_roles_test.go b/ibm/service/appid/data_source_ibm_appid_user_roles_test.go index 9e6526a75c..705e51a73a 100644 --- a/ibm/service/appid/data_source_ibm_appid_user_roles_test.go +++ b/ibm/service/appid/data_source_ibm_appid_user_roles_test.go @@ -6,8 +6,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMAppIDUserRolesRolesDataSource_basic(t *testing.T) { diff --git a/ibm/service/appid/resource_ibm_appid_action_url_test.go b/ibm/service/appid/resource_ibm_appid_action_url_test.go index af1409b495..a45f96ab57 100644 --- a/ibm/service/appid/resource_ibm_appid_action_url_test.go +++ b/ibm/service/appid/resource_ibm_appid_action_url_test.go @@ -9,8 +9,8 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" appid "github.com/IBM/appid-management-go-sdk/appidmanagementv4" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMAppIDActionURL_basic(t *testing.T) { diff --git a/ibm/service/appid/resource_ibm_appid_apm_test.go b/ibm/service/appid/resource_ibm_appid_apm_test.go index 96d48bccc8..ae9a8bf3ed 100644 --- a/ibm/service/appid/resource_ibm_appid_apm_test.go +++ b/ibm/service/appid/resource_ibm_appid_apm_test.go @@ -11,8 +11,8 @@ import ( appid "github.com/IBM/appid-management-go-sdk/appidmanagementv4" "github.com/IBM/go-sdk-core/v5/core" "github.com/google/go-cmp/cmp" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMAppIDAPM_basic(t *testing.T) { diff --git a/ibm/service/appid/resource_ibm_appid_application_roles_test.go b/ibm/service/appid/resource_ibm_appid_application_roles_test.go index a0c157a7ac..d6337f2644 100644 --- a/ibm/service/appid/resource_ibm_appid_application_roles_test.go +++ b/ibm/service/appid/resource_ibm_appid_application_roles_test.go @@ -9,9 +9,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" appid "github.com/IBM/appid-management-go-sdk/appidmanagementv4" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMAppIDApplicationRoles_basic(t *testing.T) { diff --git a/ibm/service/appid/resource_ibm_appid_application_scopes_test.go b/ibm/service/appid/resource_ibm_appid_application_scopes_test.go index 0f0f65d58d..10aa35fa84 100644 --- a/ibm/service/appid/resource_ibm_appid_application_scopes_test.go +++ b/ibm/service/appid/resource_ibm_appid_application_scopes_test.go @@ -9,9 +9,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" appid "github.com/IBM/appid-management-go-sdk/appidmanagementv4" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMAppIDApplicationScopes_basic(t *testing.T) { diff --git a/ibm/service/appid/resource_ibm_appid_application_test.go b/ibm/service/appid/resource_ibm_appid_application_test.go index 88abea5e68..5909686b0b 100644 --- a/ibm/service/appid/resource_ibm_appid_application_test.go +++ b/ibm/service/appid/resource_ibm_appid_application_test.go @@ -9,9 +9,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" appid "github.com/IBM/appid-management-go-sdk/appidmanagementv4" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMAppIDApplication_basic(t *testing.T) { diff --git a/ibm/service/appid/resource_ibm_appid_audit_status_test.go b/ibm/service/appid/resource_ibm_appid_audit_status_test.go index ce69e9aa09..835ed95424 100644 --- a/ibm/service/appid/resource_ibm_appid_audit_status_test.go +++ b/ibm/service/appid/resource_ibm_appid_audit_status_test.go @@ -8,8 +8,8 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" appid "github.com/IBM/appid-management-go-sdk/appidmanagementv4" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMAppIDAuditStatus_basic(t *testing.T) { diff --git a/ibm/service/appid/resource_ibm_appid_cloud_directory_template_test.go b/ibm/service/appid/resource_ibm_appid_cloud_directory_template_test.go index 341bdbb695..62e89dcc81 100644 --- a/ibm/service/appid/resource_ibm_appid_cloud_directory_template_test.go +++ b/ibm/service/appid/resource_ibm_appid_cloud_directory_template_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMAppIDCloudDirectoryTemplate_basic(t *testing.T) { diff --git a/ibm/service/appid/resource_ibm_appid_cloud_directory_user_test.go b/ibm/service/appid/resource_ibm_appid_cloud_directory_user_test.go index effb3fc982..b17c951905 100644 --- a/ibm/service/appid/resource_ibm_appid_cloud_directory_user_test.go +++ b/ibm/service/appid/resource_ibm_appid_cloud_directory_user_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" appid "github.com/IBM/appid-management-go-sdk/appidmanagementv4" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMAppIDCloudDirectoryUser_basic(t *testing.T) { diff --git a/ibm/service/appid/resource_ibm_appid_idp_cloud_directory_test.go b/ibm/service/appid/resource_ibm_appid_idp_cloud_directory_test.go index eed0044a6e..2d4a53c891 100644 --- a/ibm/service/appid/resource_ibm_appid_idp_cloud_directory_test.go +++ b/ibm/service/appid/resource_ibm_appid_idp_cloud_directory_test.go @@ -10,8 +10,8 @@ import ( "github.com/IBM-Cloud/bluemix-go/helpers" appid "github.com/IBM/appid-management-go-sdk/appidmanagementv4" "github.com/google/go-cmp/cmp" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMAppIDIDPCloudDirectory_basic(t *testing.T) { diff --git a/ibm/service/appid/resource_ibm_appid_idp_custom_test.go b/ibm/service/appid/resource_ibm_appid_idp_custom_test.go index a6a3153d3c..1208a46aad 100644 --- a/ibm/service/appid/resource_ibm_appid_idp_custom_test.go +++ b/ibm/service/appid/resource_ibm_appid_idp_custom_test.go @@ -9,8 +9,8 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" appid "github.com/IBM/appid-management-go-sdk/appidmanagementv4" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMAppIDIDPCustom_basic(t *testing.T) { diff --git a/ibm/service/appid/resource_ibm_appid_idp_facebook_test.go b/ibm/service/appid/resource_ibm_appid_idp_facebook_test.go index bf84d99b23..c258d06493 100644 --- a/ibm/service/appid/resource_ibm_appid_idp_facebook_test.go +++ b/ibm/service/appid/resource_ibm_appid_idp_facebook_test.go @@ -8,8 +8,8 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" appid "github.com/IBM/appid-management-go-sdk/appidmanagementv4" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccAppIDIDPFacebook_basic(t *testing.T) { diff --git a/ibm/service/appid/resource_ibm_appid_idp_google_test.go b/ibm/service/appid/resource_ibm_appid_idp_google_test.go index d87ac061ee..f4f46fd404 100644 --- a/ibm/service/appid/resource_ibm_appid_idp_google_test.go +++ b/ibm/service/appid/resource_ibm_appid_idp_google_test.go @@ -8,8 +8,8 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" appid "github.com/IBM/appid-management-go-sdk/appidmanagementv4" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccAppIDIDPGoogle_basic(t *testing.T) { diff --git a/ibm/service/appid/resource_ibm_appid_idp_saml_test.go b/ibm/service/appid/resource_ibm_appid_idp_saml_test.go index 99dd0d2b3b..b21b387203 100644 --- a/ibm/service/appid/resource_ibm_appid_idp_saml_test.go +++ b/ibm/service/appid/resource_ibm_appid_idp_saml_test.go @@ -10,9 +10,9 @@ import ( "github.com/IBM-Cloud/bluemix-go/helpers" appid "github.com/IBM/appid-management-go-sdk/appidmanagementv4" "github.com/google/go-cmp/cmp" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMAppIDIDPSaml_basic(t *testing.T) { diff --git a/ibm/service/appid/resource_ibm_appid_languages_test.go b/ibm/service/appid/resource_ibm_appid_languages_test.go index 20f2658a28..a316f5ff18 100644 --- a/ibm/service/appid/resource_ibm_appid_languages_test.go +++ b/ibm/service/appid/resource_ibm_appid_languages_test.go @@ -9,8 +9,8 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" appid "github.com/IBM/appid-management-go-sdk/appidmanagementv4" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMAppIDLanguages_basic(t *testing.T) { diff --git a/ibm/service/appid/resource_ibm_appid_mfa_channel_test.go b/ibm/service/appid/resource_ibm_appid_mfa_channel_test.go index bb3e7c8d72..385b435b6d 100644 --- a/ibm/service/appid/resource_ibm_appid_mfa_channel_test.go +++ b/ibm/service/appid/resource_ibm_appid_mfa_channel_test.go @@ -8,8 +8,8 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" appid "github.com/IBM/appid-management-go-sdk/appidmanagementv4" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccAppIDMFAChannel_basic(t *testing.T) { diff --git a/ibm/service/appid/resource_ibm_appid_mfa_test.go b/ibm/service/appid/resource_ibm_appid_mfa_test.go index b10fb63922..21c342d4d1 100644 --- a/ibm/service/appid/resource_ibm_appid_mfa_test.go +++ b/ibm/service/appid/resource_ibm_appid_mfa_test.go @@ -6,7 +6,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccAppIDMFA_basic(t *testing.T) { diff --git a/ibm/service/appid/resource_ibm_appid_password_regex_test.go b/ibm/service/appid/resource_ibm_appid_password_regex_test.go index e1ec21f956..649cfe34de 100644 --- a/ibm/service/appid/resource_ibm_appid_password_regex_test.go +++ b/ibm/service/appid/resource_ibm_appid_password_regex_test.go @@ -8,8 +8,8 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" appid "github.com/IBM/appid-management-go-sdk/appidmanagementv4" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMAppIDPasswordRegex_basic(t *testing.T) { diff --git a/ibm/service/appid/resource_ibm_appid_redirect_urls_test.go b/ibm/service/appid/resource_ibm_appid_redirect_urls_test.go index 2a42bf191f..23be511389 100644 --- a/ibm/service/appid/resource_ibm_appid_redirect_urls_test.go +++ b/ibm/service/appid/resource_ibm_appid_redirect_urls_test.go @@ -8,8 +8,8 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" appid "github.com/IBM/appid-management-go-sdk/appidmanagementv4" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMAppIDRedirectURLs_basic(t *testing.T) { diff --git a/ibm/service/appid/resource_ibm_appid_role_test.go b/ibm/service/appid/resource_ibm_appid_role_test.go index 34defbdef6..6624c6e8ee 100644 --- a/ibm/service/appid/resource_ibm_appid_role_test.go +++ b/ibm/service/appid/resource_ibm_appid_role_test.go @@ -9,9 +9,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" appid "github.com/IBM/appid-management-go-sdk/appidmanagementv4" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMAppIDRole_basic(t *testing.T) { diff --git a/ibm/service/appid/resource_ibm_appid_theme_color_test.go b/ibm/service/appid/resource_ibm_appid_theme_color_test.go index 09906c5ec0..d34014d12e 100644 --- a/ibm/service/appid/resource_ibm_appid_theme_color_test.go +++ b/ibm/service/appid/resource_ibm_appid_theme_color_test.go @@ -8,8 +8,8 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" appid "github.com/IBM/appid-management-go-sdk/appidmanagementv4" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccThemeColor_basic(t *testing.T) { diff --git a/ibm/service/appid/resource_ibm_appid_theme_text_test.go b/ibm/service/appid/resource_ibm_appid_theme_text_test.go index 157db8fd43..f218ff5ee0 100644 --- a/ibm/service/appid/resource_ibm_appid_theme_text_test.go +++ b/ibm/service/appid/resource_ibm_appid_theme_text_test.go @@ -8,8 +8,8 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" appid "github.com/IBM/appid-management-go-sdk/appidmanagementv4" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccThemeText_basic(t *testing.T) { diff --git a/ibm/service/appid/resource_ibm_appid_user_roles_test.go b/ibm/service/appid/resource_ibm_appid_user_roles_test.go index 6a0aeb759e..343e632065 100644 --- a/ibm/service/appid/resource_ibm_appid_user_roles_test.go +++ b/ibm/service/appid/resource_ibm_appid_user_roles_test.go @@ -9,10 +9,10 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" appid "github.com/IBM/appid-management-go-sdk/appidmanagementv4" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/terraform" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMAppIDUserRolesRoles_basic(t *testing.T) { diff --git a/ibm/service/atracker/data_source_ibm_atracker_routes_test.go b/ibm/service/atracker/data_source_ibm_atracker_routes_test.go index 3162542d61..35eb5a5147 100644 --- a/ibm/service/atracker/data_source_ibm_atracker_routes_test.go +++ b/ibm/service/atracker/data_source_ibm_atracker_routes_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/atracker/data_source_ibm_atracker_targets_test.go b/ibm/service/atracker/data_source_ibm_atracker_targets_test.go index 389b3f5692..3fc9f996b6 100644 --- a/ibm/service/atracker/data_source_ibm_atracker_targets_test.go +++ b/ibm/service/atracker/data_source_ibm_atracker_targets_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/atracker/resource_ibm_atracker_route_test.go b/ibm/service/atracker/resource_ibm_atracker_route_test.go index 579f821e7c..4a57e42f1a 100644 --- a/ibm/service/atracker/resource_ibm_atracker_route_test.go +++ b/ibm/service/atracker/resource_ibm_atracker_route_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/atracker/resource_ibm_atracker_settings_test.go b/ibm/service/atracker/resource_ibm_atracker_settings_test.go index 29f9c5138e..375ccd734a 100644 --- a/ibm/service/atracker/resource_ibm_atracker_settings_test.go +++ b/ibm/service/atracker/resource_ibm_atracker_settings_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/atracker/resource_ibm_atracker_target_test.go b/ibm/service/atracker/resource_ibm_atracker_target_test.go index 4fb31220b8..ea1d1e22f5 100644 --- a/ibm/service/atracker/resource_ibm_atracker_target_test.go +++ b/ibm/service/atracker/resource_ibm_atracker_target_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/catalogmanagement/data_source_ibm_cm_catalog_test.go b/ibm/service/catalogmanagement/data_source_ibm_cm_catalog_test.go index 07b4531aad..682de2db24 100644 --- a/ibm/service/catalogmanagement/data_source_ibm_cm_catalog_test.go +++ b/ibm/service/catalogmanagement/data_source_ibm_cm_catalog_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/catalogmanagement/data_source_ibm_cm_object_test.go b/ibm/service/catalogmanagement/data_source_ibm_cm_object_test.go index ed2f9d3932..d12fb45976 100644 --- a/ibm/service/catalogmanagement/data_source_ibm_cm_object_test.go +++ b/ibm/service/catalogmanagement/data_source_ibm_cm_object_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/catalogmanagement/data_source_ibm_cm_offering_instance_test.go b/ibm/service/catalogmanagement/data_source_ibm_cm_offering_instance_test.go index 08b4f53d6b..e91bb5e0b5 100644 --- a/ibm/service/catalogmanagement/data_source_ibm_cm_offering_instance_test.go +++ b/ibm/service/catalogmanagement/data_source_ibm_cm_offering_instance_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCmOfferingInstanceDataSource(t *testing.T) { diff --git a/ibm/service/catalogmanagement/data_source_ibm_cm_offering_test.go b/ibm/service/catalogmanagement/data_source_ibm_cm_offering_test.go index ab9a167486..79b7efdebc 100644 --- a/ibm/service/catalogmanagement/data_source_ibm_cm_offering_test.go +++ b/ibm/service/catalogmanagement/data_source_ibm_cm_offering_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/catalogmanagement/data_source_ibm_cm_preset_test.go b/ibm/service/catalogmanagement/data_source_ibm_cm_preset_test.go index ec59dddf1c..e3e26906a8 100644 --- a/ibm/service/catalogmanagement/data_source_ibm_cm_preset_test.go +++ b/ibm/service/catalogmanagement/data_source_ibm_cm_preset_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/catalogmanagement/data_source_ibm_cm_version_test.go b/ibm/service/catalogmanagement/data_source_ibm_cm_version_test.go index 99982cbd87..3ab95ae8ac 100644 --- a/ibm/service/catalogmanagement/data_source_ibm_cm_version_test.go +++ b/ibm/service/catalogmanagement/data_source_ibm_cm_version_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/catalogmanagement/resource_ibm_cm_catalog_test.go b/ibm/service/catalogmanagement/resource_ibm_cm_catalog_test.go index f6f2662ed8..2fc6d46997 100644 --- a/ibm/service/catalogmanagement/resource_ibm_cm_catalog_test.go +++ b/ibm/service/catalogmanagement/resource_ibm_cm_catalog_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/catalogmanagement/resource_ibm_cm_object_test.go b/ibm/service/catalogmanagement/resource_ibm_cm_object_test.go index 5d2b24501e..97a6b57e6c 100644 --- a/ibm/service/catalogmanagement/resource_ibm_cm_object_test.go +++ b/ibm/service/catalogmanagement/resource_ibm_cm_object_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/catalogmanagement/resource_ibm_cm_offering_instance.go b/ibm/service/catalogmanagement/resource_ibm_cm_offering_instance.go index f21b90bcfb..6e0690e1ff 100644 --- a/ibm/service/catalogmanagement/resource_ibm_cm_offering_instance.go +++ b/ibm/service/catalogmanagement/resource_ibm_cm_offering_instance.go @@ -11,7 +11,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/platform-services-go-sdk/catalogmanagementv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -227,7 +227,7 @@ func waitUntilSuccess(d *schema.ResourceData, meta interface{}) (interface{}, er getOfferingInstanceOptions.SetInstanceIdentifier(d.Id()) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{inProgress}, Target: []string{success}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/catalogmanagement/resource_ibm_cm_offering_instance_test.go b/ibm/service/catalogmanagement/resource_ibm_cm_offering_instance_test.go index f9ff61877a..7e0034d047 100644 --- a/ibm/service/catalogmanagement/resource_ibm_cm_offering_instance_test.go +++ b/ibm/service/catalogmanagement/resource_ibm_cm_offering_instance_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/platform-services-go-sdk/catalogmanagementv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMCmOfferingInstance(t *testing.T) { diff --git a/ibm/service/catalogmanagement/resource_ibm_cm_offering_test.go b/ibm/service/catalogmanagement/resource_ibm_cm_offering_test.go index 11fce6f516..abe3a604be 100644 --- a/ibm/service/catalogmanagement/resource_ibm_cm_offering_test.go +++ b/ibm/service/catalogmanagement/resource_ibm_cm_offering_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/catalogmanagement/resource_ibm_cm_validation_test.go b/ibm/service/catalogmanagement/resource_ibm_cm_validation_test.go index 9baf4112c7..c52b47cc6d 100644 --- a/ibm/service/catalogmanagement/resource_ibm_cm_validation_test.go +++ b/ibm/service/catalogmanagement/resource_ibm_cm_validation_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM/platform-services-go-sdk/catalogmanagementv1" diff --git a/ibm/service/catalogmanagement/resource_ibm_cm_version_test.go b/ibm/service/catalogmanagement/resource_ibm_cm_version_test.go index 3f953f6ef3..d1eabb3897 100644 --- a/ibm/service/catalogmanagement/resource_ibm_cm_version_test.go +++ b/ibm/service/catalogmanagement/resource_ibm_cm_version_test.go @@ -8,9 +8,9 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtektonpipeline/data_source_ibm_cd_tekton_pipeline_definition_test.go b/ibm/service/cdtektonpipeline/data_source_ibm_cd_tekton_pipeline_definition_test.go index 670dec155f..4328c5324b 100644 --- a/ibm/service/cdtektonpipeline/data_source_ibm_cd_tekton_pipeline_definition_test.go +++ b/ibm/service/cdtektonpipeline/data_source_ibm_cd_tekton_pipeline_definition_test.go @@ -11,8 +11,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/cdtektonpipeline" diff --git a/ibm/service/cdtektonpipeline/data_source_ibm_cd_tekton_pipeline_property_test.go b/ibm/service/cdtektonpipeline/data_source_ibm_cd_tekton_pipeline_property_test.go index 3a5ead5682..3ad11a5128 100644 --- a/ibm/service/cdtektonpipeline/data_source_ibm_cd_tekton_pipeline_property_test.go +++ b/ibm/service/cdtektonpipeline/data_source_ibm_cd_tekton_pipeline_property_test.go @@ -11,8 +11,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/cdtektonpipeline/data_source_ibm_cd_tekton_pipeline_test.go b/ibm/service/cdtektonpipeline/data_source_ibm_cd_tekton_pipeline_test.go index b4470a7a00..fd66fbb228 100644 --- a/ibm/service/cdtektonpipeline/data_source_ibm_cd_tekton_pipeline_test.go +++ b/ibm/service/cdtektonpipeline/data_source_ibm_cd_tekton_pipeline_test.go @@ -11,8 +11,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/cdtektonpipeline" diff --git a/ibm/service/cdtektonpipeline/data_source_ibm_cd_tekton_pipeline_trigger_property_test.go b/ibm/service/cdtektonpipeline/data_source_ibm_cd_tekton_pipeline_trigger_property_test.go index e933ce643c..e0e1ea6e7f 100644 --- a/ibm/service/cdtektonpipeline/data_source_ibm_cd_tekton_pipeline_trigger_property_test.go +++ b/ibm/service/cdtektonpipeline/data_source_ibm_cd_tekton_pipeline_trigger_property_test.go @@ -11,8 +11,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/cdtektonpipeline/data_source_ibm_cd_tekton_pipeline_trigger_test.go b/ibm/service/cdtektonpipeline/data_source_ibm_cd_tekton_pipeline_trigger_test.go index 8011d14de2..55c7fde811 100644 --- a/ibm/service/cdtektonpipeline/data_source_ibm_cd_tekton_pipeline_trigger_test.go +++ b/ibm/service/cdtektonpipeline/data_source_ibm_cd_tekton_pipeline_trigger_test.go @@ -11,8 +11,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/cdtektonpipeline" diff --git a/ibm/service/cdtektonpipeline/resource_ibm_cd_tekton_pipeline_definition_test.go b/ibm/service/cdtektonpipeline/resource_ibm_cd_tekton_pipeline_definition_test.go index dbd806fa20..76055fc85a 100644 --- a/ibm/service/cdtektonpipeline/resource_ibm_cd_tekton_pipeline_definition_test.go +++ b/ibm/service/cdtektonpipeline/resource_ibm_cd_tekton_pipeline_definition_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtektonpipeline/resource_ibm_cd_tekton_pipeline_property_test.go b/ibm/service/cdtektonpipeline/resource_ibm_cd_tekton_pipeline_property_test.go index 4e01f29cb7..8bfcfadf59 100644 --- a/ibm/service/cdtektonpipeline/resource_ibm_cd_tekton_pipeline_property_test.go +++ b/ibm/service/cdtektonpipeline/resource_ibm_cd_tekton_pipeline_property_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtektonpipeline/resource_ibm_cd_tekton_pipeline_test.go b/ibm/service/cdtektonpipeline/resource_ibm_cd_tekton_pipeline_test.go index ea46759a9a..fb8f2dbb0e 100644 --- a/ibm/service/cdtektonpipeline/resource_ibm_cd_tekton_pipeline_test.go +++ b/ibm/service/cdtektonpipeline/resource_ibm_cd_tekton_pipeline_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtektonpipeline/resource_ibm_cd_tekton_pipeline_trigger_property_test.go b/ibm/service/cdtektonpipeline/resource_ibm_cd_tekton_pipeline_trigger_property_test.go index c546090200..bbcc06bc0f 100644 --- a/ibm/service/cdtektonpipeline/resource_ibm_cd_tekton_pipeline_trigger_property_test.go +++ b/ibm/service/cdtektonpipeline/resource_ibm_cd_tekton_pipeline_trigger_property_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtektonpipeline/resource_ibm_cd_tekton_pipeline_trigger_test.go b/ibm/service/cdtektonpipeline/resource_ibm_cd_tekton_pipeline_trigger_test.go index 9013279f92..184a1a175f 100644 --- a/ibm/service/cdtektonpipeline/resource_ibm_cd_tekton_pipeline_trigger_test.go +++ b/ibm/service/cdtektonpipeline/resource_ibm_cd_tekton_pipeline_trigger_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_test.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_test.go index c992aff461..296584087b 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_test.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_appconfig_test.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_appconfig_test.go index 64bcfb6ea2..96175b9b65 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_appconfig_test.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_appconfig_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_artifactory_test.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_artifactory_test.go index 4118941c23..248361f8ec 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_artifactory_test.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_artifactory_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_bitbucketgit_test.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_bitbucketgit_test.go index 04369533ba..baa43fac8e 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_bitbucketgit_test.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_bitbucketgit_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_custom_test.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_custom_test.go index bba8dfb385..0a6799cc7c 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_custom_test.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_custom_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_devopsinsights_test.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_devopsinsights_test.go index 9c3eb364ec..4bae94e6ec 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_devopsinsights_test.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_devopsinsights_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_eventnotifications_test.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_eventnotifications_test.go index 3930db4c57..bc80b599c7 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_eventnotifications_test.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_eventnotifications_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_githubconsolidated_test.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_githubconsolidated_test.go index 74cd4aef49..233a4d502d 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_githubconsolidated_test.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_githubconsolidated_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_gitlab_test.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_gitlab_test.go index 89103408ca..2196cec4ad 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_gitlab_test.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_gitlab_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_hashicorpvault_test.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_hashicorpvault_test.go index 909aea11ba..7bbc47f701 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_hashicorpvault_test.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_hashicorpvault_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_hostedgit_test.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_hostedgit_test.go index 353f568248..4a89f1950a 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_hostedgit_test.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_hostedgit_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_jenkins_test.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_jenkins_test.go index 29ade7ecd8..ac9d99dae4 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_jenkins_test.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_jenkins_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_jira_test.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_jira_test.go index 8e6be1bbe9..8c45d630be 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_jira_test.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_jira_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_keyprotect_test.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_keyprotect_test.go index 49a6d50f48..28283cf276 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_keyprotect_test.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_keyprotect_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_nexus_test.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_nexus_test.go index fd0b52d5ae..d9013ec559 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_nexus_test.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_nexus_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_pagerduty_test.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_pagerduty_test.go index ae23ba11f0..fe6e881ee9 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_pagerduty_test.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_pagerduty_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_pipeline_test.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_pipeline_test.go index 5c41e8dd61..b6baff2ae6 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_pipeline_test.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_pipeline_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_privateworker_test.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_privateworker_test.go index c984ccaf0f..834a83557c 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_privateworker_test.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_privateworker_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_saucelabs_test.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_saucelabs_test.go index 716739d31d..42e0886b6f 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_saucelabs_test.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_saucelabs_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_secretsmanager_test.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_secretsmanager_test.go index b2755c6254..71632b1b3e 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_secretsmanager_test.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_secretsmanager_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_securitycompliance_test.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_securitycompliance_test.go index 280fa471cb..f34bd94e1d 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_securitycompliance_test.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_securitycompliance_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_slack_test.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_slack_test.go index f6e06575ad..d4ca299a3d 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_slack_test.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_slack_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_sonarqube_test.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_sonarqube_test.go index fbbeb16c55..669ba4c640 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_sonarqube_test.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchain_tool_sonarqube_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchains_test.go b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchains_test.go index 2aa93b56f0..d6afcdde2a 100644 --- a/ibm/service/cdtoolchain/data_source_ibm_cd_toolchains_test.go +++ b/ibm/service/cdtoolchain/data_source_ibm_cd_toolchains_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain.go index c0f36fc4b1..c26fc669f2 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain.go @@ -16,7 +16,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -207,13 +207,13 @@ func resourceIBMCdToolchainRead(context context.Context, d *schema.ResourceData, var toolchain *cdtoolchainv2.Toolchain var response *core.DetailedResponse - err = resource.RetryContext(context, 10*time.Second, func() *resource.RetryError { + err = retry.RetryContext(context, 10*time.Second, func() *retry.RetryError { toolchain, response, err = cdToolchainClient.GetToolchainByIDWithContext(context, getToolchainByIDOptions) if err != nil || toolchain == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_test.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_test.go index 74d93ca4cb..a4d00126e3 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_test.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_appconfig.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_appconfig.go index 1ab9d66ef7..9dd6927ad7 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_appconfig.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_appconfig.go @@ -14,7 +14,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -231,13 +231,13 @@ func resourceIBMCdToolchainToolAppconfigRead(context context.Context, d *schema. var toolchainTool *cdtoolchainv2.ToolchainTool var response *core.DetailedResponse - err = resource.RetryContext(context, 10*time.Second, func() *resource.RetryError { + err = retry.RetryContext(context, 10*time.Second, func() *retry.RetryError { toolchainTool, response, err = cdToolchainClient.GetToolByIDWithContext(context, getToolByIDOptions) if err != nil || toolchainTool == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_appconfig_test.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_appconfig_test.go index 25b4cde524..462bc3f1c4 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_appconfig_test.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_appconfig_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_artifactory.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_artifactory.go index 236839326f..32a1eb8d22 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_artifactory.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_artifactory.go @@ -14,7 +14,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -246,13 +246,13 @@ func resourceIBMCdToolchainToolArtifactoryRead(context context.Context, d *schem var toolchainTool *cdtoolchainv2.ToolchainTool var response *core.DetailedResponse - err = resource.RetryContext(context, 10*time.Second, func() *resource.RetryError { + err = retry.RetryContext(context, 10*time.Second, func() *retry.RetryError { toolchainTool, response, err = cdToolchainClient.GetToolByIDWithContext(context, getToolByIDOptions) if err != nil || toolchainTool == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_artifactory_test.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_artifactory_test.go index 2a3974826e..7f1523217e 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_artifactory_test.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_artifactory_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_bitbucketgit.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_bitbucketgit.go index ff890e41d0..6eddd3d5ff 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_bitbucketgit.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_bitbucketgit.go @@ -14,7 +14,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -334,13 +334,13 @@ func resourceIBMCdToolchainToolBitbucketgitRead(context context.Context, d *sche var toolchainTool *cdtoolchainv2.ToolchainTool var response *core.DetailedResponse - err = resource.RetryContext(context, 10*time.Second, func() *resource.RetryError { + err = retry.RetryContext(context, 10*time.Second, func() *retry.RetryError { toolchainTool, response, err = cdToolchainClient.GetToolByIDWithContext(context, getToolByIDOptions) if err != nil || toolchainTool == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_bitbucketgit_test.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_bitbucketgit_test.go index 84dc9b170e..11f5a13c40 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_bitbucketgit_test.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_bitbucketgit_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_custom.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_custom.go index bf68256e4e..97b689865f 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_custom.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_custom.go @@ -14,7 +14,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -240,13 +240,13 @@ func resourceIBMCdToolchainToolCustomRead(context context.Context, d *schema.Res var toolchainTool *cdtoolchainv2.ToolchainTool var response *core.DetailedResponse - err = resource.RetryContext(context, 10*time.Second, func() *resource.RetryError { + err = retry.RetryContext(context, 10*time.Second, func() *retry.RetryError { toolchainTool, response, err = cdToolchainClient.GetToolByIDWithContext(context, getToolByIDOptions) if err != nil || toolchainTool == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_custom_test.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_custom_test.go index 816d9693df..7621ee8d46 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_custom_test.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_custom_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_devopsinsights.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_devopsinsights.go index 80200c3c12..d1f9c480ba 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_devopsinsights.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_devopsinsights.go @@ -14,7 +14,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -181,13 +181,13 @@ func resourceIBMCdToolchainToolDevopsinsightsRead(context context.Context, d *sc var toolchainTool *cdtoolchainv2.ToolchainTool var response *core.DetailedResponse - err = resource.RetryContext(context, 10*time.Second, func() *resource.RetryError { + err = retry.RetryContext(context, 10*time.Second, func() *retry.RetryError { toolchainTool, response, err = cdToolchainClient.GetToolByIDWithContext(context, getToolByIDOptions) if err != nil || toolchainTool == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_devopsinsights_test.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_devopsinsights_test.go index 603080f520..d456543a6a 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_devopsinsights_test.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_devopsinsights_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_eventnotifications.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_eventnotifications.go index 179aa6bfec..9690b997a8 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_eventnotifications.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_eventnotifications.go @@ -14,7 +14,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -207,13 +207,13 @@ func resourceIBMCdToolchainToolEventnotificationsRead(context context.Context, d var toolchainTool *cdtoolchainv2.ToolchainTool var response *core.DetailedResponse - err = resource.RetryContext(context, 10*time.Second, func() *resource.RetryError { + err = retry.RetryContext(context, 10*time.Second, func() *retry.RetryError { toolchainTool, response, err = cdToolchainClient.GetToolByIDWithContext(context, getToolByIDOptions) if err != nil || toolchainTool == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_eventnotifications_test.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_eventnotifications_test.go index 864139b333..477f7162db 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_eventnotifications_test.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_eventnotifications_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_githubconsolidated.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_githubconsolidated.go index 8ff3fc7a73..1d85b0e904 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_githubconsolidated.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_githubconsolidated.go @@ -14,7 +14,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -396,13 +396,13 @@ func resourceIBMCdToolchainToolGithubconsolidatedRead(context context.Context, d var toolchainTool *cdtoolchainv2.ToolchainTool var response *core.DetailedResponse - err = resource.RetryContext(context, 10*time.Second, func() *resource.RetryError { + err = retry.RetryContext(context, 10*time.Second, func() *retry.RetryError { toolchainTool, response, err = cdToolchainClient.GetToolByIDWithContext(context, getToolByIDOptions) if err != nil || toolchainTool == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_githubconsolidated_test.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_githubconsolidated_test.go index 988dd7be60..6c7e50a5ac 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_githubconsolidated_test.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_githubconsolidated_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_gitlab.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_gitlab.go index 10389be11e..3818c1ef8f 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_gitlab.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_gitlab.go @@ -14,7 +14,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -383,13 +383,13 @@ func resourceIBMCdToolchainToolGitlabRead(context context.Context, d *schema.Res var toolchainTool *cdtoolchainv2.ToolchainTool var response *core.DetailedResponse - err = resource.RetryContext(context, 10*time.Second, func() *resource.RetryError { + err = retry.RetryContext(context, 10*time.Second, func() *retry.RetryError { toolchainTool, response, err = cdToolchainClient.GetToolByIDWithContext(context, getToolByIDOptions) if err != nil || toolchainTool == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_gitlab_test.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_gitlab_test.go index b20add3f04..2d8c6e2fcd 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_gitlab_test.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_gitlab_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_hashicorpvault.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_hashicorpvault.go index 1cfb3fd5d6..93e688cc3a 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_hashicorpvault.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_hashicorpvault.go @@ -14,7 +14,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -262,13 +262,13 @@ func resourceIBMCdToolchainToolHashicorpvaultRead(context context.Context, d *sc var toolchainTool *cdtoolchainv2.ToolchainTool var response *core.DetailedResponse - err = resource.RetryContext(context, 10*time.Second, func() *resource.RetryError { + err = retry.RetryContext(context, 10*time.Second, func() *retry.RetryError { toolchainTool, response, err = cdToolchainClient.GetToolByIDWithContext(context, getToolByIDOptions) if err != nil || toolchainTool == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_hashicorpvault_test.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_hashicorpvault_test.go index 0f9fd1e09a..17eda36034 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_hashicorpvault_test.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_hashicorpvault_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_hostedgit.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_hostedgit.go index 1bb27af5e7..1d7f001aee 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_hostedgit.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_hostedgit.go @@ -14,7 +14,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -346,13 +346,13 @@ func resourceIBMCdToolchainToolHostedgitRead(context context.Context, d *schema. var toolchainTool *cdtoolchainv2.ToolchainTool var response *core.DetailedResponse - err = resource.RetryContext(context, 10*time.Second, func() *resource.RetryError { + err = retry.RetryContext(context, 10*time.Second, func() *retry.RetryError { toolchainTool, response, err = cdToolchainClient.GetToolByIDWithContext(context, getToolByIDOptions) if err != nil || toolchainTool == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_hostedgit_test.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_hostedgit_test.go index bb8a27ea94..aac418acc9 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_hostedgit_test.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_hostedgit_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_jenkins.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_jenkins.go index 1d48a0d469..4dc70af316 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_jenkins.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_jenkins.go @@ -14,7 +14,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -223,13 +223,13 @@ func resourceIBMCdToolchainToolJenkinsRead(context context.Context, d *schema.Re var toolchainTool *cdtoolchainv2.ToolchainTool var response *core.DetailedResponse - err = resource.RetryContext(context, 10*time.Second, func() *resource.RetryError { + err = retry.RetryContext(context, 10*time.Second, func() *retry.RetryError { toolchainTool, response, err = cdToolchainClient.GetToolByIDWithContext(context, getToolByIDOptions) if err != nil || toolchainTool == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_jenkins_test.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_jenkins_test.go index e4c14d1755..63d429bca9 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_jenkins_test.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_jenkins_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_jira.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_jira.go index 2ed2f88e8f..bce4fd25ec 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_jira.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_jira.go @@ -14,7 +14,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -226,13 +226,13 @@ func resourceIBMCdToolchainToolJiraRead(context context.Context, d *schema.Resou var toolchainTool *cdtoolchainv2.ToolchainTool var response *core.DetailedResponse - err = resource.RetryContext(context, 10*time.Second, func() *resource.RetryError { + err = retry.RetryContext(context, 10*time.Second, func() *retry.RetryError { toolchainTool, response, err = cdToolchainClient.GetToolByIDWithContext(context, getToolByIDOptions) if err != nil || toolchainTool == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_jira_test.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_jira_test.go index 0e4a150eaf..c395112db6 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_jira_test.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_jira_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_keyprotect.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_keyprotect.go index 6552204e5c..ebfe2ec466 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_keyprotect.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_keyprotect.go @@ -14,7 +14,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -219,13 +219,13 @@ func resourceIBMCdToolchainToolKeyprotectRead(context context.Context, d *schema var toolchainTool *cdtoolchainv2.ToolchainTool var response *core.DetailedResponse - err = resource.RetryContext(context, 10*time.Second, func() *resource.RetryError { + err = retry.RetryContext(context, 10*time.Second, func() *retry.RetryError { toolchainTool, response, err = cdToolchainClient.GetToolByIDWithContext(context, getToolByIDOptions) if err != nil || toolchainTool == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_keyprotect_test.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_keyprotect_test.go index b5363afb16..5776060225 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_keyprotect_test.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_keyprotect_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_nexus.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_nexus.go index b85bf6d10e..ec7c21089c 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_nexus.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_nexus.go @@ -14,7 +14,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -239,13 +239,13 @@ func resourceIBMCdToolchainToolNexusRead(context context.Context, d *schema.Reso var toolchainTool *cdtoolchainv2.ToolchainTool var response *core.DetailedResponse - err = resource.RetryContext(context, 10*time.Second, func() *resource.RetryError { + err = retry.RetryContext(context, 10*time.Second, func() *retry.RetryError { toolchainTool, response, err = cdToolchainClient.GetToolByIDWithContext(context, getToolByIDOptions) if err != nil || toolchainTool == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_nexus_test.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_nexus_test.go index 7fd4423c01..197228ad5c 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_nexus_test.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_nexus_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_pagerduty.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_pagerduty.go index fdc063b536..9087f4c1f3 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_pagerduty.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_pagerduty.go @@ -14,7 +14,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -213,13 +213,13 @@ func resourceIBMCdToolchainToolPagerdutyRead(context context.Context, d *schema. var toolchainTool *cdtoolchainv2.ToolchainTool var response *core.DetailedResponse - err = resource.RetryContext(context, 10*time.Second, func() *resource.RetryError { + err = retry.RetryContext(context, 10*time.Second, func() *retry.RetryError { toolchainTool, response, err = cdToolchainClient.GetToolByIDWithContext(context, getToolByIDOptions) if err != nil || toolchainTool == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_pagerduty_test.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_pagerduty_test.go index 03f912f1e5..6a596399d7 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_pagerduty_test.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_pagerduty_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_pipeline.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_pipeline.go index b6a18791eb..032b732839 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_pipeline.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_pipeline.go @@ -14,7 +14,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -200,13 +200,13 @@ func resourceIBMCdToolchainToolPipelineRead(context context.Context, d *schema.R var toolchainTool *cdtoolchainv2.ToolchainTool var response *core.DetailedResponse - err = resource.RetryContext(context, 10*time.Second, func() *resource.RetryError { + err = retry.RetryContext(context, 10*time.Second, func() *retry.RetryError { toolchainTool, response, err = cdToolchainClient.GetToolByIDWithContext(context, getToolByIDOptions) if err != nil || toolchainTool == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_pipeline_test.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_pipeline_test.go index 72434734eb..72b18d2668 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_pipeline_test.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_pipeline_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_privateworker.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_privateworker.go index ae682371e6..3a89ed11fe 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_privateworker.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_privateworker.go @@ -14,7 +14,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -216,13 +216,13 @@ func resourceIBMCdToolchainToolPrivateworkerRead(context context.Context, d *sch var toolchainTool *cdtoolchainv2.ToolchainTool var response *core.DetailedResponse - err = resource.RetryContext(context, 10*time.Second, func() *resource.RetryError { + err = retry.RetryContext(context, 10*time.Second, func() *retry.RetryError { toolchainTool, response, err = cdToolchainClient.GetToolByIDWithContext(context, getToolByIDOptions) if err != nil || toolchainTool == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_privateworker_test.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_privateworker_test.go index 64f249b402..d9f09e36a9 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_privateworker_test.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_privateworker_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_saucelabs.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_saucelabs.go index 9d6f96dfb0..f398781356 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_saucelabs.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_saucelabs.go @@ -14,7 +14,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -209,13 +209,13 @@ func resourceIBMCdToolchainToolSaucelabsRead(context context.Context, d *schema. var toolchainTool *cdtoolchainv2.ToolchainTool var response *core.DetailedResponse - err = resource.RetryContext(context, 10*time.Second, func() *resource.RetryError { + err = retry.RetryContext(context, 10*time.Second, func() *retry.RetryError { toolchainTool, response, err = cdToolchainClient.GetToolByIDWithContext(context, getToolByIDOptions) if err != nil || toolchainTool == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_saucelabs_test.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_saucelabs_test.go index 5b37024a49..5883e677b2 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_saucelabs_test.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_saucelabs_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_secretsmanager.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_secretsmanager.go index 7d9ed423e3..c11df3fbba 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_secretsmanager.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_secretsmanager.go @@ -14,7 +14,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -231,13 +231,13 @@ func resourceIBMCdToolchainToolSecretsmanagerRead(context context.Context, d *sc var toolchainTool *cdtoolchainv2.ToolchainTool var response *core.DetailedResponse - err = resource.RetryContext(context, 10*time.Second, func() *resource.RetryError { + err = retry.RetryContext(context, 10*time.Second, func() *retry.RetryError { toolchainTool, response, err = cdToolchainClient.GetToolByIDWithContext(context, getToolByIDOptions) if err != nil || toolchainTool == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_secretsmanager_test.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_secretsmanager_test.go index 36440edfef..1e4b74bbe6 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_secretsmanager_test.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_secretsmanager_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_securitycompliance.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_securitycompliance.go index c25c4f0d3b..cf79bec891 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_securitycompliance.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_securitycompliance.go @@ -14,7 +14,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -244,13 +244,13 @@ func resourceIBMCdToolchainToolSecuritycomplianceRead(context context.Context, d var toolchainTool *cdtoolchainv2.ToolchainTool var response *core.DetailedResponse - err = resource.RetryContext(context, 10*time.Second, func() *resource.RetryError { + err = retry.RetryContext(context, 10*time.Second, func() *retry.RetryError { toolchainTool, response, err = cdToolchainClient.GetToolByIDWithContext(context, getToolByIDOptions) if err != nil || toolchainTool == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_securitycompliance_test.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_securitycompliance_test.go index dd7d5f1aab..7041f1fce4 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_securitycompliance_test.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_securitycompliance_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_slack.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_slack.go index 79912d13d2..8721d24e24 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_slack.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_slack.go @@ -14,7 +14,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -245,13 +245,13 @@ func resourceIBMCdToolchainToolSlackRead(context context.Context, d *schema.Reso var toolchainTool *cdtoolchainv2.ToolchainTool var response *core.DetailedResponse - err = resource.RetryContext(context, 10*time.Second, func() *resource.RetryError { + err = retry.RetryContext(context, 10*time.Second, func() *retry.RetryError { toolchainTool, response, err = cdToolchainClient.GetToolByIDWithContext(context, getToolByIDOptions) if err != nil || toolchainTool == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_slack_test.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_slack_test.go index 1c8fd4c0ea..8dfc3d93df 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_slack_test.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_slack_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_sonarqube.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_sonarqube.go index d88104abcc..131f0ea657 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_sonarqube.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_sonarqube.go @@ -14,7 +14,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -225,13 +225,13 @@ func resourceIBMCdToolchainToolSonarqubeRead(context context.Context, d *schema. var toolchainTool *cdtoolchainv2.ToolchainTool var response *core.DetailedResponse - err = resource.RetryContext(context, 10*time.Second, func() *resource.RetryError { + err = retry.RetryContext(context, 10*time.Second, func() *retry.RetryError { toolchainTool, response, err = cdToolchainClient.GetToolByIDWithContext(context, getToolByIDOptions) if err != nil || toolchainTool == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_sonarqube_test.go b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_sonarqube_test.go index f147bdfd04..dc14752196 100644 --- a/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_sonarqube_test.go +++ b/ibm/service/cdtoolchain/resource_ibm_cd_toolchain_tool_sonarqube_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cis/data_source_ibm_cis_alert_webhooks_test.go b/ibm/service/cis/data_source_ibm_cis_alert_webhooks_test.go index 3298aa20b4..2ff85640c1 100644 --- a/ibm/service/cis/data_source_ibm_cis_alert_webhooks_test.go +++ b/ibm/service/cis/data_source_ibm_cis_alert_webhooks_test.go @@ -6,7 +6,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisWebhookskDataSource_basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_alerts_test.go b/ibm/service/cis/data_source_ibm_cis_alerts_test.go index 77ce82aa2a..4fdff448d3 100644 --- a/ibm/service/cis/data_source_ibm_cis_alerts_test.go +++ b/ibm/service/cis/data_source_ibm_cis_alerts_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisAlertsDataSource_Basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_bot_analytics_test.go b/ibm/service/cis/data_source_ibm_cis_bot_analytics_test.go index 690ba78d51..88b2d599d5 100644 --- a/ibm/service/cis/data_source_ibm_cis_bot_analytics_test.go +++ b/ibm/service/cis/data_source_ibm_cis_bot_analytics_test.go @@ -11,7 +11,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisBotAnalyticsDataSource_Basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_bot_managements_test.go b/ibm/service/cis/data_source_ibm_cis_bot_managements_test.go index b148b3f64b..954b3535d4 100644 --- a/ibm/service/cis/data_source_ibm_cis_bot_managements_test.go +++ b/ibm/service/cis/data_source_ibm_cis_bot_managements_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisBotManagementDataSource_Basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_cache_settings_test.go b/ibm/service/cis/data_source_ibm_cis_cache_settings_test.go index e730fae8b4..41113f184c 100644 --- a/ibm/service/cis/data_source_ibm_cis_cache_settings_test.go +++ b/ibm/service/cis/data_source_ibm_cis_cache_settings_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisCacheSettingsDataSource_Basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_certificates_test.go b/ibm/service/cis/data_source_ibm_cis_certificates_test.go index 2cae37d81e..0b5ac1c4dc 100644 --- a/ibm/service/cis/data_source_ibm_cis_certificates_test.go +++ b/ibm/service/cis/data_source_ibm_cis_certificates_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisCertificatesDataSource_basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_custom_certificates_test.go b/ibm/service/cis/data_source_ibm_cis_custom_certificates_test.go index 6963b70625..8eab5199a1 100644 --- a/ibm/service/cis/data_source_ibm_cis_custom_certificates_test.go +++ b/ibm/service/cis/data_source_ibm_cis_custom_certificates_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisCustomCertificatesDataSource_basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_custom_pages_test.go b/ibm/service/cis/data_source_ibm_cis_custom_pages_test.go index 060e48b1a3..d1234eab6e 100644 --- a/ibm/service/cis/data_source_ibm_cis_custom_pages_test.go +++ b/ibm/service/cis/data_source_ibm_cis_custom_pages_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisCustomPagesDataSource_basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_dns_records_test.go b/ibm/service/cis/data_source_ibm_cis_dns_records_test.go index 9abe23a9bc..50a1d68ed5 100644 --- a/ibm/service/cis/data_source_ibm_cis_dns_records_test.go +++ b/ibm/service/cis/data_source_ibm_cis_dns_records_test.go @@ -12,8 +12,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMCisDNSRecordsDataSource_basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_domain_test.go b/ibm/service/cis/data_source_ibm_cis_domain_test.go index d49a2ad794..66e64a5fc7 100644 --- a/ibm/service/cis/data_source_ibm_cis_domain_test.go +++ b/ibm/service/cis/data_source_ibm_cis_domain_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisDomainDataSource_Basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_edge_functions_actions_test.go b/ibm/service/cis/data_source_ibm_cis_edge_functions_actions_test.go index da2c7be6c9..a43fbe5514 100644 --- a/ibm/service/cis/data_source_ibm_cis_edge_functions_actions_test.go +++ b/ibm/service/cis/data_source_ibm_cis_edge_functions_actions_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisEdgeFunctionsActionsDataSource_basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_edge_functions_triggers_test.go b/ibm/service/cis/data_source_ibm_cis_edge_functions_triggers_test.go index e4687376cd..83cd70723a 100644 --- a/ibm/service/cis/data_source_ibm_cis_edge_functions_triggers_test.go +++ b/ibm/service/cis/data_source_ibm_cis_edge_functions_triggers_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisEdgeFunctionsTriggersDataSource_basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_filters_test.go b/ibm/service/cis/data_source_ibm_cis_filters_test.go index 3799edc780..e5c7d83f91 100644 --- a/ibm/service/cis/data_source_ibm_cis_filters_test.go +++ b/ibm/service/cis/data_source_ibm_cis_filters_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisFilterDataSource_Basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_firewall_rule_test.go b/ibm/service/cis/data_source_ibm_cis_firewall_rule_test.go index 286b878436..89209ac929 100644 --- a/ibm/service/cis/data_source_ibm_cis_firewall_rule_test.go +++ b/ibm/service/cis/data_source_ibm_cis_firewall_rule_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisFirewallRulesDataSource_Basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_firewall_test.go b/ibm/service/cis/data_source_ibm_cis_firewall_test.go index edd695dd49..ebd8a2c545 100644 --- a/ibm/service/cis/data_source_ibm_cis_firewall_test.go +++ b/ibm/service/cis/data_source_ibm_cis_firewall_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisFirewallLockdownDataSource_Basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_global_load_balancers_test.go b/ibm/service/cis/data_source_ibm_cis_global_load_balancers_test.go index 5eeb391a90..e335f9a774 100644 --- a/ibm/service/cis/data_source_ibm_cis_global_load_balancers_test.go +++ b/ibm/service/cis/data_source_ibm_cis_global_load_balancers_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisGLBDataSource_basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_healthchecks_test.go b/ibm/service/cis/data_source_ibm_cis_healthchecks_test.go index da5a654b35..fcfb80d707 100644 --- a/ibm/service/cis/data_source_ibm_cis_healthchecks_test.go +++ b/ibm/service/cis/data_source_ibm_cis_healthchecks_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisGLBHealthCheckDataSource_basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_ip_addresses_test.go b/ibm/service/cis/data_source_ibm_cis_ip_addresses_test.go index e66a782d32..fb87c01b96 100644 --- a/ibm/service/cis/data_source_ibm_cis_ip_addresses_test.go +++ b/ibm/service/cis/data_source_ibm_cis_ip_addresses_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMCisIPDataSource_Basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_mtls_app_test.go b/ibm/service/cis/data_source_ibm_cis_mtls_app_test.go index 55440955ed..dcbeb1ec03 100644 --- a/ibm/service/cis/data_source_ibm_cis_mtls_app_test.go +++ b/ibm/service/cis/data_source_ibm_cis_mtls_app_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisMtlsAppDataSource_Basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_mtls_test.go b/ibm/service/cis/data_source_ibm_cis_mtls_test.go index b5eb9c61fd..0a7ef16de8 100644 --- a/ibm/service/cis/data_source_ibm_cis_mtls_test.go +++ b/ibm/service/cis/data_source_ibm_cis_mtls_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisMtlsDataSource_Basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_origin_auth_test.go b/ibm/service/cis/data_source_ibm_cis_origin_auth_test.go index e79bd17870..ed37770cef 100644 --- a/ibm/service/cis/data_source_ibm_cis_origin_auth_test.go +++ b/ibm/service/cis/data_source_ibm_cis_origin_auth_test.go @@ -6,7 +6,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisOrigAuthDataSource_basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_origin_certificate_order_test.go b/ibm/service/cis/data_source_ibm_cis_origin_certificate_order_test.go index 3cce40e001..ee42ed8372 100644 --- a/ibm/service/cis/data_source_ibm_cis_origin_certificate_order_test.go +++ b/ibm/service/cis/data_source_ibm_cis_origin_certificate_order_test.go @@ -8,7 +8,7 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisOriginCertificateDataSource_Basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_origin_pools_test.go b/ibm/service/cis/data_source_ibm_cis_origin_pools_test.go index 082705e7fb..d72212b5ff 100644 --- a/ibm/service/cis/data_source_ibm_cis_origin_pools_test.go +++ b/ibm/service/cis/data_source_ibm_cis_origin_pools_test.go @@ -8,8 +8,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisPoolsDataSource_Basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_page_rules_test.go b/ibm/service/cis/data_source_ibm_cis_page_rules_test.go index b5baf39416..4bf1a91092 100644 --- a/ibm/service/cis/data_source_ibm_cis_page_rules_test.go +++ b/ibm/service/cis/data_source_ibm_cis_page_rules_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisPageRuleDataSource_basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_range_apps_test.go b/ibm/service/cis/data_source_ibm_cis_range_apps_test.go index 13d9c19938..e6426ff5c0 100644 --- a/ibm/service/cis/data_source_ibm_cis_range_apps_test.go +++ b/ibm/service/cis/data_source_ibm_cis_range_apps_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisRangeAppsDataSource_basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_rate_limit_test.go b/ibm/service/cis/data_source_ibm_cis_rate_limit_test.go index 80d305fff1..220a24f7e9 100644 --- a/ibm/service/cis/data_source_ibm_cis_rate_limit_test.go +++ b/ibm/service/cis/data_source_ibm_cis_rate_limit_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisRateLimitDataSource_Basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_ruleset_entrypoint_version_test.go b/ibm/service/cis/data_source_ibm_cis_ruleset_entrypoint_version_test.go index 4be4215406..9fea02bde4 100644 --- a/ibm/service/cis/data_source_ibm_cis_ruleset_entrypoint_version_test.go +++ b/ibm/service/cis/data_source_ibm_cis_ruleset_entrypoint_version_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCISRulesetEntrypointVersionsDataSource_Basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_ruleset_rules_by_tags_test.go b/ibm/service/cis/data_source_ibm_cis_ruleset_rules_by_tags_test.go index 9e89a9a6c4..d8e530f8b7 100644 --- a/ibm/service/cis/data_source_ibm_cis_ruleset_rules_by_tags_test.go +++ b/ibm/service/cis/data_source_ibm_cis_ruleset_rules_by_tags_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCISRulesetRulesDataSource_Basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_ruleset_versions_test.go b/ibm/service/cis/data_source_ibm_cis_ruleset_versions_test.go index 71b91eef2c..8f467e79c6 100644 --- a/ibm/service/cis/data_source_ibm_cis_ruleset_versions_test.go +++ b/ibm/service/cis/data_source_ibm_cis_ruleset_versions_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCISRulesetVersionsDataSource_Basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_rulesets_test.go b/ibm/service/cis/data_source_ibm_cis_rulesets_test.go index 45c9d0e1a8..ee14ecea73 100644 --- a/ibm/service/cis/data_source_ibm_cis_rulesets_test.go +++ b/ibm/service/cis/data_source_ibm_cis_rulesets_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisRulesetsDataSource_Basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_test.go b/ibm/service/cis/data_source_ibm_cis_test.go index dcd33bb1e7..16df2c4dd4 100644 --- a/ibm/service/cis/data_source_ibm_cis_test.go +++ b/ibm/service/cis/data_source_ibm_cis_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisDataSource_basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_waf_groups_test.go b/ibm/service/cis/data_source_ibm_cis_waf_groups_test.go index 1a2d527438..b96126d6b0 100644 --- a/ibm/service/cis/data_source_ibm_cis_waf_groups_test.go +++ b/ibm/service/cis/data_source_ibm_cis_waf_groups_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisWAFGroupsDataSource_Basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_waf_packages_test.go b/ibm/service/cis/data_source_ibm_cis_waf_packages_test.go index 2f83e2b753..6343f0ab34 100644 --- a/ibm/service/cis/data_source_ibm_cis_waf_packages_test.go +++ b/ibm/service/cis/data_source_ibm_cis_waf_packages_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisWAFPackagesDataSource_basic(t *testing.T) { diff --git a/ibm/service/cis/data_source_ibm_cis_waf_rules_test.go b/ibm/service/cis/data_source_ibm_cis_waf_rules_test.go index 93d374e2d9..7e52a49f83 100644 --- a/ibm/service/cis/data_source_ibm_cis_waf_rules_test.go +++ b/ibm/service/cis/data_source_ibm_cis_waf_rules_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisWAFRulesDataSource_Basic(t *testing.T) { diff --git a/ibm/service/cis/datasource_ibm_cis_logpush_jobs_test.go b/ibm/service/cis/datasource_ibm_cis_logpush_jobs_test.go index 8098b57dfb..f4ba0be17f 100644 --- a/ibm/service/cis/datasource_ibm_cis_logpush_jobs_test.go +++ b/ibm/service/cis/datasource_ibm_cis_logpush_jobs_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisLogpushJobsDataSource_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis.go b/ibm/service/cis/resource_ibm_cis.go index 178f21ff89..7abfa50df4 100644 --- a/ibm/service/cis/resource_ibm_cis.go +++ b/ibm/service/cis/resource_ibm_cis.go @@ -14,7 +14,7 @@ import ( rc "github.com/IBM/platform-services-go-sdk/resourcecontrollerv2" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/bluemix-go/bmxerror" @@ -463,7 +463,7 @@ func waitForCISInstanceCreate(d *schema.ResourceData, meta interface{}, instance } //instanceID := d.Id() - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{CisInstanceProgressStatus, CisInstanceInactiveStatus, cisInstanceProvisioningStatus}, Target: []string{CisInstanceSuccessStatus}, Refresh: func() (interface{}, string, error) { @@ -498,7 +498,7 @@ func waitForCISInstanceUpdate(d *schema.ResourceData, meta interface{}) (interfa } instanceID := d.Id() - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{CisInstanceProgressStatus, CisInstanceInactiveStatus}, Target: []string{CisInstanceSuccessStatus}, Refresh: func() (interface{}, string, error) { @@ -532,7 +532,7 @@ func waitForCISInstanceDelete(d *schema.ResourceData, meta interface{}) (interfa return false, err } instanceID := d.Id() - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{CisInstanceProgressStatus, CisInstanceInactiveStatus, CisInstanceSuccessStatus}, Target: []string{CisInstanceRemovedStatus, cisInstanceReclamation}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/cis/resource_ibm_cis_advanced_certificate_pack_order_test.go b/ibm/service/cis/resource_ibm_cis_advanced_certificate_pack_order_test.go index c5360158e0..d6ed2f6f74 100644 --- a/ibm/service/cis/resource_ibm_cis_advanced_certificate_pack_order_test.go +++ b/ibm/service/cis/resource_ibm_cis_advanced_certificate_pack_order_test.go @@ -8,7 +8,7 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisAdvancedCertificatepackOrder_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_alert_test.go b/ibm/service/cis/resource_ibm_cis_alert_test.go index e87b424fd0..f296ad7d7a 100644 --- a/ibm/service/cis/resource_ibm_cis_alert_test.go +++ b/ibm/service/cis/resource_ibm_cis_alert_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisAlert_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_alert_webhook_test.go b/ibm/service/cis/resource_ibm_cis_alert_webhook_test.go index 5fe270e003..ce02e3d616 100644 --- a/ibm/service/cis/resource_ibm_cis_alert_webhook_test.go +++ b/ibm/service/cis/resource_ibm_cis_alert_webhook_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisWebhooks_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_bot_management_test.go b/ibm/service/cis/resource_ibm_cis_bot_management_test.go index 49bbe2f656..f87ca2bfd4 100644 --- a/ibm/service/cis/resource_ibm_cis_bot_management_test.go +++ b/ibm/service/cis/resource_ibm_cis_bot_management_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisBotManagement_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_cache_settings_test.go b/ibm/service/cis/resource_ibm_cis_cache_settings_test.go index b827142df2..076a8d7504 100644 --- a/ibm/service/cis/resource_ibm_cis_cache_settings_test.go +++ b/ibm/service/cis/resource_ibm_cis_cache_settings_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisCacheSettings_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_certificate_order.go b/ibm/service/cis/resource_ibm_cis_certificate_order.go index f1ef286c5a..3ba425b7e3 100644 --- a/ibm/service/cis/resource_ibm_cis_certificate_order.go +++ b/ibm/service/cis/resource_ibm_cis_certificate_order.go @@ -11,7 +11,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/IBM/go-sdk-core/v5/core" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -219,7 +219,7 @@ func waitForCISCertificateOrderDelete(d *schema.ResourceData, meta interface{}) cisClient.Crn = core.StringPtr(crn) cisClient.ZoneIdentifier = core.StringPtr(zoneID) opt := cisClient.NewGetCustomCertificateOptions(certificateID) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{cisCertificateOrderDeletePending}, Target: []string{cisCertificateOrderDeleted}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/cis/resource_ibm_cis_certificate_order_test.go b/ibm/service/cis/resource_ibm_cis_certificate_order_test.go index 52a14022b0..381bb7e7a1 100644 --- a/ibm/service/cis/resource_ibm_cis_certificate_order_test.go +++ b/ibm/service/cis/resource_ibm_cis_certificate_order_test.go @@ -12,8 +12,8 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/go-sdk-core/v5/core" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMCisCertificateOrder_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_certificate_upload.go b/ibm/service/cis/resource_ibm_cis_certificate_upload.go index 374374a01a..52f59cc41e 100644 --- a/ibm/service/cis/resource_ibm_cis_certificate_upload.go +++ b/ibm/service/cis/resource_ibm_cis_certificate_upload.go @@ -13,7 +13,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/IBM/go-sdk-core/v5/core" cissslv1 "github.com/IBM/networking-go-sdk/sslcertificateapiv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -348,7 +348,7 @@ func waitForCISCertificateUploadDelete(d *schema.ResourceData, meta interface{}) cisClient.ZoneIdentifier = core.StringPtr(zoneID) opt := cisClient.NewGetCustomCertificateOptions(certID) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{cisCertificateUploadDeletePending}, Target: []string{cisCertificateUploadDeleted}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/cis/resource_ibm_cis_certificate_upload_test.go b/ibm/service/cis/resource_ibm_cis_certificate_upload_test.go index 8d72121cd0..849aa11799 100644 --- a/ibm/service/cis/resource_ibm_cis_certificate_upload_test.go +++ b/ibm/service/cis/resource_ibm_cis_certificate_upload_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/go-sdk-core/v5/core" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMCisCertificateUpload_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_custom_page_test.go b/ibm/service/cis/resource_ibm_cis_custom_page_test.go index a37246b636..e2f152c9dd 100644 --- a/ibm/service/cis/resource_ibm_cis_custom_page_test.go +++ b/ibm/service/cis/resource_ibm_cis_custom_page_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisCustomPage_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_dns_record_test.go b/ibm/service/cis/resource_ibm_cis_dns_record_test.go index d6d5164d69..f590f8c842 100644 --- a/ibm/service/cis/resource_ibm_cis_dns_record_test.go +++ b/ibm/service/cis/resource_ibm_cis_dns_record_test.go @@ -12,8 +12,8 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/go-sdk-core/v5/core" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMCisDNSRecord_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_dns_records_import_test.go b/ibm/service/cis/resource_ibm_cis_dns_records_import_test.go index 3876d13f94..40e9c094c4 100644 --- a/ibm/service/cis/resource_ibm_cis_dns_records_import_test.go +++ b/ibm/service/cis/resource_ibm_cis_dns_records_import_test.go @@ -12,8 +12,8 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/go-sdk-core/v5/core" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMCisDNSRecordsImport_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_domain_settings_test.go b/ibm/service/cis/resource_ibm_cis_domain_settings_test.go index 5859d59be9..27fecd490d 100644 --- a/ibm/service/cis/resource_ibm_cis_domain_settings_test.go +++ b/ibm/service/cis/resource_ibm_cis_domain_settings_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/cis/resource_ibm_cis_domain_test.go b/ibm/service/cis/resource_ibm_cis_domain_test.go index 323c19dd71..8ac07a2b75 100644 --- a/ibm/service/cis/resource_ibm_cis_domain_test.go +++ b/ibm/service/cis/resource_ibm_cis_domain_test.go @@ -14,8 +14,8 @@ import ( "github.com/IBM/go-sdk-core/v5/core" "github.com/google/uuid" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMCisDomain_basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_edge_functions_action_test.go b/ibm/service/cis/resource_ibm_cis_edge_functions_action_test.go index 00f26a7191..ec461e05a5 100644 --- a/ibm/service/cis/resource_ibm_cis_edge_functions_action_test.go +++ b/ibm/service/cis/resource_ibm_cis_edge_functions_action_test.go @@ -12,8 +12,8 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/go-sdk-core/v5/core" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMCisEdgeFunctionsAction_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_edge_functions_trigger_test.go b/ibm/service/cis/resource_ibm_cis_edge_functions_trigger_test.go index 7035aa2ab7..699bb3c13a 100644 --- a/ibm/service/cis/resource_ibm_cis_edge_functions_trigger_test.go +++ b/ibm/service/cis/resource_ibm_cis_edge_functions_trigger_test.go @@ -12,8 +12,8 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/go-sdk-core/v5/core" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMCisEdgeFunctionsTrigger_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_filter_test.go b/ibm/service/cis/resource_ibm_cis_filter_test.go index b2d5990770..f268f6910f 100644 --- a/ibm/service/cis/resource_ibm_cis_filter_test.go +++ b/ibm/service/cis/resource_ibm_cis_filter_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisFilter_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_firewall_rules_test.go b/ibm/service/cis/resource_ibm_cis_firewall_rules_test.go index dade30081b..6a21012f43 100644 --- a/ibm/service/cis/resource_ibm_cis_firewall_rules_test.go +++ b/ibm/service/cis/resource_ibm_cis_firewall_rules_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisFirewallrules_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_firewall_test.go b/ibm/service/cis/resource_ibm_cis_firewall_test.go index 65325719a1..735656da3e 100644 --- a/ibm/service/cis/resource_ibm_cis_firewall_test.go +++ b/ibm/service/cis/resource_ibm_cis_firewall_test.go @@ -13,8 +13,8 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/go-sdk-core/v5/core" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMCisFirewall_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_global_load_balancer_test.go b/ibm/service/cis/resource_ibm_cis_global_load_balancer_test.go index 7e8d312c32..b62707ed8e 100644 --- a/ibm/service/cis/resource_ibm_cis_global_load_balancer_test.go +++ b/ibm/service/cis/resource_ibm_cis_global_load_balancer_test.go @@ -13,8 +13,8 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/go-sdk-core/v5/core" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMCisGlb_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_healthcheck_test.go b/ibm/service/cis/resource_ibm_cis_healthcheck_test.go index 8f534d0d74..10acf30736 100644 --- a/ibm/service/cis/resource_ibm_cis_healthcheck_test.go +++ b/ibm/service/cis/resource_ibm_cis_healthcheck_test.go @@ -12,8 +12,8 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/go-sdk-core/v5/core" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMCisHealthcheck_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_logpush_job_test.go b/ibm/service/cis/resource_ibm_cis_logpush_job_test.go index 7df99e2d49..196c767454 100644 --- a/ibm/service/cis/resource_ibm_cis_logpush_job_test.go +++ b/ibm/service/cis/resource_ibm_cis_logpush_job_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisLogpushJobs_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_mtls_app_test.go b/ibm/service/cis/resource_ibm_cis_mtls_app_test.go index 7ea9098a5e..0f47fa9caf 100644 --- a/ibm/service/cis/resource_ibm_cis_mtls_app_test.go +++ b/ibm/service/cis/resource_ibm_cis_mtls_app_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisMtlsApp_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_mtls_test.go b/ibm/service/cis/resource_ibm_cis_mtls_test.go index b18bcf8eff..7023b3eb7f 100644 --- a/ibm/service/cis/resource_ibm_cis_mtls_test.go +++ b/ibm/service/cis/resource_ibm_cis_mtls_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisMtls_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_origin_auth_test.go b/ibm/service/cis/resource_ibm_cis_origin_auth_test.go index 43ae58f669..babcd7688e 100644 --- a/ibm/service/cis/resource_ibm_cis_origin_auth_test.go +++ b/ibm/service/cis/resource_ibm_cis_origin_auth_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisOriginAuth_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_origin_certificate_order_test.go b/ibm/service/cis/resource_ibm_cis_origin_certificate_order_test.go index d3b338f7d3..b74b621b6f 100644 --- a/ibm/service/cis/resource_ibm_cis_origin_certificate_order_test.go +++ b/ibm/service/cis/resource_ibm_cis_origin_certificate_order_test.go @@ -8,7 +8,7 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisOriginCertificate_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_origin_pool_test.go b/ibm/service/cis/resource_ibm_cis_origin_pool_test.go index 7741d053af..93bc4c95a6 100644 --- a/ibm/service/cis/resource_ibm_cis_origin_pool_test.go +++ b/ibm/service/cis/resource_ibm_cis_origin_pool_test.go @@ -13,9 +13,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/go-sdk-core/v5/core" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMCisPool_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_page_rule_test.go b/ibm/service/cis/resource_ibm_cis_page_rule_test.go index bdb0d14e2b..74bf24a435 100644 --- a/ibm/service/cis/resource_ibm_cis_page_rule_test.go +++ b/ibm/service/cis/resource_ibm_cis_page_rule_test.go @@ -12,8 +12,8 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/go-sdk-core/v5/core" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMCisPageRule_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_range_app_test.go b/ibm/service/cis/resource_ibm_cis_range_app_test.go index 17fed46090..6c454ecb2a 100644 --- a/ibm/service/cis/resource_ibm_cis_range_app_test.go +++ b/ibm/service/cis/resource_ibm_cis_range_app_test.go @@ -13,8 +13,8 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/go-sdk-core/v5/core" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMCisRangeApp_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_rate_limit_test.go b/ibm/service/cis/resource_ibm_cis_rate_limit_test.go index 92fe86e4cd..d6bc70e30e 100644 --- a/ibm/service/cis/resource_ibm_cis_rate_limit_test.go +++ b/ibm/service/cis/resource_ibm_cis_rate_limit_test.go @@ -12,8 +12,8 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/go-sdk-core/v5/core" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMCisRateLimit_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_routing_test.go b/ibm/service/cis/resource_ibm_cis_routing_test.go index 13d6f16426..4d99373b3e 100644 --- a/ibm/service/cis/resource_ibm_cis_routing_test.go +++ b/ibm/service/cis/resource_ibm_cis_routing_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisRouting_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_ruleset_rule_test.go b/ibm/service/cis/resource_ibm_cis_ruleset_rule_test.go index f94bfd9ed0..aa09b474ea 100644 --- a/ibm/service/cis/resource_ibm_cis_ruleset_rule_test.go +++ b/ibm/service/cis/resource_ibm_cis_ruleset_rule_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCISRulesetRule_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_test.go b/ibm/service/cis/resource_ibm_cis_test.go index a9cbda92c5..1e132fc880 100644 --- a/ibm/service/cis/resource_ibm_cis_test.go +++ b/ibm/service/cis/resource_ibm_cis_test.go @@ -15,9 +15,10 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" rc "github.com/IBM/platform-services-go-sdk/resourcecontrollerv2" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM-Cloud/bluemix-go/bmxerror" ) @@ -180,7 +181,7 @@ func testAccCisInstanceManuallyDeleteUnwrapped(s *terraform.State, tfCisId *stri return fmt.Errorf("[ERROR] Error deleting resource instance: %s %s", err, response) } - _ = &resource.StateChangeConf{ + _ = &retry.StateChangeConf{ Pending: []string{CisInstanceProgressStatus, CisInstanceInactiveStatus, CisInstanceSuccessStatus}, Target: []string{CisInstanceRemovedStatus}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/cis/resource_ibm_cis_tls_settings_test.go b/ibm/service/cis/resource_ibm_cis_tls_settings_test.go index 9ba38a27b9..f50f942226 100644 --- a/ibm/service/cis/resource_ibm_cis_tls_settings_test.go +++ b/ibm/service/cis/resource_ibm_cis_tls_settings_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisTLSSettings_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_waf_group_test.go b/ibm/service/cis/resource_ibm_cis_waf_group_test.go index 94d28a30c3..ed457fe490 100644 --- a/ibm/service/cis/resource_ibm_cis_waf_group_test.go +++ b/ibm/service/cis/resource_ibm_cis_waf_group_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisWAFGroup_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_waf_package_test.go b/ibm/service/cis/resource_ibm_cis_waf_package_test.go index 2cf39fab4c..926b3a7aad 100644 --- a/ibm/service/cis/resource_ibm_cis_waf_package_test.go +++ b/ibm/service/cis/resource_ibm_cis_waf_package_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisWAFPackage_Basic(t *testing.T) { diff --git a/ibm/service/cis/resource_ibm_cis_waf_rule_test.go b/ibm/service/cis/resource_ibm_cis_waf_rule_test.go index 37b6d892f5..5b4a0bd484 100644 --- a/ibm/service/cis/resource_ibm_cis_waf_rule_test.go +++ b/ibm/service/cis/resource_ibm_cis_waf_rule_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCisWAFRule_Basic1(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/data_source_ibm_compute_bare_metal_test.go b/ibm/service/classicinfrastructure/data_source_ibm_compute_bare_metal_test.go index aa3d8edb63..0f3700df19 100644 --- a/ibm/service/classicinfrastructure/data_source_ibm_compute_bare_metal_test.go +++ b/ibm/service/classicinfrastructure/data_source_ibm_compute_bare_metal_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMComputeBareMetalDataSource_basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/data_source_ibm_compute_image_template_test.go b/ibm/service/classicinfrastructure/data_source_ibm_compute_image_template_test.go index 603c0488c1..fa670165a7 100644 --- a/ibm/service/classicinfrastructure/data_source_ibm_compute_image_template_test.go +++ b/ibm/service/classicinfrastructure/data_source_ibm_compute_image_template_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMComputeImageTemplateDataSource_Basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/data_source_ibm_compute_placement_group_test.go b/ibm/service/classicinfrastructure/data_source_ibm_compute_placement_group_test.go index 8a14231746..a0982e3322 100644 --- a/ibm/service/classicinfrastructure/data_source_ibm_compute_placement_group_test.go +++ b/ibm/service/classicinfrastructure/data_source_ibm_compute_placement_group_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMComputePlacementGroupDataSource_Basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/data_source_ibm_compute_reserved_capacity_test.go b/ibm/service/classicinfrastructure/data_source_ibm_compute_reserved_capacity_test.go index 08ae77d556..23ed817cac 100644 --- a/ibm/service/classicinfrastructure/data_source_ibm_compute_reserved_capacity_test.go +++ b/ibm/service/classicinfrastructure/data_source_ibm_compute_reserved_capacity_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMComputeReservedCapacityDataSource_Basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/data_source_ibm_compute_ssh_key_test.go b/ibm/service/classicinfrastructure/data_source_ibm_compute_ssh_key_test.go index 6ca5e7fef6..78152cc41d 100644 --- a/ibm/service/classicinfrastructure/data_source_ibm_compute_ssh_key_test.go +++ b/ibm/service/classicinfrastructure/data_source_ibm_compute_ssh_key_test.go @@ -11,8 +11,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMComputeSSHKeyDataSource_basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/data_source_ibm_compute_vm_instance_test.go b/ibm/service/classicinfrastructure/data_source_ibm_compute_vm_instance_test.go index 341da1d850..99abe6f300 100644 --- a/ibm/service/classicinfrastructure/data_source_ibm_compute_vm_instance_test.go +++ b/ibm/service/classicinfrastructure/data_source_ibm_compute_vm_instance_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMComputeVmInstanceDataSource_basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/data_source_ibm_dns_domain_registration_test.go b/ibm/service/classicinfrastructure/data_source_ibm_dns_domain_registration_test.go index 07c5a60f8a..7ec2247ba6 100644 --- a/ibm/service/classicinfrastructure/data_source_ibm_dns_domain_registration_test.go +++ b/ibm/service/classicinfrastructure/data_source_ibm_dns_domain_registration_test.go @@ -10,7 +10,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMDNSDomainRegistrationDataSource_Basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/data_source_ibm_dns_domain_test.go b/ibm/service/classicinfrastructure/data_source_ibm_dns_domain_test.go index 7eac5aca4b..2e29c48ae6 100644 --- a/ibm/service/classicinfrastructure/data_source_ibm_dns_domain_test.go +++ b/ibm/service/classicinfrastructure/data_source_ibm_dns_domain_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMDNSDomainDataSource_Basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/data_source_ibm_dns_secondary_test.go b/ibm/service/classicinfrastructure/data_source_ibm_dns_secondary_test.go index d21ef924d0..21121e4d66 100644 --- a/ibm/service/classicinfrastructure/data_source_ibm_dns_secondary_test.go +++ b/ibm/service/classicinfrastructure/data_source_ibm_dns_secondary_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMDNSSecondaryDataSource_Basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/data_source_ibm_lbaas_test.go b/ibm/service/classicinfrastructure/data_source_ibm_lbaas_test.go index 1d8f00b6d6..2818edc2f6 100644 --- a/ibm/service/classicinfrastructure/data_source_ibm_lbaas_test.go +++ b/ibm/service/classicinfrastructure/data_source_ibm_lbaas_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMLbaasDataSource_basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/data_source_ibm_network_vlan_test.go b/ibm/service/classicinfrastructure/data_source_ibm_network_vlan_test.go index 21cb336458..799274e7a1 100644 --- a/ibm/service/classicinfrastructure/data_source_ibm_network_vlan_test.go +++ b/ibm/service/classicinfrastructure/data_source_ibm_network_vlan_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMNetworkVlanDataSource_Basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/data_source_ibm_security_group_test.go b/ibm/service/classicinfrastructure/data_source_ibm_security_group_test.go index b061df94c5..f56a40438a 100644 --- a/ibm/service/classicinfrastructure/data_source_ibm_security_group_test.go +++ b/ibm/service/classicinfrastructure/data_source_ibm_security_group_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/softlayer/softlayer-go/datatypes" ) diff --git a/ibm/service/classicinfrastructure/resource_ibm_cdn_test.go b/ibm/service/classicinfrastructure/resource_ibm_cdn_test.go index f48e0d6222..6d0a5f54a0 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_cdn_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_cdn_test.go @@ -11,8 +11,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/services" "github.com/softlayer/softlayer-go/sl" diff --git a/ibm/service/classicinfrastructure/resource_ibm_compute_autoscale_group.go b/ibm/service/classicinfrastructure/resource_ibm_compute_autoscale_group.go index e533e6b623..026a3a1861 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_compute_autoscale_group.go +++ b/ibm/service/classicinfrastructure/resource_ibm_compute_autoscale_group.go @@ -12,7 +12,7 @@ import ( "time" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/services" @@ -590,7 +590,7 @@ func waitForActiveStatus(d *schema.ResourceData, meta interface{}) (interface{}, return nil, fmt.Errorf("[ERROR] The scale group ID %s must be numeric", d.Id()) } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"BUSY", "SCALING", "SUSPENDED"}, Target: []string{"ACTIVE"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_compute_autoscale_group_test.go b/ibm/service/classicinfrastructure/resource_ibm_compute_autoscale_group_test.go index 96ee71314c..fbf0c09cda 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_compute_autoscale_group_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_compute_autoscale_group_test.go @@ -14,9 +14,9 @@ import ( "strings" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/services" ) diff --git a/ibm/service/classicinfrastructure/resource_ibm_compute_autoscale_policy_test.go b/ibm/service/classicinfrastructure/resource_ibm_compute_autoscale_policy_test.go index 14195f6efb..036bc326cc 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_compute_autoscale_policy_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_compute_autoscale_policy_test.go @@ -14,9 +14,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/services" ) diff --git a/ibm/service/classicinfrastructure/resource_ibm_compute_bare_metal.go b/ibm/service/classicinfrastructure/resource_ibm_compute_bare_metal.go index ff01de9be2..f3504f1d38 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_compute_bare_metal.go +++ b/ibm/service/classicinfrastructure/resource_ibm_compute_bare_metal.go @@ -13,7 +13,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/filter" @@ -885,7 +885,7 @@ func waitForBareMetalProvision(hw *datatypes.Hardware, d *schema.ResourceData, m domain := *hw.Domain log.Printf("Waiting for server (%s.%s) to have to be provisioned", hostname, domain) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", "pending"}, Target: []string{"provisioned"}, Refresh: func() (interface{}, string, error) { @@ -932,7 +932,7 @@ func waitForNoBareMetalActiveTransactions(id int, meta interface{}) (interface{} log.Printf("Waiting for server (%d) to have zero active transactions", id) service := services.GetHardwareServerService(meta.(conns.ClientSession).SoftLayerSession()) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", "active"}, Target: []string{"idle"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_compute_bare_metal_test.go b/ibm/service/classicinfrastructure/resource_ibm_compute_bare_metal_test.go index 38453eb50b..bd8a44697f 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_compute_bare_metal_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_compute_bare_metal_test.go @@ -12,9 +12,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/services" "github.com/softlayer/softlayer-go/sl" diff --git a/ibm/service/classicinfrastructure/resource_ibm_compute_dedicated_host.go b/ibm/service/classicinfrastructure/resource_ibm_compute_dedicated_host.go index 70e1b16d7d..94fcdcbf20 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_compute_dedicated_host.go +++ b/ibm/service/classicinfrastructure/resource_ibm_compute_dedicated_host.go @@ -10,7 +10,7 @@ import ( "time" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/filter" @@ -300,7 +300,7 @@ func findDedicatedHostByOrderID(d *datatypes.Hardware, r *schema.ResourceData, m log.Printf("Waiting for dedicated host (%s) to have to be provisioned", hostname) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", "pending"}, Target: []string{"provisioned"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_compute_dedicated_host_test.go b/ibm/service/classicinfrastructure/resource_ibm_compute_dedicated_host_test.go index b6888497a7..b6bbed6327 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_compute_dedicated_host_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_compute_dedicated_host_test.go @@ -12,9 +12,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/services" ) diff --git a/ibm/service/classicinfrastructure/resource_ibm_compute_monitor_test.go b/ibm/service/classicinfrastructure/resource_ibm_compute_monitor_test.go index 8ccc5ea442..63327cc508 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_compute_monitor_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_compute_monitor_test.go @@ -13,9 +13,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/services" ) diff --git a/ibm/service/classicinfrastructure/resource_ibm_compute_placement_group.go b/ibm/service/classicinfrastructure/resource_ibm_compute_placement_group.go index c23463755f..998e3f6ddd 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_compute_placement_group.go +++ b/ibm/service/classicinfrastructure/resource_ibm_compute_placement_group.go @@ -14,7 +14,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/softlayer/softlayer-go/filter" @@ -212,7 +212,7 @@ func resourceIBMComputePlacementGroupDelete(d *schema.ResourceData, meta interfa ) //Wait till all the VMs are disconnected before trying to delete - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Target: []string{noVms}, Pending: []string{vmsStillOnPlacementGroup}, Timeout: d.Timeout(schema.TimeoutDelete), diff --git a/ibm/service/classicinfrastructure/resource_ibm_compute_placement_group_test.go b/ibm/service/classicinfrastructure/resource_ibm_compute_placement_group_test.go index 0c02d593ff..3452ba29af 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_compute_placement_group_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_compute_placement_group_test.go @@ -12,9 +12,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/services" ) diff --git a/ibm/service/classicinfrastructure/resource_ibm_compute_provisioning_hook_test.go b/ibm/service/classicinfrastructure/resource_ibm_compute_provisioning_hook_test.go index 2ab1369368..02f8ed0067 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_compute_provisioning_hook_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_compute_provisioning_hook_test.go @@ -11,9 +11,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/services" ) diff --git a/ibm/service/classicinfrastructure/resource_ibm_compute_reserved_capacity.go b/ibm/service/classicinfrastructure/resource_ibm_compute_reserved_capacity.go index c5c3c9c551..8a9df76ad2 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_compute_reserved_capacity.go +++ b/ibm/service/classicinfrastructure/resource_ibm_compute_reserved_capacity.go @@ -16,7 +16,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/softlayer/softlayer-go/filter" "github.com/softlayer/softlayer-go/helpers/location" @@ -192,7 +192,7 @@ func findReservedCapacityByOrderID(name string, r *schema.ResourceData, meta int log.Printf("Waiting for reserved capacity (%s) to have to be provisioned", name) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", "pending"}, Target: []string{"provisioned"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_compute_reserved_capacity_test.go b/ibm/service/classicinfrastructure/resource_ibm_compute_reserved_capacity_test.go index c4e377489b..dc3aa953a0 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_compute_reserved_capacity_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_compute_reserved_capacity_test.go @@ -12,9 +12,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/services" ) diff --git a/ibm/service/classicinfrastructure/resource_ibm_compute_ssh_key_test.go b/ibm/service/classicinfrastructure/resource_ibm_compute_ssh_key_test.go index ba84740893..9019042c8e 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_compute_ssh_key_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_compute_ssh_key_test.go @@ -13,12 +13,12 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/services" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" ) func TestAccIBMComputeSSHKey_basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_compute_ssl_certificate_test.go b/ibm/service/classicinfrastructure/resource_ibm_compute_ssl_certificate_test.go index c4067890c5..8701eb045f 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_compute_ssl_certificate_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_compute_ssl_certificate_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMComputeSSLCertificate_Basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_compute_user_test.go b/ibm/service/classicinfrastructure/resource_ibm_compute_user_test.go index 5493492abc..3f1c42d503 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_compute_user_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_compute_user_test.go @@ -14,8 +14,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/services" "github.com/softlayer/softlayer-go/session" @@ -262,7 +263,7 @@ resource "ibm_compute_user" "testuser" { has_api_key = false }`, testAccRandomEmail, testAccRandomUser, testAccUserPassword) -var testAccRandomEmail = resource.UniqueId() + "@example.com" +var testAccRandomEmail = id.UniqueId() + "@example.com" var testAccRandomUser = testGetAccountId() + "_" + testAccRandomEmail var testAccUserPassword = "Softlayer2017!" var apiKeyRegexp, _ = regexp.Compile(`\w+`) diff --git a/ibm/service/classicinfrastructure/resource_ibm_compute_vm_instance.go b/ibm/service/classicinfrastructure/resource_ibm_compute_vm_instance.go index 77788fd301..ea5707fe3c 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_compute_vm_instance.go +++ b/ibm/service/classicinfrastructure/resource_ibm_compute_vm_instance.go @@ -19,7 +19,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/filter" @@ -1742,7 +1742,7 @@ func WaitForUpgradeTransactionsToAppear(d *schema.ResourceData, meta interface{} return nil, fmt.Errorf("[ERROR] The instance ID %s must be numeric", d.Id()) } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", pendingUpgrade}, Target: []string{inProgressUpgrade}, Refresh: func() (interface{}, string, error) { @@ -1772,7 +1772,7 @@ func WaitForUpgradeTransactionsToAppear(d *schema.ResourceData, meta interface{} // WaitForNoActiveTransactions Wait for no active transactions func WaitForNoActiveTransactions(id int, d *schema.ResourceData, timeout time.Duration, meta interface{}) (interface{}, error) { log.Printf("Waiting for server (%s) to have zero active transactions", d.Id()) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", activeTransaction}, Target: []string{idleTransaction}, Refresh: func() (interface{}, string, error) { @@ -1801,7 +1801,7 @@ func WaitForNoActiveTransactions(id int, d *schema.ResourceData, timeout time.Du func WaitForVirtualGuestAvailable(id int, d *schema.ResourceData, meta interface{}) (interface{}, error) { log.Printf("Waiting for server (%s) to be available.", d.Id()) sess := meta.(conns.ClientSession).SoftLayerSession() - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", virtualGuestProvisioning}, Target: []string{virtualGuestAvailable}, Refresh: virtualGuestStateRefreshFunc(sess, id, d), @@ -1813,7 +1813,7 @@ func WaitForVirtualGuestAvailable(id int, d *schema.ResourceData, meta interface return stateConf.WaitForState() } -func virtualGuestStateRefreshFunc(sess *session.Session, instanceID int, d *schema.ResourceData) resource.StateRefreshFunc { +func virtualGuestStateRefreshFunc(sess *session.Session, instanceID int, d *schema.ResourceData) retry.StateRefreshFunc { return func() (interface{}, string, error) { // Check active transactions publicNetwork := !d.Get("private_network_only").(bool) diff --git a/ibm/service/classicinfrastructure/resource_ibm_compute_vm_instance_test.go b/ibm/service/classicinfrastructure/resource_ibm_compute_vm_instance_test.go index 124204e555..181f9270ce 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_compute_vm_instance_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_compute_vm_instance_test.go @@ -15,9 +15,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/services" ) diff --git a/ibm/service/classicinfrastructure/resource_ibm_dns_domain_registration_nameservers_test.go b/ibm/service/classicinfrastructure/resource_ibm_dns_domain_registration_nameservers_test.go index e38e9dbacb..dc8800add7 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_dns_domain_registration_nameservers_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_dns_domain_registration_nameservers_test.go @@ -13,8 +13,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/services" ) diff --git a/ibm/service/classicinfrastructure/resource_ibm_dns_domain_test.go b/ibm/service/classicinfrastructure/resource_ibm_dns_domain_test.go index 93e7a4f34a..835942efbd 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_dns_domain_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_dns_domain_test.go @@ -12,9 +12,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/services" "github.com/softlayer/softlayer-go/sl" diff --git a/ibm/service/classicinfrastructure/resource_ibm_dns_record_test.go b/ibm/service/classicinfrastructure/resource_ibm_dns_record_test.go index cfa8795318..bb8304b8fd 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_dns_record_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_dns_record_test.go @@ -12,9 +12,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/services" ) diff --git a/ibm/service/classicinfrastructure/resource_ibm_dns_reverse_record_test.go b/ibm/service/classicinfrastructure/resource_ibm_dns_reverse_record_test.go index d16f32cb08..084ffbaba9 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_dns_reverse_record_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_dns_reverse_record_test.go @@ -13,9 +13,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/services" ) diff --git a/ibm/service/classicinfrastructure/resource_ibm_dns_secondary_test.go b/ibm/service/classicinfrastructure/resource_ibm_dns_secondary_test.go index 430b50926f..7a551f3ecf 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_dns_secondary_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_dns_secondary_test.go @@ -11,9 +11,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/services" ) diff --git a/ibm/service/classicinfrastructure/resource_ibm_firewall.go b/ibm/service/classicinfrastructure/resource_ibm_firewall.go index a9696963cb..c1e4cbbf01 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_firewall.go +++ b/ibm/service/classicinfrastructure/resource_ibm_firewall.go @@ -12,7 +12,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/filter" @@ -295,7 +295,7 @@ func findDedicatedFirewallByOrderId(sess *session.Session, orderId int, d *schem var err error var firewalls []datatypes.Network_Gateway var upgraderequest datatypes.Product_Upgrade_Request - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pending"}, Target: []string{"complete"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_firewall_policy_test.go b/ibm/service/classicinfrastructure/resource_ibm_firewall_policy_test.go index 81904e03c1..cd8672e059 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_firewall_policy_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_firewall_policy_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMFirewallPolicy_Basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_firewall_shared.go b/ibm/service/classicinfrastructure/resource_ibm_firewall_shared.go index 8c6df2c243..277d500ec4 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_firewall_shared.go +++ b/ibm/service/classicinfrastructure/resource_ibm_firewall_shared.go @@ -11,7 +11,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/helpers/product" @@ -137,7 +137,7 @@ func resourceIBMFirewallSharedCreate(d *schema.ResourceData, meta interface{}) e log.Printf("[INFO] Wait one minute before fetching the firewall/device.") time.Sleep(time.Second * 30) service := services.GetVirtualGuestService(sess) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Target: []string{"completed"}, Pending: []string{"pending"}, Refresh: func() (interface{}, string, error) { @@ -197,7 +197,7 @@ func resourceIBMFirewallSharedCreate(d *schema.ResourceData, meta interface{}) e time.Sleep(time.Second * 30) service := services.GetHardwareService(sess) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Target: []string{"completed"}, Pending: []string{"pending"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_firewall_shared_test.go b/ibm/service/classicinfrastructure/resource_ibm_firewall_shared_test.go index 937e7848a9..6df9af7c5d 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_firewall_shared_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_firewall_shared_test.go @@ -11,8 +11,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/services" ) diff --git a/ibm/service/classicinfrastructure/resource_ibm_firewall_test.go b/ibm/service/classicinfrastructure/resource_ibm_firewall_test.go index 61f71773b6..d7a96d11f9 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_firewall_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_firewall_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMFirewall_Basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_ipsec_vpn.go b/ibm/service/classicinfrastructure/resource_ibm_ipsec_vpn.go index 157cd01657..b501ad4b6a 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_ipsec_vpn.go +++ b/ibm/service/classicinfrastructure/resource_ibm_ipsec_vpn.go @@ -13,7 +13,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/filter" @@ -251,7 +251,7 @@ func resourceIBMIPSecVpnCreate(d *schema.ResourceData, meta interface{}) error { func findIPSecVpnByOrderID(sess *session.Session, orderID int, d *schema.ResourceData) (datatypes.Network_Tunnel_Module_Context, error) { filterPath := "networkTunnelContexts.billingItem.orderItem.order.id" - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pending"}, Target: []string{"complete"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_ipsec_vpn_test.go b/ibm/service/classicinfrastructure/resource_ibm_ipsec_vpn_test.go index f5ef88731e..86e594186d 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_ipsec_vpn_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_ipsec_vpn_test.go @@ -12,9 +12,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/services" "github.com/softlayer/softlayer-go/sl" ) diff --git a/ibm/service/classicinfrastructure/resource_ibm_lb.go b/ibm/service/classicinfrastructure/resource_ibm_lb.go index 2cfc1947ec..48146991fa 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_lb.go +++ b/ibm/service/classicinfrastructure/resource_ibm_lb.go @@ -10,7 +10,7 @@ import ( "time" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/filter" @@ -417,7 +417,7 @@ func findLoadBalancerByOrderId(sess *session.Session, orderId int, dedicated boo filterPath = "adcLoadBalancers.billingItem.orderItem.order.id" } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pending"}, Target: []string{"complete"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_lb_service.go b/ibm/service/classicinfrastructure/resource_ibm_lb_service.go index c607634364..a53c90f560 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_lb_service.go +++ b/ibm/service/classicinfrastructure/resource_ibm_lb_service.go @@ -12,7 +12,7 @@ import ( "strings" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/filter" @@ -261,7 +261,7 @@ func resourceIBMLbServiceDelete(d *schema.ResourceData, meta interface{}) error svcID, _ := strconv.Atoi(d.Id()) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pending"}, Target: []string{"complete"}, Refresh: func() (interface{}, string, error) { @@ -343,7 +343,7 @@ func getHealthCheckTypeId(sess *session.Session, healthCheckTypeName string) (in } func updateLoadBalancerService(sess *session.Session, vipID int, vip *datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) error { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pending"}, Target: []string{"complete"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_lb_service_group.go b/ibm/service/classicinfrastructure/resource_ibm_lb_service_group.go index 4f17df51e5..49abb45081 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_lb_service_group.go +++ b/ibm/service/classicinfrastructure/resource_ibm_lb_service_group.go @@ -14,7 +14,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/filter" @@ -226,7 +226,7 @@ func resourceIBMLbServiceGroupDelete(d *schema.ResourceData, meta interface{}) e vsID, _ := strconv.Atoi(d.Id()) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pending"}, Target: []string{"complete"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_lb_service_group_test.go b/ibm/service/classicinfrastructure/resource_ibm_lb_service_group_test.go index b4315ab85d..664a0d0e13 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_lb_service_group_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_lb_service_group_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMLbServiceGroup_Basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_lb_service_test.go b/ibm/service/classicinfrastructure/resource_ibm_lb_service_test.go index a67e6f3ba1..077c5b4d13 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_lb_service_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_lb_service_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccBluemixIBMLbService_Basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_lb_test.go b/ibm/service/classicinfrastructure/resource_ibm_lb_test.go index 72882adfc0..5ad5fc8f0a 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_lb_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_lb_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMLbShared_Basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_lb_vpx.go b/ibm/service/classicinfrastructure/resource_ibm_lb_vpx.go index fc21160e23..e0c2f3e2ab 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_lb_vpx.go +++ b/ibm/service/classicinfrastructure/resource_ibm_lb_vpx.go @@ -13,7 +13,7 @@ import ( "time" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/filter" @@ -277,7 +277,7 @@ func findVPXPriceItems(version string, speed int, plan string, ipCount int, meta func findVPXByOrderId(orderId int, meta interface{}) (datatypes.Network_Application_Delivery_Controller, error) { service := services.GetAccountService(meta.(conns.ClientSession).SoftLayerSession()) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pending"}, Target: []string{"complete"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_lb_vpx_ha_test.go b/ibm/service/classicinfrastructure/resource_ibm_lb_vpx_ha_test.go index dd08e61110..9f466a9b68 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_lb_vpx_ha_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_lb_vpx_ha_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMLbVpxHa_Basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_lb_vpx_service_test.go b/ibm/service/classicinfrastructure/resource_ibm_lb_vpx_service_test.go index 0586ec856d..643af6bf68 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_lb_vpx_service_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_lb_vpx_service_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMLbVpxService_Basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_lb_vpx_test.go b/ibm/service/classicinfrastructure/resource_ibm_lb_vpx_test.go index 3cfe2b995b..f8476a9d56 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_lb_vpx_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_lb_vpx_test.go @@ -11,8 +11,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/services" ) diff --git a/ibm/service/classicinfrastructure/resource_ibm_lb_vpx_vip_test.go b/ibm/service/classicinfrastructure/resource_ibm_lb_vpx_vip_test.go index daa98bfe53..8a5e6e7deb 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_lb_vpx_vip_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_lb_vpx_vip_test.go @@ -11,8 +11,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/helpers/network" ) diff --git a/ibm/service/classicinfrastructure/resource_ibm_lbaas.go b/ibm/service/classicinfrastructure/resource_ibm_lbaas.go index 5e7ecbd40c..59719c48f0 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_lbaas.go +++ b/ibm/service/classicinfrastructure/resource_ibm_lbaas.go @@ -13,7 +13,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/filter" @@ -500,7 +500,7 @@ func buildLbaasLBProductOrderContainer(d *schema.ResourceData, sess *session.Ses func findLbaasLBByOrderId(sess *session.Session, name string, d *schema.ResourceData) (*datatypes.Network_LBaaS_LoadBalancer, error) { isIDSet := false - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{lbPending}, Target: []string{lbActive}, Refresh: func() (interface{}, string, error) { @@ -552,7 +552,7 @@ func waitForLbaasLBAvailable(d *schema.ResourceData, meta interface{}) (interfac sess := meta.(conns.ClientSession).SoftLayerSession() service := services.GetNetworkLBaaSLoadBalancerService(sess) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{lbUpdatePening}, Target: []string{lbActive}, Refresh: func() (interface{}, string, error) { @@ -582,7 +582,7 @@ func waitForLbaasLBDelete(d *schema.ResourceData, meta interface{}) (interface{} sess := meta.(conns.ClientSession).SoftLayerSession() service := services.GetNetworkLBaaSLoadBalancerService(sess) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{lbDeletePending}, Target: []string{lbDeleted}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_lbaas_health_monitor_test.go b/ibm/service/classicinfrastructure/resource_ibm_lbaas_health_monitor_test.go index f5354591ed..7546aba1b2 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_lbaas_health_monitor_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_lbaas_health_monitor_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMLbaasHealthMonitor_Basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_lbaas_server_instance_attachment.go b/ibm/service/classicinfrastructure/resource_ibm_lbaas_server_instance_attachment.go index bea2775b6a..1bf5350c3f 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_lbaas_server_instance_attachment.go +++ b/ibm/service/classicinfrastructure/resource_ibm_lbaas_server_instance_attachment.go @@ -10,7 +10,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/services" @@ -183,7 +183,7 @@ func waitForLbaasLBActive(d *schema.ResourceData, meta interface{}) (interface{} service := services.GetNetworkLBaaSLoadBalancerService(sess) lbaasId := d.Get("lbaas_id").(string) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{lbUpdatePening}, Target: []string{lbActive}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_lbaas_server_instance_attachment_test.go b/ibm/service/classicinfrastructure/resource_ibm_lbaas_server_instance_attachment_test.go index efc7adceec..48c3702aa3 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_lbaas_server_instance_attachment_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_lbaas_server_instance_attachment_test.go @@ -11,9 +11,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/services" "github.com/softlayer/softlayer-go/sl" ) diff --git a/ibm/service/classicinfrastructure/resource_ibm_lbaas_test.go b/ibm/service/classicinfrastructure/resource_ibm_lbaas_test.go index c21a2682d1..4f79eacd3c 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_lbaas_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_lbaas_test.go @@ -11,9 +11,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/services" "github.com/softlayer/softlayer-go/sl" ) diff --git a/ibm/service/classicinfrastructure/resource_ibm_multi_vlan_firewall_test.go b/ibm/service/classicinfrastructure/resource_ibm_multi_vlan_firewall_test.go index d1029af348..8006ad537f 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_multi_vlan_firewall_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_multi_vlan_firewall_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMMultiVlanFirewall_Basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_network_gateway.go b/ibm/service/classicinfrastructure/resource_ibm_network_gateway.go index b838d9300c..2b5df1773f 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_network_gateway.go +++ b/ibm/service/classicinfrastructure/resource_ibm_network_gateway.go @@ -15,7 +15,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/filter" @@ -1006,7 +1006,7 @@ func waitForNetworkGatewayMemberProvision(d *datatypes.Hardware, meta interface{ domain := *d.Domain log.Printf("Waiting for Gateway (%s.%s) to be provisioned", hostname, domain) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", "pending"}, Target: []string{"provisioned"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_network_gateway_test.go b/ibm/service/classicinfrastructure/resource_ibm_network_gateway_test.go index ed2877f920..c1159581e3 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_network_gateway_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_network_gateway_test.go @@ -12,9 +12,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/services" "github.com/softlayer/softlayer-go/sl" diff --git a/ibm/service/classicinfrastructure/resource_ibm_network_gateway_vlan_attachment.go b/ibm/service/classicinfrastructure/resource_ibm_network_gateway_vlan_attachment.go index 1f6b39df77..a275ad22c6 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_network_gateway_vlan_attachment.go +++ b/ibm/service/classicinfrastructure/resource_ibm_network_gateway_vlan_attachment.go @@ -10,7 +10,7 @@ import ( "time" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/services" @@ -224,7 +224,7 @@ func waitForNetworkGatewayActiveState(id int, meta interface{}) (interface{}, er log.Printf("Waiting for Gateway (%d) to be active", id) service := services.GetNetworkGatewayService(meta.(conns.ClientSession).SoftLayerSession()) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"updating"}, Target: []string{"Active"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_network_gateway_vlan_attachment_test.go b/ibm/service/classicinfrastructure/resource_ibm_network_gateway_vlan_attachment_test.go index 8e1df84525..c2f58f266f 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_network_gateway_vlan_attachment_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_network_gateway_vlan_attachment_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMNetworkGatewayVlanAtachment_Basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_network_interface_sg_attachment.go b/ibm/service/classicinfrastructure/resource_ibm_network_interface_sg_attachment.go index 6cdde8ce14..737051116a 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_network_interface_sg_attachment.go +++ b/ibm/service/classicinfrastructure/resource_ibm_network_interface_sg_attachment.go @@ -11,7 +11,7 @@ import ( "time" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/softlayer/softlayer-go/services" slsession "github.com/softlayer/softlayer-go/session" @@ -96,7 +96,7 @@ func resourceIBMNetworkInterfaceSGAttachmentCreate(d *schema.ResourceData, meta return fmt.Errorf("[ERROR] Could n't reboot the VSI %d", *guest.Id) } //Wait for security group to be ready again after reboot - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Target: []string{"true"}, Pending: []string{"false"}, Timeout: d.Timeout(schema.TimeoutCreate), @@ -191,7 +191,7 @@ func decomposeNetworkSGAttachmentID(attachmentID string) (sgID, interfaceID int, return } -func securityGroupReadyRefreshStateFunc(sess *slsession.Session, ifcID int) resource.StateRefreshFunc { +func securityGroupReadyRefreshStateFunc(sess *slsession.Session, ifcID int) retry.StateRefreshFunc { return func() (interface{}, string, error) { ncs := services.GetVirtualGuestNetworkComponentService(sess) ready, err := ncs.Id(ifcID).SecurityGroupsReady() @@ -208,7 +208,7 @@ func WaitForVSAvailable(d *schema.ResourceData, meta interface{}, timeout time.D interfaceID := d.Get("network_interface_id").(int) log.Printf("Waiting for server (%d) to be available.", interfaceID) sess := meta.(conns.ClientSession).SoftLayerSession() - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", virtualGuestProvisioning}, Target: []string{virtualGuestAvailable}, Refresh: vsReadyRefreshStateFunc(sess, interfaceID), @@ -220,7 +220,7 @@ func WaitForVSAvailable(d *schema.ResourceData, meta interface{}, timeout time.D return stateConf.WaitForState() } -func vsReadyRefreshStateFunc(sess *slsession.Session, ifcID int) resource.StateRefreshFunc { +func vsReadyRefreshStateFunc(sess *slsession.Session, ifcID int) retry.StateRefreshFunc { return func() (interface{}, string, error) { ncs := services.GetVirtualGuestNetworkComponentService(sess) guest, err := ncs.Id(ifcID).GetGuest() diff --git a/ibm/service/classicinfrastructure/resource_ibm_network_interface_sg_attachment_test.go b/ibm/service/classicinfrastructure/resource_ibm_network_interface_sg_attachment_test.go index 65de48fbe7..d71ae0361b 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_network_interface_sg_attachment_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_network_interface_sg_attachment_test.go @@ -13,9 +13,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/services" ) diff --git a/ibm/service/classicinfrastructure/resource_ibm_network_public_ip.go b/ibm/service/classicinfrastructure/resource_ibm_network_public_ip.go index 5ff62ceed4..7c51420139 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_network_public_ip.go +++ b/ibm/service/classicinfrastructure/resource_ibm_network_public_ip.go @@ -12,7 +12,7 @@ import ( "time" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/filter" @@ -179,7 +179,7 @@ func resourceIBMNetworkPublicIpUpdate(d *schema.ResourceData, meta interface{}) } } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pending"}, Target: []string{"complete"}, Refresh: func() (interface{}, string, error) { @@ -253,7 +253,7 @@ func resourceIBMNetworkPublicIpExists(d *schema.ResourceData, meta interface{}) } func findGlobalIpByOrderId(sess *session.Session, orderId int, d *schema.ResourceData) (datatypes.Network_Subnet_IpAddress_Global, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pending"}, Target: []string{"complete"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_network_public_ip_test.go b/ibm/service/classicinfrastructure/resource_ibm_network_public_ip_test.go index 6ca57e8c64..d97bd826a1 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_network_public_ip_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_network_public_ip_test.go @@ -13,9 +13,9 @@ import ( "regexp" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/services" ) diff --git a/ibm/service/classicinfrastructure/resource_ibm_network_vlan.go b/ibm/service/classicinfrastructure/resource_ibm_network_vlan.go index 8487949e8f..11d494ae65 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_network_vlan.go +++ b/ibm/service/classicinfrastructure/resource_ibm_network_vlan.go @@ -15,7 +15,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/filter" @@ -340,7 +340,7 @@ func resourceIBMNetworkVlanDelete(d *schema.ResourceData, meta interface{}) erro ) //Wait till all the VMs are disconnected before trying to delete - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Target: []string{noVms}, Pending: []string{vmsStillOnVlan}, Timeout: d.Timeout(schema.TimeoutDelete), @@ -406,7 +406,7 @@ func resourceIBMNetworkVlanExists(d *schema.ResourceData, meta interface{}) (boo } func findVlanByOrderId(sess *session.Session, orderId int, timeout time.Duration) (datatypes.Network_Vlan, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pending"}, Target: []string{"complete"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_network_vlan_spanning_test.go b/ibm/service/classicinfrastructure/resource_ibm_network_vlan_spanning_test.go index ac18bb4087..5f562b2c95 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_network_vlan_spanning_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_network_vlan_spanning_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMNetworkVlanSpan_Basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_network_vlan_test.go b/ibm/service/classicinfrastructure/resource_ibm_network_vlan_test.go index 18512168df..94015cd4df 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_network_vlan_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_network_vlan_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMNetworkVlan_Basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_object_storage_account.go b/ibm/service/classicinfrastructure/resource_ibm_object_storage_account.go index 6eb48c8cf5..7a09b7b053 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_object_storage_account.go +++ b/ibm/service/classicinfrastructure/resource_ibm_object_storage_account.go @@ -11,7 +11,7 @@ import ( "time" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/filter" @@ -107,7 +107,7 @@ func WaitForOrderCompletion( log.Printf("Waiting for billing order %d to have zero active transactions", receipt.OrderId) var billingOrderItem *datatypes.Billing_Order_Item - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"", "in progress"}, Target: []string{"complete"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_object_storage_account_test.go b/ibm/service/classicinfrastructure/resource_ibm_object_storage_account_test.go index 2849050ad3..5b9f035202 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_object_storage_account_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_object_storage_account_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMObjectStorageAccount_Basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_securitygroup_rule_test.go b/ibm/service/classicinfrastructure/resource_ibm_securitygroup_rule_test.go index b8bcb23127..aa32b69a22 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_securitygroup_rule_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_securitygroup_rule_test.go @@ -11,11 +11,11 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/services" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" ) func TestAccIBMSecurityGroupRule_basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_securitygroup_test.go b/ibm/service/classicinfrastructure/resource_ibm_securitygroup_test.go index 853aa6a371..b65b0c9206 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_securitygroup_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_securitygroup_test.go @@ -12,12 +12,12 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/services" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" ) func TestAccIBMSecurityGroup_basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_ssl_certificate.go b/ibm/service/classicinfrastructure/resource_ibm_ssl_certificate.go index 70b006b0fa..4659af05d4 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_ssl_certificate.go +++ b/ibm/service/classicinfrastructure/resource_ibm_ssl_certificate.go @@ -11,7 +11,7 @@ import ( "time" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/filter" @@ -816,7 +816,7 @@ func buildSSLProductOrderContainer(d *schema.ResourceData, sess *session1.Sessio } func findSSLByOrderId(sess *session1.Session, orderId int) (datatypes.Security_Certificate_Request, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pending"}, Target: []string{"complete"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_ssl_certificate_test.go b/ibm/service/classicinfrastructure/resource_ibm_ssl_certificate_test.go index 7be131320a..c89fc67159 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_ssl_certificate_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_ssl_certificate_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMSSLCertificate_Basic(t *testing.T) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_storage_block_test.go b/ibm/service/classicinfrastructure/resource_ibm_storage_block_test.go index 3dcf447f99..2e23b36312 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_storage_block_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_storage_block_test.go @@ -11,8 +11,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/services" ) diff --git a/ibm/service/classicinfrastructure/resource_ibm_storage_evault.go b/ibm/service/classicinfrastructure/resource_ibm_storage_evault.go index 122b659611..882d8437af 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_storage_evault.go +++ b/ibm/service/classicinfrastructure/resource_ibm_storage_evault.go @@ -10,7 +10,7 @@ import ( "time" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/filter" @@ -320,7 +320,7 @@ func findEvaultStorageByOrderID(d *schema.ResourceData, meta interface{}, orderI filterPath := "evaultNetworkStorage.billingItem.orderItem.order.id" sess := meta.(conns.ClientSession).SoftLayerSession() - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pending"}, Target: []string{"complete"}, Refresh: func() (interface{}, string, error) { @@ -373,7 +373,7 @@ func WaitForEvaultAvailable(d *schema.ResourceData, meta interface{}, timeout st return nil, fmt.Errorf("[ERROR] The evault ID %s must be numeric", d.Id()) } sess := meta.(conns.ClientSession).SoftLayerSession() - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", "provisioning"}, Target: []string{"available"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_storage_evault_test.go b/ibm/service/classicinfrastructure/resource_ibm_storage_evault_test.go index 7fcb38f8b3..58c18da920 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_storage_evault_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_storage_evault_test.go @@ -11,9 +11,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/services" ) diff --git a/ibm/service/classicinfrastructure/resource_ibm_storage_file.go b/ibm/service/classicinfrastructure/resource_ibm_storage_file.go index 31ed4c65a9..16e4aeb5d9 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_storage_file.go +++ b/ibm/service/classicinfrastructure/resource_ibm_storage_file.go @@ -15,7 +15,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/filter" @@ -702,7 +702,7 @@ func buildStorageProductOrderContainer( func findStorageByOrderId(sess *session.Session, orderId int, timeout time.Duration) (datatypes.Network_Storage, error) { filterPath := "networkStorage.billingItem.orderItem.order.id" - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pending"}, Target: []string{"complete"}, Refresh: func() (interface{}, string, error) { @@ -754,7 +754,7 @@ func WaitForStorageAvailable(d *schema.ResourceData, meta interface{}) (interfac return nil, fmt.Errorf("[ERROR] The storage ID %s must be numeric", d.Id()) } sess := meta.(conns.ClientSession).SoftLayerSession() - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", "provisioning"}, Target: []string{"available"}, Refresh: func() (interface{}, string, error) { @@ -1526,7 +1526,7 @@ func WaitForStorageUpdate(d *schema.ResourceData, meta interface{}) (interface{} size := d.Get("capacity").(int) iops := d.Get("iops").(float64) sess := meta.(conns.ClientSession).SoftLayerSession() - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"provisioning"}, Target: []string{"available"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_storage_file_test.go b/ibm/service/classicinfrastructure/resource_ibm_storage_file_test.go index c5e771b5c4..8bce5c7646 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_storage_file_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_storage_file_test.go @@ -12,8 +12,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/services" ) diff --git a/ibm/service/classicinfrastructure/resource_ibm_subnet.go b/ibm/service/classicinfrastructure/resource_ibm_subnet.go index 4a19204628..fb6d1e0427 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_subnet.go +++ b/ibm/service/classicinfrastructure/resource_ibm_subnet.go @@ -12,7 +12,7 @@ import ( "time" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/filter" @@ -279,7 +279,7 @@ func resourceIBMSubnetExists(d *schema.ResourceData, meta interface{}) (bool, er } func findSubnetByOrderID(sess *session.Session, orderID int, d *schema.ResourceData) (datatypes.Network_Subnet, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pending"}, Target: []string{"complete"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/classicinfrastructure/resource_ibm_subnet_test.go b/ibm/service/classicinfrastructure/resource_ibm_subnet_test.go index 9479677bcc..e1f1ba865d 100644 --- a/ibm/service/classicinfrastructure/resource_ibm_subnet_test.go +++ b/ibm/service/classicinfrastructure/resource_ibm_subnet_test.go @@ -13,8 +13,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/softlayer/softlayer-go/services" ) diff --git a/ibm/service/cloudant/data_source_ibm_cloudant_database_test.go b/ibm/service/cloudant/data_source_ibm_cloudant_database_test.go index 735df67cce..a70c5b3ccb 100644 --- a/ibm/service/cloudant/data_source_ibm_cloudant_database_test.go +++ b/ibm/service/cloudant/data_source_ibm_cloudant_database_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCloudantDatabaseDataSourceBasic(t *testing.T) { diff --git a/ibm/service/cloudant/data_source_ibm_cloudant_test.go b/ibm/service/cloudant/data_source_ibm_cloudant_test.go index c57847b5b2..5c12403326 100644 --- a/ibm/service/cloudant/data_source_ibm_cloudant_test.go +++ b/ibm/service/cloudant/data_source_ibm_cloudant_test.go @@ -11,8 +11,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCloudantDataSource_basic(t *testing.T) { diff --git a/ibm/service/cloudant/resource_ibm_cloudant_database_test.go b/ibm/service/cloudant/resource_ibm_cloudant_database_test.go index 5ee3a8a81b..4c377460ff 100644 --- a/ibm/service/cloudant/resource_ibm_cloudant_database_test.go +++ b/ibm/service/cloudant/resource_ibm_cloudant_database_test.go @@ -10,9 +10,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/cloudant" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/cloudant-go-sdk/cloudantv1" ) diff --git a/ibm/service/cloudant/resource_ibm_cloudant_test.go b/ibm/service/cloudant/resource_ibm_cloudant_test.go index 7ee21e0e20..c9f0a3d03a 100644 --- a/ibm/service/cloudant/resource_ibm_cloudant_test.go +++ b/ibm/service/cloudant/resource_ibm_cloudant_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" rc "github.com/IBM/platform-services-go-sdk/resourcecontrollerv2" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMCloudant_basic(t *testing.T) { diff --git a/ibm/service/cloudfoundry/data_source_ibm_account_test.go b/ibm/service/cloudfoundry/data_source_ibm_account_test.go index f9c225c264..c1b3c970df 100644 --- a/ibm/service/cloudfoundry/data_source_ibm_account_test.go +++ b/ibm/service/cloudfoundry/data_source_ibm_account_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMAccountDataSource_basic(t *testing.T) { diff --git a/ibm/service/cloudfoundry/data_source_ibm_app_domain_private_test.go b/ibm/service/cloudfoundry/data_source_ibm_app_domain_private_test.go index 0a99879d63..fa193ae490 100644 --- a/ibm/service/cloudfoundry/data_source_ibm_app_domain_private_test.go +++ b/ibm/service/cloudfoundry/data_source_ibm_app_domain_private_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMAppDomainPrivateDataSource_basic(t *testing.T) { diff --git a/ibm/service/cloudfoundry/data_source_ibm_app_domain_shared_test.go b/ibm/service/cloudfoundry/data_source_ibm_app_domain_shared_test.go index dab8ef6c60..21366ab876 100644 --- a/ibm/service/cloudfoundry/data_source_ibm_app_domain_shared_test.go +++ b/ibm/service/cloudfoundry/data_source_ibm_app_domain_shared_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMAppDomainSharedDataSource_basic(t *testing.T) { diff --git a/ibm/service/cloudfoundry/data_source_ibm_app_route_test.go b/ibm/service/cloudfoundry/data_source_ibm_app_route_test.go index 231e9e7297..09343240b2 100644 --- a/ibm/service/cloudfoundry/data_source_ibm_app_route_test.go +++ b/ibm/service/cloudfoundry/data_source_ibm_app_route_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMAppRouteDataSource_basic(t *testing.T) { diff --git a/ibm/service/cloudfoundry/data_source_ibm_app_test.go b/ibm/service/cloudfoundry/data_source_ibm_app_test.go index 77d8b2302a..7519b11229 100644 --- a/ibm/service/cloudfoundry/data_source_ibm_app_test.go +++ b/ibm/service/cloudfoundry/data_source_ibm_app_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/bluemix-go/api/mccp/mccpv2" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMAppDataSource_Basic(t *testing.T) { diff --git a/ibm/service/cloudfoundry/data_source_ibm_org_quota_test.go b/ibm/service/cloudfoundry/data_source_ibm_org_quota_test.go index 5389955a20..383f7b78ca 100644 --- a/ibm/service/cloudfoundry/data_source_ibm_org_quota_test.go +++ b/ibm/service/cloudfoundry/data_source_ibm_org_quota_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMOrgQuotaDataSource_basic(t *testing.T) { diff --git a/ibm/service/cloudfoundry/data_source_ibm_org_test.go b/ibm/service/cloudfoundry/data_source_ibm_org_test.go index 7b0e317e66..8b79aada32 100644 --- a/ibm/service/cloudfoundry/data_source_ibm_org_test.go +++ b/ibm/service/cloudfoundry/data_source_ibm_org_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMOrgDataSource_basic(t *testing.T) { diff --git a/ibm/service/cloudfoundry/data_source_ibm_service_instance_test.go b/ibm/service/cloudfoundry/data_source_ibm_service_instance_test.go index 2ffe3d3f6a..d781be8937 100644 --- a/ibm/service/cloudfoundry/data_source_ibm_service_instance_test.go +++ b/ibm/service/cloudfoundry/data_source_ibm_service_instance_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMServiceInstanceDataSource_basic(t *testing.T) { diff --git a/ibm/service/cloudfoundry/data_source_ibm_service_key_test.go b/ibm/service/cloudfoundry/data_source_ibm_service_key_test.go index 61e2b9210e..94f8e20652 100644 --- a/ibm/service/cloudfoundry/data_source_ibm_service_key_test.go +++ b/ibm/service/cloudfoundry/data_source_ibm_service_key_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMServiceKeyDataSource_basic(t *testing.T) { diff --git a/ibm/service/cloudfoundry/data_source_ibm_service_plan_test.go b/ibm/service/cloudfoundry/data_source_ibm_service_plan_test.go index 3cd8260385..66ad2a6d8e 100644 --- a/ibm/service/cloudfoundry/data_source_ibm_service_plan_test.go +++ b/ibm/service/cloudfoundry/data_source_ibm_service_plan_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMServicePlanDataSource_basic(t *testing.T) { diff --git a/ibm/service/cloudfoundry/data_source_ibm_space_test.go b/ibm/service/cloudfoundry/data_source_ibm_space_test.go index 1779337d7b..cd2ab8dc55 100644 --- a/ibm/service/cloudfoundry/data_source_ibm_space_test.go +++ b/ibm/service/cloudfoundry/data_source_ibm_space_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMSpaceDataSource_basic(t *testing.T) { diff --git a/ibm/service/cloudfoundry/resource_ibm_app_domain_private_test.go b/ibm/service/cloudfoundry/resource_ibm_app_domain_private_test.go index ee52dcd619..54818c952a 100644 --- a/ibm/service/cloudfoundry/resource_ibm_app_domain_private_test.go +++ b/ibm/service/cloudfoundry/resource_ibm_app_domain_private_test.go @@ -12,9 +12,9 @@ import ( "strings" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM-Cloud/bluemix-go/api/mccp/mccpv2" ) diff --git a/ibm/service/cloudfoundry/resource_ibm_app_domain_shared_test.go b/ibm/service/cloudfoundry/resource_ibm_app_domain_shared_test.go index c500b42efb..344db59667 100644 --- a/ibm/service/cloudfoundry/resource_ibm_app_domain_shared_test.go +++ b/ibm/service/cloudfoundry/resource_ibm_app_domain_shared_test.go @@ -11,9 +11,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM-Cloud/bluemix-go/api/mccp/mccpv2" ) diff --git a/ibm/service/cloudfoundry/resource_ibm_app_route_test.go b/ibm/service/cloudfoundry/resource_ibm_app_route_test.go index 565b116fab..08da289d30 100644 --- a/ibm/service/cloudfoundry/resource_ibm_app_route_test.go +++ b/ibm/service/cloudfoundry/resource_ibm_app_route_test.go @@ -12,9 +12,9 @@ import ( "strings" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM-Cloud/bluemix-go/api/mccp/mccpv2" ) diff --git a/ibm/service/cloudfoundry/resource_ibm_app_test.go b/ibm/service/cloudfoundry/resource_ibm_app_test.go index d77de2aecf..84880d5515 100644 --- a/ibm/service/cloudfoundry/resource_ibm_app_test.go +++ b/ibm/service/cloudfoundry/resource_ibm_app_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/bluemix-go/api/mccp/mccpv2" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMApp_Invalid_Application_Path(t *testing.T) { diff --git a/ibm/service/cloudfoundry/resource_ibm_org_test.go b/ibm/service/cloudfoundry/resource_ibm_org_test.go index 338f0694c4..084cf5d49e 100644 --- a/ibm/service/cloudfoundry/resource_ibm_org_test.go +++ b/ibm/service/cloudfoundry/resource_ibm_org_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/bluemix-go/api/mccp/mccpv2" "github.com/IBM-Cloud/bluemix-go/bmxerror" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMOrg_Basic(t *testing.T) { diff --git a/ibm/service/cloudfoundry/resource_ibm_service_instance.go b/ibm/service/cloudfoundry/resource_ibm_service_instance.go index ea24f5cba3..29e3cddc39 100644 --- a/ibm/service/cloudfoundry/resource_ibm_service_instance.go +++ b/ibm/service/cloudfoundry/resource_ibm_service_instance.go @@ -13,7 +13,7 @@ import ( "github.com/IBM-Cloud/bluemix-go/helpers" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -330,7 +330,7 @@ func waitForServiceInstanceAvailable(d *schema.ResourceData, meta interface{}) ( } serviceGUID := d.Id() - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{svcInstanceProgressStatus}, Target: []string{svcInstanceSuccessStatus}, Refresh: func() (interface{}, string, error) { @@ -360,7 +360,7 @@ func waitForServiceInstanceDelete(d *schema.ResourceData, meta interface{}) (int return false, err } serviceGUID := d.Id() - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{svcInstanceProgressStatus}, Target: []string{svcInstanceSuccessStatus}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/cloudfoundry/resource_ibm_service_instance_test.go b/ibm/service/cloudfoundry/resource_ibm_service_instance_test.go index 5676b8c224..43ed82e29b 100644 --- a/ibm/service/cloudfoundry/resource_ibm_service_instance_test.go +++ b/ibm/service/cloudfoundry/resource_ibm_service_instance_test.go @@ -11,9 +11,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM-Cloud/bluemix-go/api/mccp/mccpv2" ) diff --git a/ibm/service/cloudfoundry/resource_ibm_service_key_test.go b/ibm/service/cloudfoundry/resource_ibm_service_key_test.go index 3192009df4..c8b97e74f0 100644 --- a/ibm/service/cloudfoundry/resource_ibm_service_key_test.go +++ b/ibm/service/cloudfoundry/resource_ibm_service_key_test.go @@ -11,9 +11,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM-Cloud/bluemix-go/api/mccp/mccpv2" ) diff --git a/ibm/service/cloudfoundry/resource_ibm_space_test.go b/ibm/service/cloudfoundry/resource_ibm_space_test.go index 7cd0896f1f..74276f9019 100644 --- a/ibm/service/cloudfoundry/resource_ibm_space_test.go +++ b/ibm/service/cloudfoundry/resource_ibm_space_test.go @@ -10,9 +10,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM-Cloud/bluemix-go/api/mccp/mccpv2" "github.com/IBM-Cloud/bluemix-go/bmxerror" diff --git a/ibm/service/cloudshell/data_source_ibm_cloud_shell_account_settings_test.go b/ibm/service/cloudshell/data_source_ibm_cloud_shell_account_settings_test.go index 717f95f3ac..b54b4ec737 100644 --- a/ibm/service/cloudshell/data_source_ibm_cloud_shell_account_settings_test.go +++ b/ibm/service/cloudshell/data_source_ibm_cloud_shell_account_settings_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCloudShellAccountSettingsDataSourceBasic(t *testing.T) { diff --git a/ibm/service/cloudshell/resource_ibm_cloud_shell_account_settings_test.go b/ibm/service/cloudshell/resource_ibm_cloud_shell_account_settings_test.go index 8724cf45e1..43e14fedb9 100644 --- a/ibm/service/cloudshell/resource_ibm_cloud_shell_account_settings_test.go +++ b/ibm/service/cloudshell/resource_ibm_cloud_shell_account_settings_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCloudShellAccountSettingsBasic(t *testing.T) { diff --git a/ibm/service/codeengine/data_source_ibm_code_engine_app_test.go b/ibm/service/codeengine/data_source_ibm_code_engine_app_test.go index 9410a51e3b..648632ad16 100644 --- a/ibm/service/codeengine/data_source_ibm_code_engine_app_test.go +++ b/ibm/service/codeengine/data_source_ibm_code_engine_app_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/codeengine/data_source_ibm_code_engine_binding_test.go b/ibm/service/codeengine/data_source_ibm_code_engine_binding_test.go index 0caab6d1c7..9b10f57dd3 100644 --- a/ibm/service/codeengine/data_source_ibm_code_engine_binding_test.go +++ b/ibm/service/codeengine/data_source_ibm_code_engine_binding_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/codeengine/data_source_ibm_code_engine_build_test.go b/ibm/service/codeengine/data_source_ibm_code_engine_build_test.go index 1965b8e2ec..31cc2059d5 100644 --- a/ibm/service/codeengine/data_source_ibm_code_engine_build_test.go +++ b/ibm/service/codeengine/data_source_ibm_code_engine_build_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/codeengine/data_source_ibm_code_engine_config_map_test.go b/ibm/service/codeengine/data_source_ibm_code_engine_config_map_test.go index 0552ed6aff..adad9563be 100644 --- a/ibm/service/codeengine/data_source_ibm_code_engine_config_map_test.go +++ b/ibm/service/codeengine/data_source_ibm_code_engine_config_map_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/codeengine/data_source_ibm_code_engine_domain_mapping_test.go b/ibm/service/codeengine/data_source_ibm_code_engine_domain_mapping_test.go index 8c71886b34..4cc3fe1757 100644 --- a/ibm/service/codeengine/data_source_ibm_code_engine_domain_mapping_test.go +++ b/ibm/service/codeengine/data_source_ibm_code_engine_domain_mapping_test.go @@ -8,8 +8,8 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/codeengine/data_source_ibm_code_engine_function_test.go b/ibm/service/codeengine/data_source_ibm_code_engine_function_test.go index 9700e13223..1bf00e477c 100644 --- a/ibm/service/codeengine/data_source_ibm_code_engine_function_test.go +++ b/ibm/service/codeengine/data_source_ibm_code_engine_function_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/codeengine/data_source_ibm_code_engine_job_test.go b/ibm/service/codeengine/data_source_ibm_code_engine_job_test.go index 6141829e1e..e52410c292 100644 --- a/ibm/service/codeengine/data_source_ibm_code_engine_job_test.go +++ b/ibm/service/codeengine/data_source_ibm_code_engine_job_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/codeengine/data_source_ibm_code_engine_project_test.go b/ibm/service/codeengine/data_source_ibm_code_engine_project_test.go index 049ad91276..3b3cebc209 100644 --- a/ibm/service/codeengine/data_source_ibm_code_engine_project_test.go +++ b/ibm/service/codeengine/data_source_ibm_code_engine_project_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/codeengine/data_source_ibm_code_engine_secret_test.go b/ibm/service/codeengine/data_source_ibm_code_engine_secret_test.go index e62c7a73c9..54db326fdf 100644 --- a/ibm/service/codeengine/data_source_ibm_code_engine_secret_test.go +++ b/ibm/service/codeengine/data_source_ibm_code_engine_secret_test.go @@ -8,8 +8,8 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/codeengine/resource_ibm_code_engine_app.go b/ibm/service/codeengine/resource_ibm_code_engine_app.go index 124a120d75..33109e80d1 100644 --- a/ibm/service/codeengine/resource_ibm_code_engine_app.go +++ b/ibm/service/codeengine/resource_ibm_code_engine_app.go @@ -10,7 +10,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -665,7 +665,7 @@ func waitForIbmCodeEngineAppCreate(d *schema.ResourceData, meta interface{}) (in getAppOptions.SetProjectID(parts[0]) getAppOptions.SetName(parts[1]) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"deploying"}, Target: []string{"ready", "failed", "warning"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/codeengine/resource_ibm_code_engine_app_test.go b/ibm/service/codeengine/resource_ibm_code_engine_app_test.go index 92e786f94e..99c4dfa735 100644 --- a/ibm/service/codeengine/resource_ibm_code_engine_app_test.go +++ b/ibm/service/codeengine/resource_ibm_code_engine_app_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/codeengine/resource_ibm_code_engine_binding_test.go b/ibm/service/codeengine/resource_ibm_code_engine_binding_test.go index da8f76119f..a885cb50e0 100644 --- a/ibm/service/codeengine/resource_ibm_code_engine_binding_test.go +++ b/ibm/service/codeengine/resource_ibm_code_engine_binding_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/codeengine/resource_ibm_code_engine_build_test.go b/ibm/service/codeengine/resource_ibm_code_engine_build_test.go index eb12d1bbe9..4b9bab1d25 100644 --- a/ibm/service/codeengine/resource_ibm_code_engine_build_test.go +++ b/ibm/service/codeengine/resource_ibm_code_engine_build_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/codeengine/resource_ibm_code_engine_config_map_test.go b/ibm/service/codeengine/resource_ibm_code_engine_config_map_test.go index 57a7f5a6cb..9e2f544cbe 100644 --- a/ibm/service/codeengine/resource_ibm_code_engine_config_map_test.go +++ b/ibm/service/codeengine/resource_ibm_code_engine_config_map_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/codeengine/resource_ibm_code_engine_domain_mapping.go b/ibm/service/codeengine/resource_ibm_code_engine_domain_mapping.go index 97ce80a8e6..4d56fc9cd7 100644 --- a/ibm/service/codeengine/resource_ibm_code_engine_domain_mapping.go +++ b/ibm/service/codeengine/resource_ibm_code_engine_domain_mapping.go @@ -10,7 +10,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -235,7 +235,7 @@ func waitForIbmCodeEngineDomainMappingCreate(d *schema.ResourceData, meta interf getDomainMappingOptions.SetProjectID(parts[0]) getDomainMappingOptions.SetName(parts[1]) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"deploying"}, Target: []string{"ready", "failed"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/codeengine/resource_ibm_code_engine_domain_mapping_test.go b/ibm/service/codeengine/resource_ibm_code_engine_domain_mapping_test.go index 4cd3c3ccf3..0bb5c29a2c 100644 --- a/ibm/service/codeengine/resource_ibm_code_engine_domain_mapping_test.go +++ b/ibm/service/codeengine/resource_ibm_code_engine_domain_mapping_test.go @@ -8,9 +8,9 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/codeengine/resource_ibm_code_engine_function.go b/ibm/service/codeengine/resource_ibm_code_engine_function.go index 981aecdf1c..0c7c6f76bc 100644 --- a/ibm/service/codeengine/resource_ibm_code_engine_function.go +++ b/ibm/service/codeengine/resource_ibm_code_engine_function.go @@ -10,7 +10,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -426,7 +426,7 @@ func waitForIbmCodeEngineFunctionCreate(d *schema.ResourceData, meta interface{} getFunctionOptions.SetProjectID(parts[0]) getFunctionOptions.SetName(parts[1]) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"deploying"}, Target: []string{"ready", "failed", "offline"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/codeengine/resource_ibm_code_engine_function_test.go b/ibm/service/codeengine/resource_ibm_code_engine_function_test.go index 7110139707..0d437627e3 100644 --- a/ibm/service/codeengine/resource_ibm_code_engine_function_test.go +++ b/ibm/service/codeengine/resource_ibm_code_engine_function_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/codeengine/resource_ibm_code_engine_job_test.go b/ibm/service/codeengine/resource_ibm_code_engine_job_test.go index 30b285b2a2..b8fde76641 100644 --- a/ibm/service/codeengine/resource_ibm_code_engine_job_test.go +++ b/ibm/service/codeengine/resource_ibm_code_engine_job_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/codeengine/resource_ibm_code_engine_project.go b/ibm/service/codeengine/resource_ibm_code_engine_project.go index d6daf67ef9..843617a519 100644 --- a/ibm/service/codeengine/resource_ibm_code_engine_project.go +++ b/ibm/service/codeengine/resource_ibm_code_engine_project.go @@ -10,7 +10,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -167,7 +167,7 @@ func waitForIbmCodeEngineProjectCreate(d *schema.ResourceData, meta interface{}) getProjectOptions.SetID(d.Id()) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"creating", "preparing"}, Target: []string{"active"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/codeengine/resource_ibm_code_engine_project_test.go b/ibm/service/codeengine/resource_ibm_code_engine_project_test.go index 6492074cdf..79dce9aa7d 100644 --- a/ibm/service/codeengine/resource_ibm_code_engine_project_test.go +++ b/ibm/service/codeengine/resource_ibm_code_engine_project_test.go @@ -8,9 +8,9 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/codeengine/resource_ibm_code_engine_secret_test.go b/ibm/service/codeengine/resource_ibm_code_engine_secret_test.go index 5bcfa7bc14..4a3dd3254f 100644 --- a/ibm/service/codeengine/resource_ibm_code_engine_secret_test.go +++ b/ibm/service/codeengine/resource_ibm_code_engine_secret_test.go @@ -8,9 +8,9 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/configurationaggregator/data_source_ibm_config_aggregator_configurations_test.go b/ibm/service/configurationaggregator/data_source_ibm_config_aggregator_configurations_test.go index 9ecd3f0b64..6377c600cf 100644 --- a/ibm/service/configurationaggregator/data_source_ibm_config_aggregator_configurations_test.go +++ b/ibm/service/configurationaggregator/data_source_ibm_config_aggregator_configurations_test.go @@ -11,7 +11,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/configurationaggregator/data_source_ibm_config_aggregator_resource_collection_status_test.go b/ibm/service/configurationaggregator/data_source_ibm_config_aggregator_resource_collection_status_test.go index 6ed765fd86..0c7ddb192a 100644 --- a/ibm/service/configurationaggregator/data_source_ibm_config_aggregator_resource_collection_status_test.go +++ b/ibm/service/configurationaggregator/data_source_ibm_config_aggregator_resource_collection_status_test.go @@ -11,7 +11,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/configurationaggregator/data_source_ibm_config_aggregator_settings_test.go b/ibm/service/configurationaggregator/data_source_ibm_config_aggregator_settings_test.go index 7414f79616..8de09cfaf8 100644 --- a/ibm/service/configurationaggregator/data_source_ibm_config_aggregator_settings_test.go +++ b/ibm/service/configurationaggregator/data_source_ibm_config_aggregator_settings_test.go @@ -11,7 +11,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/configurationaggregator" diff --git a/ibm/service/configurationaggregator/resource_ibm_config_aggregator_settings_test.go b/ibm/service/configurationaggregator/resource_ibm_config_aggregator_settings_test.go index 446116efd3..e03aba5fd6 100644 --- a/ibm/service/configurationaggregator/resource_ibm_config_aggregator_settings_test.go +++ b/ibm/service/configurationaggregator/resource_ibm_config_aggregator_settings_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/contextbasedrestrictions/data_source_ibm_cbr_rule_test.go b/ibm/service/contextbasedrestrictions/data_source_ibm_cbr_rule_test.go index de19998128..3ddab2c0a5 100644 --- a/ibm/service/contextbasedrestrictions/data_source_ibm_cbr_rule_test.go +++ b/ibm/service/contextbasedrestrictions/data_source_ibm_cbr_rule_test.go @@ -11,8 +11,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/contextbasedrestrictions/data_source_ibm_cbr_zone_addresses_test.go b/ibm/service/contextbasedrestrictions/data_source_ibm_cbr_zone_addresses_test.go index 03407ae514..e72121eafc 100644 --- a/ibm/service/contextbasedrestrictions/data_source_ibm_cbr_zone_addresses_test.go +++ b/ibm/service/contextbasedrestrictions/data_source_ibm_cbr_zone_addresses_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/contextbasedrestrictions/data_source_ibm_cbr_zone_test.go b/ibm/service/contextbasedrestrictions/data_source_ibm_cbr_zone_test.go index ff835d6405..9b7cee4302 100644 --- a/ibm/service/contextbasedrestrictions/data_source_ibm_cbr_zone_test.go +++ b/ibm/service/contextbasedrestrictions/data_source_ibm_cbr_zone_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/contextbasedrestrictions/resource_ibm_cbr_rule_test.go b/ibm/service/contextbasedrestrictions/resource_ibm_cbr_rule_test.go index 9a2ea15588..078b9c09da 100644 --- a/ibm/service/contextbasedrestrictions/resource_ibm_cbr_rule_test.go +++ b/ibm/service/contextbasedrestrictions/resource_ibm_cbr_rule_test.go @@ -11,9 +11,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/platform-services-go-sdk/contextbasedrestrictionsv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMCbrRuleBasic(t *testing.T) { diff --git a/ibm/service/contextbasedrestrictions/resource_ibm_cbr_zone_addresses_test.go b/ibm/service/contextbasedrestrictions/resource_ibm_cbr_zone_addresses_test.go index 7559a4ba63..b43b5f519e 100644 --- a/ibm/service/contextbasedrestrictions/resource_ibm_cbr_zone_addresses_test.go +++ b/ibm/service/contextbasedrestrictions/resource_ibm_cbr_zone_addresses_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/contextbasedrestrictions/resource_ibm_cbr_zone_test.go b/ibm/service/contextbasedrestrictions/resource_ibm_cbr_zone_test.go index 7b6d1658af..a7528bd05b 100644 --- a/ibm/service/contextbasedrestrictions/resource_ibm_cbr_zone_test.go +++ b/ibm/service/contextbasedrestrictions/resource_ibm_cbr_zone_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/cos/data_source_ibm_cos_bucket_object_test.go b/ibm/service/cos/data_source_ibm_cos_bucket_object_test.go index ae6d1f4b03..2257d55ba1 100644 --- a/ibm/service/cos/data_source_ibm_cos_bucket_object_test.go +++ b/ibm/service/cos/data_source_ibm_cos_bucket_object_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCOSBucketObjectDataSource_basic(t *testing.T) { diff --git a/ibm/service/cos/data_source_ibm_cos_bucket_test.go b/ibm/service/cos/data_source_ibm_cos_bucket_test.go index cd2d789d78..edbe736e87 100644 --- a/ibm/service/cos/data_source_ibm_cos_bucket_test.go +++ b/ibm/service/cos/data_source_ibm_cos_bucket_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCOSBucketDataSource_basic(t *testing.T) { diff --git a/ibm/service/cos/resource_ibm_cos_bucket_lifecycle_configuration.go b/ibm/service/cos/resource_ibm_cos_bucket_lifecycle_configuration.go index 7237b7b2f3..e562b4bac8 100644 --- a/ibm/service/cos/resource_ibm_cos_bucket_lifecycle_configuration.go +++ b/ibm/service/cos/resource_ibm_cos_bucket_lifecycle_configuration.go @@ -14,7 +14,7 @@ import ( "github.com/IBM/ibm-cos-sdk-go/service/s3" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" validation "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) @@ -419,16 +419,16 @@ func resourceIBMCOSBucketLifecycleConfigurationRead(ctx context.Context, d *sche var output *s3.GetBucketLifecycleConfigurationOutput // Adding a retry to overcome the NoSuchLifecycleConfiguration error as it takes time for the lifecycle rules to get applied. - err = resource.Retry(lifecycleConfigurationRulesSteadyTimeout, func() *resource.RetryError { + err = retry.Retry(lifecycleConfigurationRulesSteadyTimeout, func() *retry.RetryError { var err error output, err = s3Client.GetBucketLifecycleConfiguration(getLifecycleConfigurationInput) if d.IsNewResource() && err != nil && strings.Contains(err.Error(), "NoSuchLifecycleConfiguration: The lifecycle configuration does not exist") { - return resource.RetryableError(err) + return retry.RetryableError(err) } if err != nil { - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/cos/resource_ibm_cos_bucket_lifecycle_configuration_test.go b/ibm/service/cos/resource_ibm_cos_bucket_lifecycle_configuration_test.go index 671b55870e..874502c1e1 100644 --- a/ibm/service/cos/resource_ibm_cos_bucket_lifecycle_configuration_test.go +++ b/ibm/service/cos/resource_ibm_cos_bucket_lifecycle_configuration_test.go @@ -4,11 +4,12 @@ import ( "fmt" "regexp" "testing" + // "time" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCosBucket_Lifecycle_Configuration_Expiration_With_Days(t *testing.T) { diff --git a/ibm/service/cos/resource_ibm_cos_bucket_object_test.go b/ibm/service/cos/resource_ibm_cos_bucket_object_test.go index e46753b93f..6a0126052a 100644 --- a/ibm/service/cos/resource_ibm_cos_bucket_object_test.go +++ b/ibm/service/cos/resource_ibm_cos_bucket_object_test.go @@ -13,8 +13,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCOSBucketObject_basic(t *testing.T) { diff --git a/ibm/service/cos/resource_ibm_cos_bucket_objectlock_configuration_test.go b/ibm/service/cos/resource_ibm_cos_bucket_objectlock_configuration_test.go index 41e9daada6..d82731c185 100644 --- a/ibm/service/cos/resource_ibm_cos_bucket_objectlock_configuration_test.go +++ b/ibm/service/cos/resource_ibm_cos_bucket_objectlock_configuration_test.go @@ -6,8 +6,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCosBucket_Objectlock_Bucket_Enabled(t *testing.T) { diff --git a/ibm/service/cos/resource_ibm_cos_bucket_test.go b/ibm/service/cos/resource_ibm_cos_bucket_test.go index 8cc51802de..a5e8674522 100644 --- a/ibm/service/cos/resource_ibm_cos_bucket_test.go +++ b/ibm/service/cos/resource_ibm_cos_bucket_test.go @@ -21,9 +21,9 @@ import ( token "github.com/IBM/ibm-cos-sdk-go/aws/credentials/ibmiam/token" "github.com/IBM/ibm-cos-sdk-go/aws/session" "github.com/IBM/ibm-cos-sdk-go/service/s3" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "gotest.tools/assert" ) diff --git a/ibm/service/cos/resource_ibm_cos_bucket_website_configuration_test.go b/ibm/service/cos/resource_ibm_cos_bucket_website_configuration_test.go index 2988811df5..b656e649e7 100644 --- a/ibm/service/cos/resource_ibm_cos_bucket_website_configuration_test.go +++ b/ibm/service/cos/resource_ibm_cos_bucket_website_configuration_test.go @@ -6,8 +6,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCosBucket_Website_Configuration_Bucket_Basic(t *testing.T) { diff --git a/ibm/service/cos/resource_ibm_cos_replication_configuration_test.go b/ibm/service/cos/resource_ibm_cos_replication_configuration_test.go index bc344293b9..1a46fca02d 100644 --- a/ibm/service/cos/resource_ibm_cos_replication_configuration_test.go +++ b/ibm/service/cos/resource_ibm_cos_replication_configuration_test.go @@ -5,8 +5,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) // Replication features diff --git a/ibm/service/database/data_source_ibm_database_backup_test.go b/ibm/service/database/data_source_ibm_database_backup_test.go index 5ffa8de761..b73082d551 100644 --- a/ibm/service/database/data_source_ibm_database_backup_test.go +++ b/ibm/service/database/data_source_ibm_database_backup_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/database/data_source_ibm_database_backups_test.go b/ibm/service/database/data_source_ibm_database_backups_test.go index e92bbbe8ac..182c4a0c82 100644 --- a/ibm/service/database/data_source_ibm_database_backups_test.go +++ b/ibm/service/database/data_source_ibm_database_backups_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/database/data_source_ibm_database_connection_test.go b/ibm/service/database/data_source_ibm_database_connection_test.go index b06e3d2405..0440d03ed6 100644 --- a/ibm/service/database/data_source_ibm_database_connection_test.go +++ b/ibm/service/database/data_source_ibm_database_connection_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/database/data_source_ibm_database_point_in_time_recovery_test.go b/ibm/service/database/data_source_ibm_database_point_in_time_recovery_test.go index 78cca1f1b3..db082e9ce8 100644 --- a/ibm/service/database/data_source_ibm_database_point_in_time_recovery_test.go +++ b/ibm/service/database/data_source_ibm_database_point_in_time_recovery_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMDatabasePointInTimeRecoveryDataSourceBasic(t *testing.T) { diff --git a/ibm/service/database/data_source_ibm_database_remotes_test.go b/ibm/service/database/data_source_ibm_database_remotes_test.go index 1bc322cc33..a51a909a3b 100644 --- a/ibm/service/database/data_source_ibm_database_remotes_test.go +++ b/ibm/service/database/data_source_ibm_database_remotes_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMDatabaseRemotesDataSourceBasic(t *testing.T) { diff --git a/ibm/service/database/data_source_ibm_database_task_test.go b/ibm/service/database/data_source_ibm_database_task_test.go index cf83a99e48..9687439546 100644 --- a/ibm/service/database/data_source_ibm_database_task_test.go +++ b/ibm/service/database/data_source_ibm_database_task_test.go @@ -8,7 +8,7 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMDatabaseTaskDataSourceBasic(t *testing.T) { diff --git a/ibm/service/database/data_source_ibm_database_tasks_test.go b/ibm/service/database/data_source_ibm_database_tasks_test.go index 96419a152b..a3c7ebfa91 100644 --- a/ibm/service/database/data_source_ibm_database_tasks_test.go +++ b/ibm/service/database/data_source_ibm_database_tasks_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMDatabaseTasksDataSourceBasic(t *testing.T) { diff --git a/ibm/service/database/data_source_ibm_database_test.go b/ibm/service/database/data_source_ibm_database_test.go index 64ad3b1c7a..2c58ba8c78 100644 --- a/ibm/service/database/data_source_ibm_database_test.go +++ b/ibm/service/database/data_source_ibm_database_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMDatabaseDataSourceBasic(t *testing.T) { diff --git a/ibm/service/database/resource_ibm_database.go b/ibm/service/database/resource_ibm_database.go index 84e4aca5f3..8b5a28ad27 100644 --- a/ibm/service/database/resource_ibm_database.go +++ b/ibm/service/database/resource_ibm_database.go @@ -20,7 +20,7 @@ import ( rc "github.com/IBM/platform-services-go-sdk/resourcecontrollerv2" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + r "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" validation "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" @@ -2292,7 +2292,7 @@ func waitForDatabaseInstanceCreate(d *schema.ResourceData, meta interface{}, ins return false, err } - stateConf := &resource.StateChangeConf{ + stateConf := &r.StateChangeConf{ Pending: []string{databaseInstanceProgressStatus, databaseInstanceInactiveStatus, databaseInstanceProvisioningStatus}, Target: []string{databaseInstanceSuccessStatus}, Refresh: func() (interface{}, string, error) { @@ -2331,7 +2331,7 @@ func waitForDatabaseInstanceUpdate(d *schema.ResourceData, meta interface{}) (in } instanceID := d.Id() - stateConf := &resource.StateChangeConf{ + stateConf := &r.StateChangeConf{ Pending: []string{databaseInstanceProgressStatus, databaseInstanceInactiveStatus}, Target: []string{databaseInstanceSuccessStatus}, Refresh: func() (interface{}, string, error) { @@ -2414,7 +2414,7 @@ func waitForDatabaseInstanceDelete(d *schema.ResourceData, meta interface{}) (in return false, err } instanceID := d.Id() - stateConf := &resource.StateChangeConf{ + stateConf := &r.StateChangeConf{ Pending: []string{databaseInstanceProgressStatus, databaseInstanceInactiveStatus, databaseInstanceSuccessStatus}, Target: []string{databaseInstanceRemovedStatus, databaseInstanceReclamation}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/database/resource_ibm_database_edb_test.go b/ibm/service/database/resource_ibm_database_edb_test.go index 6d8747cf76..d7bf90bd15 100644 --- a/ibm/service/database/resource_ibm_database_edb_test.go +++ b/ibm/service/database/resource_ibm_database_edb_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEDBDatabaseInstanceBasic(t *testing.T) { diff --git a/ibm/service/database/resource_ibm_database_elasticsearch_platinum_test.go b/ibm/service/database/resource_ibm_database_elasticsearch_platinum_test.go index 792a46328f..c924d4c4a7 100644 --- a/ibm/service/database/resource_ibm_database_elasticsearch_platinum_test.go +++ b/ibm/service/database/resource_ibm_database_elasticsearch_platinum_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMDatabaseInstance_ElasticsearchPlatinum_Basic(t *testing.T) { diff --git a/ibm/service/database/resource_ibm_database_elasticsearch_test.go b/ibm/service/database/resource_ibm_database_elasticsearch_test.go index 407aed352e..a51d55136f 100644 --- a/ibm/service/database/resource_ibm_database_elasticsearch_test.go +++ b/ibm/service/database/resource_ibm_database_elasticsearch_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMDatabaseInstance_Elasticsearch_Basic(t *testing.T) { diff --git a/ibm/service/database/resource_ibm_database_etcd_test.go b/ibm/service/database/resource_ibm_database_etcd_test.go index 63338cb37e..265ebd0c4f 100644 --- a/ibm/service/database/resource_ibm_database_etcd_test.go +++ b/ibm/service/database/resource_ibm_database_etcd_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMDatabaseInstance_Etcd_Basic(t *testing.T) { diff --git a/ibm/service/database/resource_ibm_database_mongodb_enterprise_test.go b/ibm/service/database/resource_ibm_database_mongodb_enterprise_test.go index c58aa778e6..6ec4a3a25b 100644 --- a/ibm/service/database/resource_ibm_database_mongodb_enterprise_test.go +++ b/ibm/service/database/resource_ibm_database_mongodb_enterprise_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMMongoDBEnterpriseDatabaseInstanceBasic(t *testing.T) { diff --git a/ibm/service/database/resource_ibm_database_mongodb_sharding_test.go b/ibm/service/database/resource_ibm_database_mongodb_sharding_test.go index 23119c631d..b68c57bb83 100644 --- a/ibm/service/database/resource_ibm_database_mongodb_sharding_test.go +++ b/ibm/service/database/resource_ibm_database_mongodb_sharding_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMMongoDBShardingDatabaseInstanceBasic(t *testing.T) { diff --git a/ibm/service/database/resource_ibm_database_mongodb_test.go b/ibm/service/database/resource_ibm_database_mongodb_test.go index 025027e0a2..b0edce3865 100644 --- a/ibm/service/database/resource_ibm_database_mongodb_test.go +++ b/ibm/service/database/resource_ibm_database_mongodb_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMDatabaseInstanceMongodbBasic(t *testing.T) { diff --git a/ibm/service/database/resource_ibm_database_mysql_test.go b/ibm/service/database/resource_ibm_database_mysql_test.go index e97483be7f..6042b15176 100644 --- a/ibm/service/database/resource_ibm_database_mysql_test.go +++ b/ibm/service/database/resource_ibm_database_mysql_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMMysqlDatabaseInstanceBasic(t *testing.T) { diff --git a/ibm/service/database/resource_ibm_database_postgresql_test.go b/ibm/service/database/resource_ibm_database_postgresql_test.go index 3d898f4c41..41115d323e 100644 --- a/ibm/service/database/resource_ibm_database_postgresql_test.go +++ b/ibm/service/database/resource_ibm_database_postgresql_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMDatabaseInstancePostgresBasic(t *testing.T) { diff --git a/ibm/service/database/resource_ibm_database_rabbitmq_test.go b/ibm/service/database/resource_ibm_database_rabbitmq_test.go index 719f7ed2d3..3ce7b4b709 100644 --- a/ibm/service/database/resource_ibm_database_rabbitmq_test.go +++ b/ibm/service/database/resource_ibm_database_rabbitmq_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMDatabaseInstance_Rabbitmq_Basic(t *testing.T) { diff --git a/ibm/service/database/resource_ibm_database_redis_test.go b/ibm/service/database/resource_ibm_database_redis_test.go index 2b89a9c0c7..284c272836 100644 --- a/ibm/service/database/resource_ibm_database_redis_test.go +++ b/ibm/service/database/resource_ibm_database_redis_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMDatabaseInstance_Redis_Basic(t *testing.T) { diff --git a/ibm/service/database/resource_ibm_helpers_test.go b/ibm/service/database/resource_ibm_helpers_test.go index ba0169385f..efc5fc8420 100644 --- a/ibm/service/database/resource_ibm_helpers_test.go +++ b/ibm/service/database/resource_ibm_helpers_test.go @@ -12,8 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" rc "github.com/IBM/platform-services-go-sdk/resourcecontrollerv2" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM-Cloud/bluemix-go/bmxerror" "github.com/IBM-Cloud/bluemix-go/models" @@ -87,7 +88,7 @@ func testAccDatabaseInstanceManuallyDeleteUnwrapped(s *terraform.State, tfDataba return fmt.Errorf("[ERROR] Error deleting resource instance: %s %s", err, response) } - _ = &resource.StateChangeConf{ + _ = &retry.StateChangeConf{ Pending: []string{databaseInstanceProgressStatus, databaseInstanceInactiveStatus, databaseInstanceSuccessStatus}, Target: []string{databaseInstanceRemovedStatus}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/db2/data_source_ibm_db2_autoscale_test.go b/ibm/service/db2/data_source_ibm_db2_autoscale_test.go index 12c62432f7..ca03df636c 100644 --- a/ibm/service/db2/data_source_ibm_db2_autoscale_test.go +++ b/ibm/service/db2/data_source_ibm_db2_autoscale_test.go @@ -11,7 +11,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/db2/data_source_ibm_db2_connection_info_test.go b/ibm/service/db2/data_source_ibm_db2_connection_info_test.go index a805d3e0d1..6c03924548 100644 --- a/ibm/service/db2/data_source_ibm_db2_connection_info_test.go +++ b/ibm/service/db2/data_source_ibm_db2_connection_info_test.go @@ -11,7 +11,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/db2/data_source_ibm_db2_whitelist_test.go b/ibm/service/db2/data_source_ibm_db2_whitelist_test.go index 9e640a468b..50700e14a9 100644 --- a/ibm/service/db2/data_source_ibm_db2_whitelist_test.go +++ b/ibm/service/db2/data_source_ibm_db2_whitelist_test.go @@ -11,7 +11,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/IBM/cloud-db2-go-sdk/db2saasv1" diff --git a/ibm/service/db2/resource_ibm_db2_instance_test.go b/ibm/service/db2/resource_ibm_db2_instance_test.go index a5fe9a2780..ec448bf169 100644 --- a/ibm/service/db2/resource_ibm_db2_instance_test.go +++ b/ibm/service/db2/resource_ibm_db2_instance_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" rc "github.com/IBM/platform-services-go-sdk/resourcecontrollerv2" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMDb2InstanceBasic(t *testing.T) { diff --git a/ibm/service/directlink/data_source_ibm_dl_export_route_filter_test.go b/ibm/service/directlink/data_source_ibm_dl_export_route_filter_test.go index d567294728..7571fd2c83 100644 --- a/ibm/service/directlink/data_source_ibm_dl_export_route_filter_test.go +++ b/ibm/service/directlink/data_source_ibm_dl_export_route_filter_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/directlink/data_source_ibm_dl_export_route_filters_test.go b/ibm/service/directlink/data_source_ibm_dl_export_route_filters_test.go index fbe5b192b5..322686c8c3 100644 --- a/ibm/service/directlink/data_source_ibm_dl_export_route_filters_test.go +++ b/ibm/service/directlink/data_source_ibm_dl_export_route_filters_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/directlink/data_source_ibm_dl_gateway_test.go b/ibm/service/directlink/data_source_ibm_dl_gateway_test.go index 301cc52094..f1617e36da 100644 --- a/ibm/service/directlink/data_source_ibm_dl_gateway_test.go +++ b/ibm/service/directlink/data_source_ibm_dl_gateway_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMDLGatewayDataSource_basic(t *testing.T) { diff --git a/ibm/service/directlink/data_source_ibm_dl_gateways_test.go b/ibm/service/directlink/data_source_ibm_dl_gateways_test.go index 726e5446af..63f2619f56 100644 --- a/ibm/service/directlink/data_source_ibm_dl_gateways_test.go +++ b/ibm/service/directlink/data_source_ibm_dl_gateways_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMDLGatewaysDataSource_basic(t *testing.T) { diff --git a/ibm/service/directlink/data_source_ibm_dl_import_route_filter_test.go b/ibm/service/directlink/data_source_ibm_dl_import_route_filter_test.go index 490b4eb7de..d8a7c99669 100644 --- a/ibm/service/directlink/data_source_ibm_dl_import_route_filter_test.go +++ b/ibm/service/directlink/data_source_ibm_dl_import_route_filter_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/directlink/data_source_ibm_dl_import_route_filters_test.go b/ibm/service/directlink/data_source_ibm_dl_import_route_filters_test.go index d2e46378bc..3d05581ee8 100644 --- a/ibm/service/directlink/data_source_ibm_dl_import_route_filters_test.go +++ b/ibm/service/directlink/data_source_ibm_dl_import_route_filters_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/directlink/data_source_ibm_dl_locations_test.go b/ibm/service/directlink/data_source_ibm_dl_locations_test.go index 7a4db0b481..748ba11bd1 100644 --- a/ibm/service/directlink/data_source_ibm_dl_locations_test.go +++ b/ibm/service/directlink/data_source_ibm_dl_locations_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMDLLocationsDataSource_basic(t *testing.T) { diff --git a/ibm/service/directlink/data_source_ibm_dl_offering_speeds_test.go b/ibm/service/directlink/data_source_ibm_dl_offering_speeds_test.go index a396e57256..24e50245a2 100644 --- a/ibm/service/directlink/data_source_ibm_dl_offering_speeds_test.go +++ b/ibm/service/directlink/data_source_ibm_dl_offering_speeds_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMDLOfferingSpeedsDataSource_basic(t *testing.T) { diff --git a/ibm/service/directlink/data_source_ibm_dl_port_test.go b/ibm/service/directlink/data_source_ibm_dl_port_test.go index 872d9e3820..cdc7a24d44 100644 --- a/ibm/service/directlink/data_source_ibm_dl_port_test.go +++ b/ibm/service/directlink/data_source_ibm_dl_port_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMDLPortDataSource_basic(t *testing.T) { diff --git a/ibm/service/directlink/data_source_ibm_dl_ports_test.go b/ibm/service/directlink/data_source_ibm_dl_ports_test.go index d9354f5031..3bc39592c8 100644 --- a/ibm/service/directlink/data_source_ibm_dl_ports_test.go +++ b/ibm/service/directlink/data_source_ibm_dl_ports_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMDLPortsDataSource_basic(t *testing.T) { diff --git a/ibm/service/directlink/data_source_ibm_dl_provider_gateways_test.go b/ibm/service/directlink/data_source_ibm_dl_provider_gateways_test.go index e656814aac..e264aaabe8 100644 --- a/ibm/service/directlink/data_source_ibm_dl_provider_gateways_test.go +++ b/ibm/service/directlink/data_source_ibm_dl_provider_gateways_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMDLProviderGWsDataSource_basic(t *testing.T) { diff --git a/ibm/service/directlink/data_source_ibm_dl_provider_ports_test.go b/ibm/service/directlink/data_source_ibm_dl_provider_ports_test.go index 1061d0a434..33bb4b13a4 100644 --- a/ibm/service/directlink/data_source_ibm_dl_provider_ports_test.go +++ b/ibm/service/directlink/data_source_ibm_dl_provider_ports_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMDLProviderPortsDataSource_basic(t *testing.T) { diff --git a/ibm/service/directlink/data_source_ibm_dl_route_report_test.go b/ibm/service/directlink/data_source_ibm_dl_route_report_test.go index 1caf194d2c..21a7e9b928 100644 --- a/ibm/service/directlink/data_source_ibm_dl_route_report_test.go +++ b/ibm/service/directlink/data_source_ibm_dl_route_report_test.go @@ -8,9 +8,9 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMDLRouteReportDataSource_basic(t *testing.T) { diff --git a/ibm/service/directlink/data_source_ibm_dl_route_reports_test.go b/ibm/service/directlink/data_source_ibm_dl_route_reports_test.go index 4acd65549b..25fee6da97 100644 --- a/ibm/service/directlink/data_source_ibm_dl_route_reports_test.go +++ b/ibm/service/directlink/data_source_ibm_dl_route_reports_test.go @@ -8,9 +8,9 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMDLRouteReportsDataSource_basic(t *testing.T) { diff --git a/ibm/service/directlink/data_source_ibm_dl_routers_test.go b/ibm/service/directlink/data_source_ibm_dl_routers_test.go index a9a6fba795..0c6e8f1003 100644 --- a/ibm/service/directlink/data_source_ibm_dl_routers_test.go +++ b/ibm/service/directlink/data_source_ibm_dl_routers_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMDLRoutersDataSource_basic(t *testing.T) { diff --git a/ibm/service/directlink/resource_ibm_dl_gateway.go b/ibm/service/directlink/resource_ibm_dl_gateway.go index 6aa857b1d9..12c4635848 100644 --- a/ibm/service/directlink/resource_ibm_dl_gateway.go +++ b/ibm/service/directlink/resource_ibm_dl_gateway.go @@ -16,7 +16,7 @@ import ( "github.com/IBM/networking-go-sdk/directlinkv1" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -1308,7 +1308,7 @@ func resourceIBMdlGatewayRead(d *schema.ResourceData, meta interface{}) error { } func isWaitForDirectLinkAvailable(client *directlinkv1.DirectLinkV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for direct link (%s) to be provisioned.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", dlGatewayProvisioning}, Target: []string{dlGatewayProvisioningDone, ""}, Refresh: isDirectLinkRefreshFunc(client, id), @@ -1318,7 +1318,7 @@ func isWaitForDirectLinkAvailable(client *directlinkv1.DirectLinkV1, id string, } return stateConf.WaitForState() } -func isDirectLinkRefreshFunc(client *directlinkv1.DirectLinkV1, id string) resource.StateRefreshFunc { +func isDirectLinkRefreshFunc(client *directlinkv1.DirectLinkV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getOptions := &directlinkv1.GetGatewayOptions{ ID: &id, diff --git a/ibm/service/directlink/resource_ibm_dl_gateway_action.go b/ibm/service/directlink/resource_ibm_dl_gateway_action.go index 528e69ba0e..c7337446b1 100644 --- a/ibm/service/directlink/resource_ibm_dl_gateway_action.go +++ b/ibm/service/directlink/resource_ibm_dl_gateway_action.go @@ -13,7 +13,7 @@ import ( "github.com/IBM/networking-go-sdk/directlinkv1" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" @@ -980,7 +980,7 @@ func resourceIBMdlGatewayActionRead(d *schema.ResourceData, meta interface{}) er func isWaitForDirectLinkAvailableforAction(client *directlinkv1.DirectLinkV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for direct link (%s) to be provisioned.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", dlGatewayProvisioning}, Target: []string{dlGatewayProvisioningDone, ""}, Refresh: isDirectLinkRefreshFuncforAction(client, id), @@ -990,7 +990,7 @@ func isWaitForDirectLinkAvailableforAction(client *directlinkv1.DirectLinkV1, id } return stateConf.WaitForState() } -func isDirectLinkRefreshFuncforAction(client *directlinkv1.DirectLinkV1, id string) resource.StateRefreshFunc { +func isDirectLinkRefreshFuncforAction(client *directlinkv1.DirectLinkV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getOptions := &directlinkv1.GetGatewayOptions{ ID: &id, @@ -1010,7 +1010,7 @@ func isDirectLinkRefreshFuncforAction(client *directlinkv1.DirectLinkV1, id stri func isWaitForDirectLinkActionAvailable(client *directlinkv1.DirectLinkV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for direct link (%s) to be provisioned.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", dlGatewayActionUpdate}, Target: []string{dlGatewayActionUpdateDone, ""}, Refresh: isDirectLinkRefreshActionFunc(client, id), @@ -1020,7 +1020,7 @@ func isWaitForDirectLinkActionAvailable(client *directlinkv1.DirectLinkV1, id st } return stateConf.WaitForState() } -func isDirectLinkRefreshActionFunc(client *directlinkv1.DirectLinkV1, id string) resource.StateRefreshFunc { +func isDirectLinkRefreshActionFunc(client *directlinkv1.DirectLinkV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getOptions := &directlinkv1.GetGatewayOptions{ ID: &id, @@ -1044,7 +1044,7 @@ func isDirectLinkRefreshActionFunc(client *directlinkv1.DirectLinkV1, id string) func isWaitForDirectLinkDeleteActionAvailable(client *directlinkv1.DirectLinkV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for direct link (%s) to be provisioned.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", dlGatewayDeleteActionUpdate}, Target: []string{dlGatewayDeleteActionUpdateDone, ""}, Refresh: isDirectLinkRefreshDeleteActionFunc(client, id), @@ -1054,7 +1054,7 @@ func isWaitForDirectLinkDeleteActionAvailable(client *directlinkv1.DirectLinkV1, } return stateConf.WaitForState() } -func isDirectLinkRefreshDeleteActionFunc(client *directlinkv1.DirectLinkV1, id string) resource.StateRefreshFunc { +func isDirectLinkRefreshDeleteActionFunc(client *directlinkv1.DirectLinkV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getOptions := &directlinkv1.GetGatewayOptions{ ID: &id, diff --git a/ibm/service/directlink/resource_ibm_dl_gateway_test.go b/ibm/service/directlink/resource_ibm_dl_gateway_test.go index bf8e86040f..dc96ca8231 100644 --- a/ibm/service/directlink/resource_ibm_dl_gateway_test.go +++ b/ibm/service/directlink/resource_ibm_dl_gateway_test.go @@ -12,9 +12,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/networking-go-sdk/directlinkv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMDLGateway_basic(t *testing.T) { diff --git a/ibm/service/directlink/resource_ibm_dl_gateway_virtual_connection_test.go b/ibm/service/directlink/resource_ibm_dl_gateway_virtual_connection_test.go index 7552feb0ab..c26cf79b47 100644 --- a/ibm/service/directlink/resource_ibm_dl_gateway_virtual_connection_test.go +++ b/ibm/service/directlink/resource_ibm_dl_gateway_virtual_connection_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/networking-go-sdk/directlinkv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMDLGatewayVC_basic(t *testing.T) { diff --git a/ibm/service/directlink/resource_ibm_dl_provider_gateway_test.go b/ibm/service/directlink/resource_ibm_dl_provider_gateway_test.go index 749220c99b..54b522d7e2 100644 --- a/ibm/service/directlink/resource_ibm_dl_provider_gateway_test.go +++ b/ibm/service/directlink/resource_ibm_dl_provider_gateway_test.go @@ -13,9 +13,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" dlProviderV2 "github.com/IBM/networking-go-sdk/directlinkproviderv2" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMDLProviderGateway_basic(t *testing.T) { diff --git a/ibm/service/directlink/resource_ibm_dl_route_report.go b/ibm/service/directlink/resource_ibm_dl_route_report.go index e482d10a2a..76064cc9f2 100644 --- a/ibm/service/directlink/resource_ibm_dl_route_report.go +++ b/ibm/service/directlink/resource_ibm_dl_route_report.go @@ -10,7 +10,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/networking-go-sdk/directlinkv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -223,7 +223,7 @@ func resourceIBMdlGatewayRouteReportCreate(d *schema.ResourceData, meta interfac func isWaitForDirectLinkGatewayRouteReportCompleted(client *directlinkv1.DirectLinkV1, ID string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for direct link route report to be completed for (%s) ", ID) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", dlRouteReportPending}, Target: []string{dlRouteReportComplete, ""}, Refresh: isDirectLinkGatewayRouteReportRefreshFunc(client, ID), @@ -233,7 +233,7 @@ func isWaitForDirectLinkGatewayRouteReportCompleted(client *directlinkv1.DirectL } return stateConf.WaitForState() } -func isDirectLinkGatewayRouteReportRefreshFunc(client *directlinkv1.DirectLinkV1, ID string) resource.StateRefreshFunc { +func isDirectLinkGatewayRouteReportRefreshFunc(client *directlinkv1.DirectLinkV1, ID string) retry.StateRefreshFunc { return func() (interface{}, string, error) { parts, err := flex.IdParts(ID) diff --git a/ibm/service/directlink/resource_ibm_dl_route_report_test.go b/ibm/service/directlink/resource_ibm_dl_route_report_test.go index e4136049cd..3957bcc15b 100644 --- a/ibm/service/directlink/resource_ibm_dl_route_report_test.go +++ b/ibm/service/directlink/resource_ibm_dl_route_report_test.go @@ -10,9 +10,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/networking-go-sdk/directlinkv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMDLRouteReportResource_basic(t *testing.T) { diff --git a/ibm/service/dnsservices/data_source_ibm_private_dns_custom_resolver_forwarding_rules_test.go b/ibm/service/dnsservices/data_source_ibm_private_dns_custom_resolver_forwarding_rules_test.go index 9cf6eec66a..b6c845f6e2 100644 --- a/ibm/service/dnsservices/data_source_ibm_private_dns_custom_resolver_forwarding_rules_test.go +++ b/ibm/service/dnsservices/data_source_ibm_private_dns_custom_resolver_forwarding_rules_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPrivateDNSCustomResolverForwardingRulesDataSource_basic(t *testing.T) { diff --git a/ibm/service/dnsservices/data_source_ibm_private_dns_custom_resolver_test.go b/ibm/service/dnsservices/data_source_ibm_private_dns_custom_resolver_test.go index e6691e9056..5ba7801dfc 100644 --- a/ibm/service/dnsservices/data_source_ibm_private_dns_custom_resolver_test.go +++ b/ibm/service/dnsservices/data_source_ibm_private_dns_custom_resolver_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPrivateDNSCustomResolverDataSource_basic(t *testing.T) { diff --git a/ibm/service/dnsservices/data_source_ibm_private_dns_glb_monitors_test.go b/ibm/service/dnsservices/data_source_ibm_private_dns_glb_monitors_test.go index 1373fb9f0d..6a5c9dfa05 100644 --- a/ibm/service/dnsservices/data_source_ibm_private_dns_glb_monitors_test.go +++ b/ibm/service/dnsservices/data_source_ibm_private_dns_glb_monitors_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPrivateDNSGlbMonitorsDataSource_basic(t *testing.T) { diff --git a/ibm/service/dnsservices/data_source_ibm_private_dns_glb_pools_test.go b/ibm/service/dnsservices/data_source_ibm_private_dns_glb_pools_test.go index 6e93483b4f..927fa02213 100644 --- a/ibm/service/dnsservices/data_source_ibm_private_dns_glb_pools_test.go +++ b/ibm/service/dnsservices/data_source_ibm_private_dns_glb_pools_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPrivateDNSGlbPoolsDataSource_basic(t *testing.T) { diff --git a/ibm/service/dnsservices/data_source_ibm_private_dns_glbs_test.go b/ibm/service/dnsservices/data_source_ibm_private_dns_glbs_test.go index d8b85154cf..3ba135f1c5 100644 --- a/ibm/service/dnsservices/data_source_ibm_private_dns_glbs_test.go +++ b/ibm/service/dnsservices/data_source_ibm_private_dns_glbs_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPrivateDNSGlbLoadBalancersDataSource_basic(t *testing.T) { diff --git a/ibm/service/dnsservices/data_source_ibm_private_dns_permitted_network_test.go b/ibm/service/dnsservices/data_source_ibm_private_dns_permitted_network_test.go index 8ba498586f..da231f5d05 100644 --- a/ibm/service/dnsservices/data_source_ibm_private_dns_permitted_network_test.go +++ b/ibm/service/dnsservices/data_source_ibm_private_dns_permitted_network_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPrivateDNSNetworkDataSource_basic(t *testing.T) { diff --git a/ibm/service/dnsservices/data_source_ibm_private_dns_resource_records_test.go b/ibm/service/dnsservices/data_source_ibm_private_dns_resource_records_test.go index ec2b233805..8d8a7b3db8 100644 --- a/ibm/service/dnsservices/data_source_ibm_private_dns_resource_records_test.go +++ b/ibm/service/dnsservices/data_source_ibm_private_dns_resource_records_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPrivateDNSResourceRecordsDataSource_basic(t *testing.T) { diff --git a/ibm/service/dnsservices/data_source_ibm_private_dns_secondary_zones_test.go b/ibm/service/dnsservices/data_source_ibm_private_dns_secondary_zones_test.go index 8dda6afb80..d318532d39 100644 --- a/ibm/service/dnsservices/data_source_ibm_private_dns_secondary_zones_test.go +++ b/ibm/service/dnsservices/data_source_ibm_private_dns_secondary_zones_test.go @@ -6,8 +6,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPrivateDNSCustomResolverSecondaryZonesDataSource_basic(t *testing.T) { diff --git a/ibm/service/dnsservices/data_source_ibm_private_dns_zones_test.go b/ibm/service/dnsservices/data_source_ibm_private_dns_zones_test.go index 4a3f47733c..dbca2183a1 100644 --- a/ibm/service/dnsservices/data_source_ibm_private_dns_zones_test.go +++ b/ibm/service/dnsservices/data_source_ibm_private_dns_zones_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPrivateDNSZonesDataSource_basic(t *testing.T) { diff --git a/ibm/service/dnsservices/resource_ibm_dns_linked_zone_test.go b/ibm/service/dnsservices/resource_ibm_dns_linked_zone_test.go index 3bcb9f65cb..97d6a9230b 100644 --- a/ibm/service/dnsservices/resource_ibm_dns_linked_zone_test.go +++ b/ibm/service/dnsservices/resource_ibm_dns_linked_zone_test.go @@ -10,9 +10,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMDNSLinkedZone_basic(t *testing.T) { diff --git a/ibm/service/dnsservices/resource_ibm_private_dns_custom_resolver_forwarding_rule_test.go b/ibm/service/dnsservices/resource_ibm_private_dns_custom_resolver_forwarding_rule_test.go index e34ab97b2d..829d9de7c4 100644 --- a/ibm/service/dnsservices/resource_ibm_private_dns_custom_resolver_forwarding_rule_test.go +++ b/ibm/service/dnsservices/resource_ibm_private_dns_custom_resolver_forwarding_rule_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPrivateDNSCustomResolverForwardingRule_basic(t *testing.T) { diff --git a/ibm/service/dnsservices/resource_ibm_private_dns_custom_resolver_location_test.go b/ibm/service/dnsservices/resource_ibm_private_dns_custom_resolver_location_test.go index 37a87c886f..d47461ec07 100644 --- a/ibm/service/dnsservices/resource_ibm_private_dns_custom_resolver_location_test.go +++ b/ibm/service/dnsservices/resource_ibm_private_dns_custom_resolver_location_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPrivateDNSCustomResolverLocations_basic(t *testing.T) { diff --git a/ibm/service/dnsservices/resource_ibm_private_dns_custom_resolver_secondary_zone_test.go b/ibm/service/dnsservices/resource_ibm_private_dns_custom_resolver_secondary_zone_test.go index c4557f3944..bc6bb87776 100644 --- a/ibm/service/dnsservices/resource_ibm_private_dns_custom_resolver_secondary_zone_test.go +++ b/ibm/service/dnsservices/resource_ibm_private_dns_custom_resolver_secondary_zone_test.go @@ -10,9 +10,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMPrivateDNSSecondaryZone_basic(t *testing.T) { diff --git a/ibm/service/dnsservices/resource_ibm_private_dns_custom_resolver_test.go b/ibm/service/dnsservices/resource_ibm_private_dns_custom_resolver_test.go index 4fb4d5e6d9..e01dcd2a74 100644 --- a/ibm/service/dnsservices/resource_ibm_private_dns_custom_resolver_test.go +++ b/ibm/service/dnsservices/resource_ibm_private_dns_custom_resolver_test.go @@ -11,9 +11,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMPrivateDNSCustomResolver_basic(t *testing.T) { diff --git a/ibm/service/dnsservices/resource_ibm_private_dns_glb.go b/ibm/service/dnsservices/resource_ibm_private_dns_glb.go index 2c00fb54cf..7aaf0e2b0d 100644 --- a/ibm/service/dnsservices/resource_ibm_private_dns_glb.go +++ b/ibm/service/dnsservices/resource_ibm_private_dns_glb.go @@ -12,7 +12,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/networking-go-sdk/dnssvcsv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -347,7 +347,7 @@ func suppressPDNSGlbNameDiff(k, old, new string, d *schema.ResourceData) bool { func isWaitForLoadBalancerDeleted(LoadBalancer *dnssvcsv1.DnsSvcsV1, d *schema.ResourceData, timeout time.Duration) (interface{}, error) { idset := strings.Split(d.Id(), "/") log.Printf("Waiting for PDNS GLB (%s) to be deleted.", idset[2]) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{pdnsGLBDeleting}, Target: []string{pdnsGLBDeleted}, Refresh: isVLoadBalancerDeleteRefreshFunc(LoadBalancer, d), @@ -359,7 +359,7 @@ func isWaitForLoadBalancerDeleted(LoadBalancer *dnssvcsv1.DnsSvcsV1, d *schema.R return stateConf.WaitForState() } -func isVLoadBalancerDeleteRefreshFunc(LoadBalancer *dnssvcsv1.DnsSvcsV1, d *schema.ResourceData) resource.StateRefreshFunc { +func isVLoadBalancerDeleteRefreshFunc(LoadBalancer *dnssvcsv1.DnsSvcsV1, d *schema.ResourceData) retry.StateRefreshFunc { return func() (interface{}, string, error) { idset := strings.Split(d.Id(), "/") getlbOptions := LoadBalancer.NewGetLoadBalancerOptions(idset[0], idset[1], idset[2]) diff --git a/ibm/service/dnsservices/resource_ibm_private_dns_glb_monitor_test.go b/ibm/service/dnsservices/resource_ibm_private_dns_glb_monitor_test.go index 5e51e0a8a7..e1d5629004 100644 --- a/ibm/service/dnsservices/resource_ibm_private_dns_glb_monitor_test.go +++ b/ibm/service/dnsservices/resource_ibm_private_dns_glb_monitor_test.go @@ -11,9 +11,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMPrivateDNSGlbMonitor_Basic(t *testing.T) { diff --git a/ibm/service/dnsservices/resource_ibm_private_dns_glb_pool.go b/ibm/service/dnsservices/resource_ibm_private_dns_glb_pool.go index 0fc4cc2a65..c48af90230 100644 --- a/ibm/service/dnsservices/resource_ibm_private_dns_glb_pool.go +++ b/ibm/service/dnsservices/resource_ibm_private_dns_glb_pool.go @@ -13,7 +13,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/go-sdk-core/v5/core" dns "github.com/IBM/networking-go-sdk/dnssvcsv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -387,7 +387,7 @@ func waitForPDNSGlbPoolDelete(d *schema.ResourceData, meta interface{}) (interfa } idset := strings.Split(d.Id(), "/") getPoolOptions := cisClient.NewGetPoolOptions(idset[0], idset[1]) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{pdnsGlbPoolDeletePending}, Target: []string{pdnsGlbPoolDeleted}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/dnsservices/resource_ibm_private_dns_glb_pool_test.go b/ibm/service/dnsservices/resource_ibm_private_dns_glb_pool_test.go index 0d155e75da..78ba5a7240 100644 --- a/ibm/service/dnsservices/resource_ibm_private_dns_glb_pool_test.go +++ b/ibm/service/dnsservices/resource_ibm_private_dns_glb_pool_test.go @@ -11,9 +11,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMPrivateDNSGlbPool_Basic(t *testing.T) { diff --git a/ibm/service/dnsservices/resource_ibm_private_dns_glb_test.go b/ibm/service/dnsservices/resource_ibm_private_dns_glb_test.go index 89758c8556..b803f179bb 100644 --- a/ibm/service/dnsservices/resource_ibm_private_dns_glb_test.go +++ b/ibm/service/dnsservices/resource_ibm_private_dns_glb_test.go @@ -11,9 +11,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMPrivateDNSGlbLoadBalancer_Basic(t *testing.T) { diff --git a/ibm/service/dnsservices/resource_ibm_private_dns_permitted_network_test.go b/ibm/service/dnsservices/resource_ibm_private_dns_permitted_network_test.go index 91d6dab310..c1a60c5b67 100644 --- a/ibm/service/dnsservices/resource_ibm_private_dns_permitted_network_test.go +++ b/ibm/service/dnsservices/resource_ibm_private_dns_permitted_network_test.go @@ -11,9 +11,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMPrivateDNSPermittedNetwork_Basic(t *testing.T) { diff --git a/ibm/service/dnsservices/resource_ibm_private_dns_resource_record_test.go b/ibm/service/dnsservices/resource_ibm_private_dns_resource_record_test.go index 73fa92aeb2..661bf71bb1 100644 --- a/ibm/service/dnsservices/resource_ibm_private_dns_resource_record_test.go +++ b/ibm/service/dnsservices/resource_ibm_private_dns_resource_record_test.go @@ -11,9 +11,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMPrivateDNSResourceRecord_Basic(t *testing.T) { diff --git a/ibm/service/dnsservices/resource_ibm_private_dns_zones_test.go b/ibm/service/dnsservices/resource_ibm_private_dns_zones_test.go index fe72a038cd..ba2e2e2c7b 100644 --- a/ibm/service/dnsservices/resource_ibm_private_dns_zones_test.go +++ b/ibm/service/dnsservices/resource_ibm_private_dns_zones_test.go @@ -11,9 +11,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMPrivateDNSZone_Basic(t *testing.T) { diff --git a/ibm/service/enterprise/data_source_ibm_enterprise_account_groups_test.go b/ibm/service/enterprise/data_source_ibm_enterprise_account_groups_test.go index 3d20fc8ad9..191661662d 100644 --- a/ibm/service/enterprise/data_source_ibm_enterprise_account_groups_test.go +++ b/ibm/service/enterprise/data_source_ibm_enterprise_account_groups_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) /* To run this test case ensure the IC_API_KEY belongs to an enterprise" */ diff --git a/ibm/service/enterprise/data_source_ibm_enterprise_accounts_test.go b/ibm/service/enterprise/data_source_ibm_enterprise_accounts_test.go index 03029b3b2d..a06a7e12b3 100644 --- a/ibm/service/enterprise/data_source_ibm_enterprise_accounts_test.go +++ b/ibm/service/enterprise/data_source_ibm_enterprise_accounts_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) /* To run this test case ensure the IC_API_KEY belongs to an enterprise" */ diff --git a/ibm/service/enterprise/data_source_ibm_enterprises_test.go b/ibm/service/enterprise/data_source_ibm_enterprises_test.go index d2e9dd0e3d..c634959895 100644 --- a/ibm/service/enterprise/data_source_ibm_enterprises_test.go +++ b/ibm/service/enterprise/data_source_ibm_enterprises_test.go @@ -8,8 +8,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmEnterprisesDataSourceBasic(t *testing.T) { diff --git a/ibm/service/enterprise/resource_ibm_enterprise_account_group_test.go b/ibm/service/enterprise/resource_ibm_enterprise_account_group_test.go index 5fe551427c..b7e95c3ec8 100644 --- a/ibm/service/enterprise/resource_ibm_enterprise_account_group_test.go +++ b/ibm/service/enterprise/resource_ibm_enterprise_account_group_test.go @@ -11,9 +11,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/platform-services-go-sdk/enterprisemanagementv1" ) diff --git a/ibm/service/enterprise/resource_ibm_enterprise_account_test.go b/ibm/service/enterprise/resource_ibm_enterprise_account_test.go index 383b3d6d15..29e41e6973 100644 --- a/ibm/service/enterprise/resource_ibm_enterprise_account_test.go +++ b/ibm/service/enterprise/resource_ibm_enterprise_account_test.go @@ -10,9 +10,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/platform-services-go-sdk/enterprisemanagementv1" ) diff --git a/ibm/service/enterprise/resource_ibm_enterprise_test.go b/ibm/service/enterprise/resource_ibm_enterprise_test.go index 7487b1cb98..c63e01a437 100644 --- a/ibm/service/enterprise/resource_ibm_enterprise_test.go +++ b/ibm/service/enterprise/resource_ibm_enterprise_test.go @@ -10,9 +10,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/platform-services-go-sdk/enterprisemanagementv1" ) diff --git a/ibm/service/eventnotification/data_source_ibm_en_FCM_subscription_test.go b/ibm/service/eventnotification/data_source_ibm_en_FCM_subscription_test.go index 27db889b2d..578644cf08 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_FCM_subscription_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_FCM_subscription_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnFCMSubscriptionDataSourceAllArgs(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_Webhook_subscription_test.go b/ibm/service/eventnotification/data_source_ibm_en_Webhook_subscription_test.go index 0f3a3bb5d3..d0ccae07ee 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_Webhook_subscription_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_Webhook_subscription_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnWebhookSubscriptionDataSourceAllArgs(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_destination_apns_test.go b/ibm/service/eventnotification/data_source_ibm_en_destination_apns_test.go index 206b9d48bf..062e79fa74 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_destination_apns_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_destination_apns_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnAPNSDestinationDataSourceBasic(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_destination_ce_test.go b/ibm/service/eventnotification/data_source_ibm_en_destination_ce_test.go index bd9683c5ec..e49b9070af 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_destination_ce_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_destination_ce_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnCodeEngineDestinationDataSourceBasic(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_destination_chrome_test.go b/ibm/service/eventnotification/data_source_ibm_en_destination_chrome_test.go index 63637b8fdc..378962bb69 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_destination_chrome_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_destination_chrome_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnChromeDestinationDataSourceBasic(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_destination_cos_test.go b/ibm/service/eventnotification/data_source_ibm_en_destination_cos_test.go index ef8ef5c5e9..aa7f03b6b7 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_destination_cos_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_destination_cos_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnCOSDestinationDataSourceBasic(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_destination_custom_email_test.go b/ibm/service/eventnotification/data_source_ibm_en_destination_custom_email_test.go index da2ae0a12f..e9421042d1 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_destination_custom_email_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_destination_custom_email_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnCustomEmailDestinationDataSourceBasic(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_destination_custom_sms_test.go b/ibm/service/eventnotification/data_source_ibm_en_destination_custom_sms_test.go index 981ad3ec0b..79987180d0 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_destination_custom_sms_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_destination_custom_sms_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnCustomSMSDestinationDataSourceBasic(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_destination_fcm_test.go b/ibm/service/eventnotification/data_source_ibm_en_destination_fcm_test.go index e588fc0e06..2e101dcb2f 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_destination_fcm_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_destination_fcm_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnFCMDestinationDataSourceBasic(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_destination_firefox_test.go b/ibm/service/eventnotification/data_source_ibm_en_destination_firefox_test.go index cc493549ba..1b74a1f639 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_destination_firefox_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_destination_firefox_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnFirefoxDestinationDataSourceBasic(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_destination_huawei_test.go b/ibm/service/eventnotification/data_source_ibm_en_destination_huawei_test.go index 02dd757d26..fb4a1890fd 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_destination_huawei_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_destination_huawei_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnHuaweiDestinationDataSourceBasic(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_destination_msteams_test.go b/ibm/service/eventnotification/data_source_ibm_en_destination_msteams_test.go index a617ce02a1..fdc73c2c69 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_destination_msteams_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_destination_msteams_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnMSTeamsDestinationDataSourceBasic(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_destination_pagerduty_test.go b/ibm/service/eventnotification/data_source_ibm_en_destination_pagerduty_test.go index 5377e105d0..2f0af9064d 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_destination_pagerduty_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_destination_pagerduty_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnPagerDutyDestinationDataSourceBasic(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_destination_safari_test.go b/ibm/service/eventnotification/data_source_ibm_en_destination_safari_test.go index 48ce5caca8..9dbbd92eef 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_destination_safari_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_destination_safari_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnSafariDestinationDataSourceBasic(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_destination_servicenow_test.go b/ibm/service/eventnotification/data_source_ibm_en_destination_servicenow_test.go index c08732584f..c7cfeffb0c 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_destination_servicenow_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_destination_servicenow_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnServiceNowDestinationDataSourceBasic(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_destination_slack_test.go b/ibm/service/eventnotification/data_source_ibm_en_destination_slack_test.go index 68b74da139..99b0b08bde 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_destination_slack_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_destination_slack_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnSlackDestinationDataSourceBasic(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_destination_test.go b/ibm/service/eventnotification/data_source_ibm_en_destination_test.go index 41cb5d7828..d114fd47c4 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_destination_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_destination_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnDestinationDataSourceBasic(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_destination_webhook_test.go b/ibm/service/eventnotification/data_source_ibm_en_destination_webhook_test.go index a137c21f2b..ea3c690309 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_destination_webhook_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_destination_webhook_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnWebhookDestinationDataSourceBasic(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_destinations_test.go b/ibm/service/eventnotification/data_source_ibm_en_destinations_test.go index 3aa41370a5..3bfc288359 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_destinations_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_destinations_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnDestinationsDataSourceBasic(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_email_templates_test.go b/ibm/service/eventnotification/data_source_ibm_en_email_templates_test.go index f26361d286..3fdfbd431f 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_email_templates_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_email_templates_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnTemplatesDataSourceBasic(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_integration_cos_test.go b/ibm/service/eventnotification/data_source_ibm_en_integration_cos_test.go index 759365cadc..b78e4d3601 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_integration_cos_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_integration_cos_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnIntegrationCOSDataSourceBasic(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_integration_test.go b/ibm/service/eventnotification/data_source_ibm_en_integration_test.go index e09844db0c..93f2406370 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_integration_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_integration_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnIntegrationDataSourceBasic(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_metrics_test.go b/ibm/service/eventnotification/data_source_ibm_en_metrics_test.go index f16dae51f6..293be2d49e 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_metrics_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_metrics_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/eventnotification/data_source_ibm_en_slack_subscription_test.go b/ibm/service/eventnotification/data_source_ibm_en_slack_subscription_test.go index 973db6aab1..d10069e617 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_slack_subscription_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_slack_subscription_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnSlackSubscriptionDataSourceAllArgs(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_smtp_allowed_ips_test.go b/ibm/service/eventnotification/data_source_ibm_en_smtp_allowed_ips_test.go index 4525946230..eebee0aa4a 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_smtp_allowed_ips_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_smtp_allowed_ips_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/eventnotification/data_source_ibm_en_smtp_configuration_test.go b/ibm/service/eventnotification/data_source_ibm_en_smtp_configuration_test.go index e253358bd8..511570b548 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_smtp_configuration_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_smtp_configuration_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/eventnotification/data_source_ibm_en_smtp_user_test.go b/ibm/service/eventnotification/data_source_ibm_en_smtp_user_test.go index e6c998cb53..f9587b9188 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_smtp_user_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_smtp_user_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/eventnotification/data_source_ibm_en_source_test.go b/ibm/service/eventnotification/data_source_ibm_en_source_test.go index 591aa90323..8f518c2718 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_source_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_source_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnSourceDataSourceBasic(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_sources_test.go b/ibm/service/eventnotification/data_source_ibm_en_sources_test.go index 5ece89273f..0e6b4fb106 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_sources_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_sources_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnSourcesDataSourceBasic(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_subscription_custom_email_test.go b/ibm/service/eventnotification/data_source_ibm_en_subscription_custom_email_test.go index b3e7504975..33d2c10476 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_subscription_custom_email_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_subscription_custom_email_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnCustomEmailSubscriptionDataSourceAllArgs(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_subscription_custom_sms_test.go b/ibm/service/eventnotification/data_source_ibm_en_subscription_custom_sms_test.go index d7560c34ae..8eb983dd50 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_subscription_custom_sms_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_subscription_custom_sms_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnCustomSMSSubscriptionDataSourceAllArgs(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_subscription_email_test.go b/ibm/service/eventnotification/data_source_ibm_en_subscription_email_test.go index b29b225f0d..afb76d5d8f 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_subscription_email_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_subscription_email_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnEmailSubscriptionDataSourceAllArgs(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_subscription_sms_test.go b/ibm/service/eventnotification/data_source_ibm_en_subscription_sms_test.go index 637e42fa11..99ea604e6b 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_subscription_sms_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_subscription_sms_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnSMSSubscriptionDataSourceAllArgs(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_subscription_test.go b/ibm/service/eventnotification/data_source_ibm_en_subscription_test.go index 97e0a3ddae..408e8b003e 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_subscription_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_subscription_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnSubscriptionDataSourceAllArgs(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_subscriptions_test.go b/ibm/service/eventnotification/data_source_ibm_en_subscriptions_test.go index 98ce7e93a8..92f0034c6d 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_subscriptions_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_subscriptions_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnSubscriptionsDataSourceBasic(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_topic_test.go b/ibm/service/eventnotification/data_source_ibm_en_topic_test.go index da12c68451..3084a279ca 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_topic_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_topic_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnTopicDataSourceBasic(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_topics_test.go b/ibm/service/eventnotification/data_source_ibm_en_topics_test.go index a2a8e3ed7b..f092fc7574 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_topics_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_topics_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnTopicsDataSourceBasic(t *testing.T) { diff --git a/ibm/service/eventnotification/data_source_ibm_en_webhook_template_test.go b/ibm/service/eventnotification/data_source_ibm_en_webhook_template_test.go index e5edf91d14..6aa508a6bc 100644 --- a/ibm/service/eventnotification/data_source_ibm_en_webhook_template_test.go +++ b/ibm/service/eventnotification/data_source_ibm_en_webhook_template_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMEnWebhookTemplateDataSourceBasic(t *testing.T) { diff --git a/ibm/service/eventnotification/resource_ibm_en_FCM_subscription_test.go b/ibm/service/eventnotification/resource_ibm_en_FCM_subscription_test.go index 1211207915..2c2ae09ffd 100644 --- a/ibm/service/eventnotification/resource_ibm_en_FCM_subscription_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_FCM_subscription_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_destination_apns_test.go b/ibm/service/eventnotification/resource_ibm_en_destination_apns_test.go index 1a21cf3455..22766f47d8 100644 --- a/ibm/service/eventnotification/resource_ibm_en_destination_apns_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_destination_apns_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_destination_ce_test.go b/ibm/service/eventnotification/resource_ibm_en_destination_ce_test.go index f482734282..022a3e2571 100644 --- a/ibm/service/eventnotification/resource_ibm_en_destination_ce_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_destination_ce_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_destination_chrome_test.go b/ibm/service/eventnotification/resource_ibm_en_destination_chrome_test.go index c0f2d18cb1..bf752f5557 100644 --- a/ibm/service/eventnotification/resource_ibm_en_destination_chrome_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_destination_chrome_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_destination_cos_test.go b/ibm/service/eventnotification/resource_ibm_en_destination_cos_test.go index 327a38f7ba..991c6c7a79 100644 --- a/ibm/service/eventnotification/resource_ibm_en_destination_cos_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_destination_cos_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_destination_custom_email_test.go b/ibm/service/eventnotification/resource_ibm_en_destination_custom_email_test.go index 0363bbfabe..2bfaa84bf5 100644 --- a/ibm/service/eventnotification/resource_ibm_en_destination_custom_email_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_destination_custom_email_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_destination_custom_sms_test.go b/ibm/service/eventnotification/resource_ibm_en_destination_custom_sms_test.go index 28635dd68b..a8a0398e2a 100644 --- a/ibm/service/eventnotification/resource_ibm_en_destination_custom_sms_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_destination_custom_sms_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_destination_fcm_test.go b/ibm/service/eventnotification/resource_ibm_en_destination_fcm_test.go index 25c105eda4..3c7d2a2feb 100644 --- a/ibm/service/eventnotification/resource_ibm_en_destination_fcm_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_destination_fcm_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_destination_firefox_test.go b/ibm/service/eventnotification/resource_ibm_en_destination_firefox_test.go index 5e5515960e..6f90f5a693 100644 --- a/ibm/service/eventnotification/resource_ibm_en_destination_firefox_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_destination_firefox_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_destination_huawei_test.go b/ibm/service/eventnotification/resource_ibm_en_destination_huawei_test.go index 15ef3e08a6..c16c288622 100644 --- a/ibm/service/eventnotification/resource_ibm_en_destination_huawei_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_destination_huawei_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_destination_msteams_test.go b/ibm/service/eventnotification/resource_ibm_en_destination_msteams_test.go index c0784f2dfa..957a542cd2 100644 --- a/ibm/service/eventnotification/resource_ibm_en_destination_msteams_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_destination_msteams_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_destination_pagerduty_test.go b/ibm/service/eventnotification/resource_ibm_en_destination_pagerduty_test.go index e585df69d5..d0aa731ab0 100644 --- a/ibm/service/eventnotification/resource_ibm_en_destination_pagerduty_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_destination_pagerduty_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_destination_safari_test.go b/ibm/service/eventnotification/resource_ibm_en_destination_safari_test.go index de0d67b06f..ffdd4920a6 100644 --- a/ibm/service/eventnotification/resource_ibm_en_destination_safari_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_destination_safari_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_destination_servicenow_test.go b/ibm/service/eventnotification/resource_ibm_en_destination_servicenow_test.go index b8c1e8e146..ca67920b5f 100644 --- a/ibm/service/eventnotification/resource_ibm_en_destination_servicenow_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_destination_servicenow_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_destination_slack_test.go b/ibm/service/eventnotification/resource_ibm_en_destination_slack_test.go index 8cf00610f2..cd6cb6d52c 100644 --- a/ibm/service/eventnotification/resource_ibm_en_destination_slack_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_destination_slack_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_destination_webhook_test.go b/ibm/service/eventnotification/resource_ibm_en_destination_webhook_test.go index a91489bcda..0420975773 100644 --- a/ibm/service/eventnotification/resource_ibm_en_destination_webhook_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_destination_webhook_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_email_template_test.go b/ibm/service/eventnotification/resource_ibm_en_email_template_test.go index 2913b475ad..248eb2395b 100644 --- a/ibm/service/eventnotification/resource_ibm_en_email_template_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_email_template_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_ibmsource_test.go b/ibm/service/eventnotification/resource_ibm_en_ibmsource_test.go index d0465b0256..e869a41918 100644 --- a/ibm/service/eventnotification/resource_ibm_en_ibmsource_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_ibmsource_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_integration_cos_test.go b/ibm/service/eventnotification/resource_ibm_en_integration_cos_test.go index 750da952e7..c1aaf7617f 100644 --- a/ibm/service/eventnotification/resource_ibm_en_integration_cos_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_integration_cos_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMEnIntegrationCOSAllArgs(t *testing.T) { diff --git a/ibm/service/eventnotification/resource_ibm_en_integration_test.go b/ibm/service/eventnotification/resource_ibm_en_integration_test.go index a504ffc0a6..5f0e6a306a 100644 --- a/ibm/service/eventnotification/resource_ibm_en_integration_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_integration_test.go @@ -9,9 +9,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMEnIntegrationAllArgs(t *testing.T) { diff --git a/ibm/service/eventnotification/resource_ibm_en_slack_template_test.go b/ibm/service/eventnotification/resource_ibm_en_slack_template_test.go index b8ccfab477..625460ee81 100644 --- a/ibm/service/eventnotification/resource_ibm_en_slack_template_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_slack_template_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_smtp_configuration_test.go b/ibm/service/eventnotification/resource_ibm_en_smtp_configuration_test.go index d6b07da405..ce78148449 100644 --- a/ibm/service/eventnotification/resource_ibm_en_smtp_configuration_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_smtp_configuration_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/eventnotification/resource_ibm_en_smtp_user_test.go b/ibm/service/eventnotification/resource_ibm_en_smtp_user_test.go index ce746b367f..eab954d423 100644 --- a/ibm/service/eventnotification/resource_ibm_en_smtp_user_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_smtp_user_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/eventnotification/resource_ibm_en_source_test.go b/ibm/service/eventnotification/resource_ibm_en_source_test.go index bb2293cc3d..d0374bf83a 100644 --- a/ibm/service/eventnotification/resource_ibm_en_source_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_source_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_subscription_custom_email_test.go b/ibm/service/eventnotification/resource_ibm_en_subscription_custom_email_test.go index cac5824d94..52b7b9e500 100644 --- a/ibm/service/eventnotification/resource_ibm_en_subscription_custom_email_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_subscription_custom_email_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_subscription_custom_sms_test.go b/ibm/service/eventnotification/resource_ibm_en_subscription_custom_sms_test.go index 64d4c976f7..8f7dd96dc2 100644 --- a/ibm/service/eventnotification/resource_ibm_en_subscription_custom_sms_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_subscription_custom_sms_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_subscription_email_test.go b/ibm/service/eventnotification/resource_ibm_en_subscription_email_test.go index b88ff834fa..4c989126bb 100644 --- a/ibm/service/eventnotification/resource_ibm_en_subscription_email_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_subscription_email_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_subscription_slack_test.go b/ibm/service/eventnotification/resource_ibm_en_subscription_slack_test.go index 6cb77dbf2b..dfb8cf3166 100644 --- a/ibm/service/eventnotification/resource_ibm_en_subscription_slack_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_subscription_slack_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_subscription_sms_test.go b/ibm/service/eventnotification/resource_ibm_en_subscription_sms_test.go index 4bb0c28e37..1750239626 100644 --- a/ibm/service/eventnotification/resource_ibm_en_subscription_sms_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_subscription_sms_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_subscription_test.go b/ibm/service/eventnotification/resource_ibm_en_subscription_test.go index b9533d7983..e75e8cbdf2 100644 --- a/ibm/service/eventnotification/resource_ibm_en_subscription_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_subscription_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_subscription_webhook_test.go b/ibm/service/eventnotification/resource_ibm_en_subscription_webhook_test.go index df73f10c56..118bc1fa12 100644 --- a/ibm/service/eventnotification/resource_ibm_en_subscription_webhook_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_subscription_webhook_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_topic_test.go b/ibm/service/eventnotification/resource_ibm_en_topic_test.go index 0edac899d0..912fcc20df 100644 --- a/ibm/service/eventnotification/resource_ibm_en_topic_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_topic_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventnotification/resource_ibm_en_webhook_template_test.go b/ibm/service/eventnotification/resource_ibm_en_webhook_template_test.go index e6db892728..7c912109aa 100644 --- a/ibm/service/eventnotification/resource_ibm_en_webhook_template_test.go +++ b/ibm/service/eventnotification/resource_ibm_en_webhook_template_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" en "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1" ) diff --git a/ibm/service/eventstreams/data_source_ibm_event_streams_mirroring_config_test.go b/ibm/service/eventstreams/data_source_ibm_event_streams_mirroring_config_test.go index 27483e0085..26f8f12e6d 100644 --- a/ibm/service/eventstreams/data_source_ibm_event_streams_mirroring_config_test.go +++ b/ibm/service/eventstreams/data_source_ibm_event_streams_mirroring_config_test.go @@ -9,8 +9,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMEventStreamsMirroringConfigDataSource(t *testing.T) { diff --git a/ibm/service/eventstreams/data_source_ibm_event_streams_quota_test.go b/ibm/service/eventstreams/data_source_ibm_event_streams_quota_test.go index 8bff410848..f860aa48af 100644 --- a/ibm/service/eventstreams/data_source_ibm_event_streams_quota_test.go +++ b/ibm/service/eventstreams/data_source_ibm_event_streams_quota_test.go @@ -9,8 +9,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) const ( diff --git a/ibm/service/eventstreams/data_source_ibm_event_streams_schema_global_compatibility_rule_test.go b/ibm/service/eventstreams/data_source_ibm_event_streams_schema_global_compatibility_rule_test.go index b16404ddb3..531e10491e 100644 --- a/ibm/service/eventstreams/data_source_ibm_event_streams_schema_global_compatibility_rule_test.go +++ b/ibm/service/eventstreams/data_source_ibm_event_streams_schema_global_compatibility_rule_test.go @@ -9,8 +9,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMEventStreamsSchemaGlobalCompatibilityRuleDataSource(t *testing.T) { diff --git a/ibm/service/eventstreams/data_source_ibm_event_streams_schema_test.go b/ibm/service/eventstreams/data_source_ibm_event_streams_schema_test.go index 2301b1e36c..b11983ebd4 100644 --- a/ibm/service/eventstreams/data_source_ibm_event_streams_schema_test.go +++ b/ibm/service/eventstreams/data_source_ibm_event_streams_schema_test.go @@ -8,7 +8,7 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) var ( diff --git a/ibm/service/eventstreams/data_source_ibm_event_streams_topic_test.go b/ibm/service/eventstreams/data_source_ibm_event_streams_topic_test.go index 89607c3c11..d4e99e6cb9 100644 --- a/ibm/service/eventstreams/data_source_ibm_event_streams_topic_test.go +++ b/ibm/service/eventstreams/data_source_ibm_event_streams_topic_test.go @@ -10,7 +10,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) const ( diff --git a/ibm/service/eventstreams/resource_ibm_event_streams_quota_test.go b/ibm/service/eventstreams/resource_ibm_event_streams_quota_test.go index 83b1f5733d..9c42a25f13 100644 --- a/ibm/service/eventstreams/resource_ibm_event_streams_quota_test.go +++ b/ibm/service/eventstreams/resource_ibm_event_streams_quota_test.go @@ -11,8 +11,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/eventstreams-go-sdk/pkg/adminrestv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMEventStreamsQuotaResource(t *testing.T) { diff --git a/ibm/service/eventstreams/resource_ibm_event_streams_schema_global_compatibility_rule_test.go b/ibm/service/eventstreams/resource_ibm_event_streams_schema_global_compatibility_rule_test.go index cf40939420..bb19a9804c 100644 --- a/ibm/service/eventstreams/resource_ibm_event_streams_schema_global_compatibility_rule_test.go +++ b/ibm/service/eventstreams/resource_ibm_event_streams_schema_global_compatibility_rule_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/eventstreams-go-sdk/pkg/schemaregistryv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMEventStreamsSchemaGlobalCompatibilityRuleResource(t *testing.T) { diff --git a/ibm/service/eventstreams/resource_ibm_event_streams_schema_test.go b/ibm/service/eventstreams/resource_ibm_event_streams_schema_test.go index 6b9accb182..3edc0d3100 100644 --- a/ibm/service/eventstreams/resource_ibm_event_streams_schema_test.go +++ b/ibm/service/eventstreams/resource_ibm_event_streams_schema_test.go @@ -11,9 +11,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "gotest.tools/assert" "github.com/IBM/eventstreams-go-sdk/pkg/schemaregistryv1" diff --git a/ibm/service/eventstreams/resource_ibm_event_streams_topic_test.go b/ibm/service/eventstreams/resource_ibm_event_streams_topic_test.go index 1c0a78aef6..4c1d3945ca 100644 --- a/ibm/service/eventstreams/resource_ibm_event_streams_topic_test.go +++ b/ibm/service/eventstreams/resource_ibm_event_streams_topic_test.go @@ -14,9 +14,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "gotest.tools/assert" "github.com/IBM-Cloud/bluemix-go/models" diff --git a/ibm/service/functions/data_source_ibm_function_action_test.go b/ibm/service/functions/data_source_ibm_function_action_test.go index 464cc648a8..6dacdcc56b 100644 --- a/ibm/service/functions/data_source_ibm_function_action_test.go +++ b/ibm/service/functions/data_source_ibm_function_action_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccFunctionActionDataSourceBasic(t *testing.T) { diff --git a/ibm/service/functions/data_source_ibm_function_namespace_test.go b/ibm/service/functions/data_source_ibm_function_namespace_test.go index 6ba8e5a388..ee97980009 100644 --- a/ibm/service/functions/data_source_ibm_function_namespace_test.go +++ b/ibm/service/functions/data_source_ibm_function_namespace_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccFunctionNamespaceDataSourceBasic(t *testing.T) { diff --git a/ibm/service/functions/data_source_ibm_function_package_test.go b/ibm/service/functions/data_source_ibm_function_package_test.go index 39016b1baf..a97335858c 100644 --- a/ibm/service/functions/data_source_ibm_function_package_test.go +++ b/ibm/service/functions/data_source_ibm_function_package_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccFunctionPackageDataSourceBasic(t *testing.T) { diff --git a/ibm/service/functions/data_source_ibm_function_rule_test.go b/ibm/service/functions/data_source_ibm_function_rule_test.go index 1a71a4c50b..1459ff6502 100644 --- a/ibm/service/functions/data_source_ibm_function_rule_test.go +++ b/ibm/service/functions/data_source_ibm_function_rule_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccFunctionRuleDataSourceBasic(t *testing.T) { diff --git a/ibm/service/functions/data_source_ibm_function_trigger_test.go b/ibm/service/functions/data_source_ibm_function_trigger_test.go index 3b23fade99..4781efc5e1 100644 --- a/ibm/service/functions/data_source_ibm_function_trigger_test.go +++ b/ibm/service/functions/data_source_ibm_function_trigger_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccFunctionTriggerDataSourceBasic(t *testing.T) { diff --git a/ibm/service/functions/resource_ibm_function_action_test.go b/ibm/service/functions/resource_ibm_function_action_test.go index 0d33be5a05..fe34313b2b 100644 --- a/ibm/service/functions/resource_ibm_function_action_test.go +++ b/ibm/service/functions/resource_ibm_function_action_test.go @@ -14,9 +14,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/apache/openwhisk-client-go/whisk" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM-Cloud/bluemix-go/bmxerror" ) diff --git a/ibm/service/functions/resource_ibm_function_namespace_test.go b/ibm/service/functions/resource_ibm_function_namespace_test.go index 587151fc3c..1544bd9f6f 100644 --- a/ibm/service/functions/resource_ibm_function_namespace_test.go +++ b/ibm/service/functions/resource_ibm_function_namespace_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/bluemix-go/api/functions" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccFunctionNamespace_Basic(t *testing.T) { diff --git a/ibm/service/functions/resource_ibm_function_package_test.go b/ibm/service/functions/resource_ibm_function_package_test.go index 617d81a6a1..95083bc856 100644 --- a/ibm/service/functions/resource_ibm_function_package_test.go +++ b/ibm/service/functions/resource_ibm_function_package_test.go @@ -14,9 +14,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/apache/openwhisk-client-go/whisk" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM-Cloud/bluemix-go/bmxerror" ) diff --git a/ibm/service/functions/resource_ibm_function_rule_test.go b/ibm/service/functions/resource_ibm_function_rule_test.go index cad4e20fe1..6d329c1e7a 100644 --- a/ibm/service/functions/resource_ibm_function_rule_test.go +++ b/ibm/service/functions/resource_ibm_function_rule_test.go @@ -14,9 +14,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/apache/openwhisk-client-go/whisk" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM-Cloud/bluemix-go/bmxerror" ) diff --git a/ibm/service/functions/resource_ibm_function_trigger_test.go b/ibm/service/functions/resource_ibm_function_trigger_test.go index f71297f3e7..e156b82c07 100644 --- a/ibm/service/functions/resource_ibm_function_trigger_test.go +++ b/ibm/service/functions/resource_ibm_function_trigger_test.go @@ -14,9 +14,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/apache/openwhisk-client-go/whisk" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM-Cloud/bluemix-go/bmxerror" ) diff --git a/ibm/service/globaltagging/data_source_ibm_resource_tag_test.go b/ibm/service/globaltagging/data_source_ibm_resource_tag_test.go index bea958263c..c463df92a2 100644 --- a/ibm/service/globaltagging/data_source_ibm_resource_tag_test.go +++ b/ibm/service/globaltagging/data_source_ibm_resource_tag_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccResourceTagDataSource_basic(t *testing.T) { diff --git a/ibm/service/globaltagging/resource_ibm_iam_access_tag_test.go b/ibm/service/globaltagging/resource_ibm_iam_access_tag_test.go index 21e2ad6f1b..52ed14360b 100644 --- a/ibm/service/globaltagging/resource_ibm_iam_access_tag_test.go +++ b/ibm/service/globaltagging/resource_ibm_iam_access_tag_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/platform-services-go-sdk/globaltaggingv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) const ( diff --git a/ibm/service/globaltagging/resource_ibm_resource_tag_test.go b/ibm/service/globaltagging/resource_ibm_resource_tag_test.go index 650f4aee7d..564ce9e002 100644 --- a/ibm/service/globaltagging/resource_ibm_resource_tag_test.go +++ b/ibm/service/globaltagging/resource_ibm_resource_tag_test.go @@ -12,9 +12,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccResourceTag_Basic(t *testing.T) { diff --git a/ibm/service/hpcs/data_source_ibm_hpcs_test.go b/ibm/service/hpcs/data_source_ibm_hpcs_test.go index 48903528bc..0420bc6865 100644 --- a/ibm/service/hpcs/data_source_ibm_hpcs_test.go +++ b/ibm/service/hpcs/data_source_ibm_hpcs_test.go @@ -8,7 +8,7 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMHPCSDatasourceBasic(t *testing.T) { diff --git a/ibm/service/hpcs/resource_ibm_hpcs.go b/ibm/service/hpcs/resource_ibm_hpcs.go index 2aa544f116..516c8c92a2 100644 --- a/ibm/service/hpcs/resource_ibm_hpcs.go +++ b/ibm/service/hpcs/resource_ibm_hpcs.go @@ -18,7 +18,7 @@ import ( rc "github.com/IBM/platform-services-go-sdk/resourcecontrollerv2" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/bluemix-go/models" @@ -779,7 +779,7 @@ func waitForHPCSInstanceCreate(d *schema.ResourceData, meta interface{}) (interf ID: &instanceID, } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{resourcecontroller.RsInstanceProgressStatus, resourcecontroller.RsInstanceInactiveStatus, resourcecontroller.RsInstanceProvisioningStatus}, Target: []string{resourcecontroller.RsInstanceSuccessStatus}, Refresh: func() (interface{}, string, error) { @@ -813,7 +813,7 @@ func waitForHPCSInstanceUpdate(d *schema.ResourceData, meta interface{}) (interf ID: &instanceID, } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{resourcecontroller.RsInstanceProgressStatus, resourcecontroller.RsInstanceInactiveStatus}, Target: []string{resourcecontroller.RsInstanceSuccessStatus}, Refresh: func() (interface{}, string, error) { @@ -846,7 +846,7 @@ func waitForHPCSInstanceDelete(d *schema.ResourceData, meta interface{}) (interf resourceInstanceGet := rc.GetResourceInstanceOptions{ ID: &instanceID, } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{resourcecontroller.RsInstanceProgressStatus, resourcecontroller.RsInstanceInactiveStatus, resourcecontroller.RsInstanceSuccessStatus}, Target: []string{resourcecontroller.RsInstanceRemovedStatus, resourcecontroller.RsInstanceReclamation}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/hpcs/resource_ibm_hpcs_test.go b/ibm/service/hpcs/resource_ibm_hpcs_test.go index 7ac0c1ff49..10b7f148d3 100644 --- a/ibm/service/hpcs/resource_ibm_hpcs_test.go +++ b/ibm/service/hpcs/resource_ibm_hpcs_test.go @@ -14,9 +14,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/resourcecontroller" rc "github.com/IBM/platform-services-go-sdk/resourcecontrollerv2" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMHPCSInstanceBasic(t *testing.T) { diff --git a/ibm/service/iamaccessgroup/data_source_ibm_iam_access_group_template_assignment_test.go b/ibm/service/iamaccessgroup/data_source_ibm_iam_access_group_template_assignment_test.go index ca28c8f822..5957f2cb3d 100644 --- a/ibm/service/iamaccessgroup/data_source_ibm_iam_access_group_template_assignment_test.go +++ b/ibm/service/iamaccessgroup/data_source_ibm_iam_access_group_template_assignment_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/iamaccessgroup/data_source_ibm_iam_access_group_test.go b/ibm/service/iamaccessgroup/data_source_ibm_iam_access_group_test.go index dad96c0b3c..513759948a 100644 --- a/ibm/service/iamaccessgroup/data_source_ibm_iam_access_group_test.go +++ b/ibm/service/iamaccessgroup/data_source_ibm_iam_access_group_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIAMAccessGroupDataSource_Basic(t *testing.T) { diff --git a/ibm/service/iamaccessgroup/data_source_ibm_ibm_iam_access_group_template_versions_test.go b/ibm/service/iamaccessgroup/data_source_ibm_ibm_iam_access_group_template_versions_test.go index 95d0252aac..6875ed9668 100644 --- a/ibm/service/iamaccessgroup/data_source_ibm_ibm_iam_access_group_template_versions_test.go +++ b/ibm/service/iamaccessgroup/data_source_ibm_ibm_iam_access_group_template_versions_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/iamaccessgroup/resource_ibm_iam_access_group.go b/ibm/service/iamaccessgroup/resource_ibm_iam_access_group.go index 886fe5508b..801a62a360 100644 --- a/ibm/service/iamaccessgroup/resource_ibm_iam_access_group.go +++ b/ibm/service/iamaccessgroup/resource_ibm_iam_access_group.go @@ -12,7 +12,7 @@ import ( "github.com/IBM/go-sdk-core/v5/core" "github.com/IBM/platform-services-go-sdk/iamaccessgroupsv2" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -88,13 +88,13 @@ func resourceIBMIAMAccessGroupRead(context context.Context, d *schema.ResourceDa getAccessGroupOptions := iamAccessGroupsClient.NewGetAccessGroupOptions(agrpID) var agrp *iamaccessgroupsv2.Group var detailedResponse *core.DetailedResponse - err = resource.RetryContext(context, 5*time.Second, func() *resource.RetryError { + err = retry.RetryContext(context, 5*time.Second, func() *retry.RetryError { agrp, detailedResponse, err = iamAccessGroupsClient.GetAccessGroup(getAccessGroupOptions) if err != nil || agrp == nil { if detailedResponse != nil && detailedResponse.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_account_settings_test.go b/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_account_settings_test.go index c918cf0e88..49f837cbee 100644 --- a/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_account_settings_test.go +++ b/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_account_settings_test.go @@ -5,14 +5,15 @@ package iamaccessgroup_test import ( "fmt" - iamaccessgroups "github.com/IBM/platform-services-go-sdk/iamaccessgroupsv2" "testing" + iamaccessgroups "github.com/IBM/platform-services-go-sdk/iamaccessgroupsv2" + acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMIAMAccessGroupAccountSettingsBasic(t *testing.T) { diff --git a/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_dynamic_rule_test.go b/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_dynamic_rule_test.go index 7deeae2659..0765677639 100644 --- a/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_dynamic_rule_test.go +++ b/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_dynamic_rule_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/platform-services-go-sdk/iamaccessgroupsv2" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMIAMDynamicRule_Basic(t *testing.T) { diff --git a/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_members_test.go b/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_members_test.go index 8d82e7868b..33858c9f00 100644 --- a/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_members_test.go +++ b/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_members_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/platform-services-go-sdk/iamaccessgroupsv2" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMIAMAccessGroupMember_Basic(t *testing.T) { diff --git a/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_template_assignment.go b/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_template_assignment.go index fb786da9a6..d7936dd175 100644 --- a/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_template_assignment.go +++ b/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_template_assignment.go @@ -10,7 +10,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -338,9 +338,9 @@ func resourceIBMIAMAccessGroupTemplateAssignmentDelete(context context.Context, return nil } -func waitForAssignment(timeout time.Duration, meta interface{}, d *schema.ResourceData, refreshFn func(string, interface{}) resource.StateRefreshFunc) (interface{}, error) { +func waitForAssignment(timeout time.Duration, meta interface{}, d *schema.ResourceData, refreshFn func(string, interface{}) retry.StateRefreshFunc) (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{InProgress}, Target: []string{complete}, Refresh: refreshFn(d.Id(), meta), @@ -352,7 +352,7 @@ func waitForAssignment(timeout time.Duration, meta interface{}, d *schema.Resour return stateConf.WaitForState() } -func isAccessGroupTemplateAssigned(id string, meta interface{}) resource.StateRefreshFunc { +func isAccessGroupTemplateAssigned(id string, meta interface{}) retry.StateRefreshFunc { return func() (interface{}, string, error) { iamAccessGroupsClient, err := meta.(conns.ClientSession).IAMAccessGroupsV2() if err != nil { @@ -389,7 +389,7 @@ func isAccessGroupTemplateAssigned(id string, meta interface{}) resource.StateRe } } -func isAccessGroupTemplateAssignmentDeleted(id string, meta interface{}) resource.StateRefreshFunc { +func isAccessGroupTemplateAssignmentDeleted(id string, meta interface{}) retry.StateRefreshFunc { return func() (interface{}, string, error) { iamAccessGroupsClient, err := meta.(conns.ClientSession).IAMAccessGroupsV2() if err != nil { diff --git a/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_template_assignment_test.go b/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_template_assignment_test.go index 9fcfc75483..428a35af4d 100644 --- a/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_template_assignment_test.go +++ b/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_template_assignment_test.go @@ -8,9 +8,9 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_template_test.go b/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_template_test.go index 78902bba8d..18ad15a3a1 100644 --- a/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_template_test.go +++ b/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_template_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_template_version_test.go b/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_template_version_test.go index 7f27f48196..7b438449bc 100644 --- a/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_template_version_test.go +++ b/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_template_version_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_test.go b/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_test.go index 9be0d83c43..dc5e542425 100644 --- a/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_test.go +++ b/ibm/service/iamaccessgroup/resource_ibm_iam_access_group_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/platform-services-go-sdk/iamaccessgroupsv2" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMIAMAccessGroup_Basic(t *testing.T) { diff --git a/ibm/service/iamidentity/data_source_ibm_iam_account_settings_template_assignment_test.go b/ibm/service/iamidentity/data_source_ibm_iam_account_settings_template_assignment_test.go index 0f0449fff8..2fc1368ac7 100644 --- a/ibm/service/iamidentity/data_source_ibm_iam_account_settings_template_assignment_test.go +++ b/ibm/service/iamidentity/data_source_ibm_iam_account_settings_template_assignment_test.go @@ -5,13 +5,14 @@ package iamidentity_test import ( "fmt" + "testing" + acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/platform-services-go-sdk/iamidentityv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "testing" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMAccountSettingsTemplateAssignmentDataSourceBasic(t *testing.T) { diff --git a/ibm/service/iamidentity/data_source_ibm_iam_account_settings_template_test.go b/ibm/service/iamidentity/data_source_ibm_iam_account_settings_template_test.go index eff252199a..4b9321197f 100644 --- a/ibm/service/iamidentity/data_source_ibm_iam_account_settings_template_test.go +++ b/ibm/service/iamidentity/data_source_ibm_iam_account_settings_template_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/iamidentity/data_source_ibm_iam_account_settings_test.go b/ibm/service/iamidentity/data_source_ibm_iam_account_settings_test.go index 9d9cf599a9..aeb25e39b9 100644 --- a/ibm/service/iamidentity/data_source_ibm_iam_account_settings_test.go +++ b/ibm/service/iamidentity/data_source_ibm_iam_account_settings_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIAMAccountSettingsDataSourceBasic(t *testing.T) { diff --git a/ibm/service/iamidentity/data_source_ibm_iam_api_key_test.go b/ibm/service/iamidentity/data_source_ibm_iam_api_key_test.go index 70d03a5ea2..5e8d20a804 100644 --- a/ibm/service/iamidentity/data_source_ibm_iam_api_key_test.go +++ b/ibm/service/iamidentity/data_source_ibm_iam_api_key_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmIamApiKeyDataSourceBasic(t *testing.T) { diff --git a/ibm/service/iamidentity/data_source_ibm_iam_effective_account_settings_test.go b/ibm/service/iamidentity/data_source_ibm_iam_effective_account_settings_test.go index 6ad2a6ecc9..38aa6266fd 100644 --- a/ibm/service/iamidentity/data_source_ibm_iam_effective_account_settings_test.go +++ b/ibm/service/iamidentity/data_source_ibm_iam_effective_account_settings_test.go @@ -11,7 +11,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/iamidentity" diff --git a/ibm/service/iamidentity/data_source_ibm_iam_service_id_test.go b/ibm/service/iamidentity/data_source_ibm_iam_service_id_test.go index 00ef54cb84..ff5e027c85 100644 --- a/ibm/service/iamidentity/data_source_ibm_iam_service_id_test.go +++ b/ibm/service/iamidentity/data_source_ibm_iam_service_id_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIAMServiceIDDataSource_basic(t *testing.T) { diff --git a/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_claim_rule_test.go b/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_claim_rule_test.go index b9fba49f1a..521fdf8a3b 100644 --- a/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_claim_rule_test.go +++ b/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_claim_rule_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIAMTrustedProfileClaimRuleDataSourceBasic(t *testing.T) { diff --git a/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_identities_test.go b/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_identities_test.go index 4020f1eb8e..d519b0a097 100644 --- a/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_identities_test.go +++ b/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_identities_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_identity_test.go b/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_identity_test.go index 531da1d23b..177aab1aa3 100644 --- a/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_identity_test.go +++ b/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_identity_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_link_test.go b/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_link_test.go index 47fc32206b..97d28b9b61 100644 --- a/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_link_test.go +++ b/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_link_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIAMTrustedProfileLinkDataSourceBasic(t *testing.T) { diff --git a/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_links_test.go b/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_links_test.go index 932397830d..2d4d12cf38 100644 --- a/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_links_test.go +++ b/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_links_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIamTrustedProfileLinksDataSourceBasic(t *testing.T) { diff --git a/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_template_assignment_test.go b/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_template_assignment_test.go index 882d655ee8..9220fb7cf8 100644 --- a/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_template_assignment_test.go +++ b/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_template_assignment_test.go @@ -5,13 +5,14 @@ package iamidentity_test import ( "fmt" + "testing" + "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/platform-services-go-sdk/iamidentityv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "testing" + "github.com/hashicorp/terraform-plugin-testing/terraform" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_template_test.go b/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_template_test.go index f1400b05b9..f2bcd546b0 100644 --- a/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_template_test.go +++ b/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_template_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_test.go b/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_test.go index 863b793de7..0070614285 100644 --- a/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_test.go +++ b/ibm/service/iamidentity/data_source_ibm_iam_trusted_profile_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIAMTrustedProfileDataSourceBasic(t *testing.T) { diff --git a/ibm/service/iamidentity/data_source_ibm_iam_trusted_profiles_claim_rules_test.go b/ibm/service/iamidentity/data_source_ibm_iam_trusted_profiles_claim_rules_test.go index 403951b066..6dc1855d0c 100644 --- a/ibm/service/iamidentity/data_source_ibm_iam_trusted_profiles_claim_rules_test.go +++ b/ibm/service/iamidentity/data_source_ibm_iam_trusted_profiles_claim_rules_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIamTrustedProfilesClaimRulesDataSourceBasic(t *testing.T) { diff --git a/ibm/service/iamidentity/data_source_ibm_iam_trusted_profiles_test.go b/ibm/service/iamidentity/data_source_ibm_iam_trusted_profiles_test.go index 735dbd4f15..8b2dde90a1 100644 --- a/ibm/service/iamidentity/data_source_ibm_iam_trusted_profiles_test.go +++ b/ibm/service/iamidentity/data_source_ibm_iam_trusted_profiles_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIamTrustedProfilesDataSourceBasic(t *testing.T) { diff --git a/ibm/service/iamidentity/data_source_ibm_iam_user_mfa_enrollments_test.go b/ibm/service/iamidentity/data_source_ibm_iam_user_mfa_enrollments_test.go index b3b6b28ac9..4ccd8ae21e 100644 --- a/ibm/service/iamidentity/data_source_ibm_iam_user_mfa_enrollments_test.go +++ b/ibm/service/iamidentity/data_source_ibm_iam_user_mfa_enrollments_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/iamidentity/data_source_ibm_iam_user_profile_test.go b/ibm/service/iamidentity/data_source_ibm_iam_user_profile_test.go index e6f7cdc20b..f1aa45f31f 100644 --- a/ibm/service/iamidentity/data_source_ibm_iam_user_profile_test.go +++ b/ibm/service/iamidentity/data_source_ibm_iam_user_profile_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIAMUserProfileDataSource_Basic(t *testing.T) { diff --git a/ibm/service/iamidentity/data_source_ibm_iam_users_test.go b/ibm/service/iamidentity/data_source_ibm_iam_users_test.go index 8df35606e1..ea1538a810 100644 --- a/ibm/service/iamidentity/data_source_ibm_iam_users_test.go +++ b/ibm/service/iamidentity/data_source_ibm_iam_users_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIAMUsersDataSource_Basic(t *testing.T) { diff --git a/ibm/service/iamidentity/resource_ibm_iam_account_settings_template_assignment.go b/ibm/service/iamidentity/resource_ibm_iam_account_settings_template_assignment.go index 70aeac1b30..76f5e54dca 100644 --- a/ibm/service/iamidentity/resource_ibm_iam_account_settings_template_assignment.go +++ b/ibm/service/iamidentity/resource_ibm_iam_account_settings_template_assignment.go @@ -6,11 +6,11 @@ package iamidentity import ( "context" "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "log" "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -605,7 +605,7 @@ func resourceIBMAccountSettingsTemplateAssignmentEnityHistoryRecordToMap(model * return modelMap, nil } -func isAccountSettingsAssignmentRemoved(id string, meta interface{}) resource.StateRefreshFunc { +func isAccountSettingsAssignmentRemoved(id string, meta interface{}) retry.StateRefreshFunc { return func() (interface{}, string, error) { iamIdentityClient, err := meta.(conns.ClientSession).IAMIdentityV1API() @@ -627,7 +627,7 @@ func isAccountSettingsAssignmentRemoved(id string, meta interface{}) resource.St } } -func isAccountSettingsTemplateAssigned(id string, meta interface{}) resource.StateRefreshFunc { +func isAccountSettingsTemplateAssigned(id string, meta interface{}) retry.StateRefreshFunc { return func() (interface{}, string, error) { iamIdentityClient, err := meta.(conns.ClientSession).IAMIdentityV1API() diff --git a/ibm/service/iamidentity/resource_ibm_iam_account_settings_template_assignment_test.go b/ibm/service/iamidentity/resource_ibm_iam_account_settings_template_assignment_test.go index e2bc9aad00..933419c039 100644 --- a/ibm/service/iamidentity/resource_ibm_iam_account_settings_template_assignment_test.go +++ b/ibm/service/iamidentity/resource_ibm_iam_account_settings_template_assignment_test.go @@ -5,12 +5,13 @@ package iamidentity_test import ( "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "regexp" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/iamidentity/resource_ibm_iam_account_settings_template_test.go b/ibm/service/iamidentity/resource_ibm_iam_account_settings_template_test.go index a9d9759217..694febe2ee 100644 --- a/ibm/service/iamidentity/resource_ibm_iam_account_settings_template_test.go +++ b/ibm/service/iamidentity/resource_ibm_iam_account_settings_template_test.go @@ -8,9 +8,9 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/iamidentity/resource_ibm_iam_account_settings_test.go b/ibm/service/iamidentity/resource_ibm_iam_account_settings_test.go index 114bdd3bd7..457d2db1a4 100644 --- a/ibm/service/iamidentity/resource_ibm_iam_account_settings_test.go +++ b/ibm/service/iamidentity/resource_ibm_iam_account_settings_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/platform-services-go-sdk/iamidentityv1" ) diff --git a/ibm/service/iamidentity/resource_ibm_iam_api_key_test.go b/ibm/service/iamidentity/resource_ibm_iam_api_key_test.go index c29f99d779..d946166673 100644 --- a/ibm/service/iamidentity/resource_ibm_iam_api_key_test.go +++ b/ibm/service/iamidentity/resource_ibm_iam_api_key_test.go @@ -10,9 +10,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/platform-services-go-sdk/iamidentityv1" ) diff --git a/ibm/service/iamidentity/resource_ibm_iam_service_api_key_test.go b/ibm/service/iamidentity/resource_ibm_iam_service_api_key_test.go index b59e9a9835..0ccd321b82 100644 --- a/ibm/service/iamidentity/resource_ibm_iam_service_api_key_test.go +++ b/ibm/service/iamidentity/resource_ibm_iam_service_api_key_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM/platform-services-go-sdk/iamidentityv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMIAMServiceAPIKey_Basic(t *testing.T) { diff --git a/ibm/service/iamidentity/resource_ibm_iam_service_id_test.go b/ibm/service/iamidentity/resource_ibm_iam_service_id_test.go index 4b33f01579..60daeef317 100644 --- a/ibm/service/iamidentity/resource_ibm_iam_service_id_test.go +++ b/ibm/service/iamidentity/resource_ibm_iam_service_id_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/platform-services-go-sdk/iamidentityv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMIAMServiceID_Basic(t *testing.T) { diff --git a/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_claim_rule_test.go b/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_claim_rule_test.go index 8fef38ecb6..6e573a3434 100644 --- a/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_claim_rule_test.go +++ b/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_claim_rule_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/platform-services-go-sdk/iamidentityv1" ) diff --git a/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_identity_test.go b/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_identity_test.go index 4698230be5..d95134ea4e 100644 --- a/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_identity_test.go +++ b/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_identity_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_link_test.go b/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_link_test.go index 8da814680b..799ecf5c37 100644 --- a/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_link_test.go +++ b/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_link_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/platform-services-go-sdk/iamidentityv1" ) diff --git a/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_template_assignment.go b/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_template_assignment.go index 2b4a131291..989b3bbc92 100644 --- a/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_template_assignment.go +++ b/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_template_assignment.go @@ -9,9 +9,8 @@ import ( "log" "time" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -560,8 +559,8 @@ func resourceIBMTrustedProfileTemplateAssignmentDelete(context context.Context, return nil } -func waitForAssignment(timeout time.Duration, meta interface{}, d *schema.ResourceData, refreshFn func(string, interface{}) resource.StateRefreshFunc) (interface{}, error) { - stateConf := &resource.StateChangeConf{ +func waitForAssignment(timeout time.Duration, meta interface{}, d *schema.ResourceData, refreshFn func(string, interface{}) retry.StateRefreshFunc) (interface{}, error) { + stateConf := &retry.StateChangeConf{ Pending: []string{InProgress}, Target: []string{complete}, Refresh: refreshFn(d.Id(), meta), @@ -573,7 +572,7 @@ func waitForAssignment(timeout time.Duration, meta interface{}, d *schema.Resour return stateConf.WaitForState() } -func isTrustedProfileAssignmentRemoved(id string, meta interface{}) resource.StateRefreshFunc { +func isTrustedProfileAssignmentRemoved(id string, meta interface{}) retry.StateRefreshFunc { return func() (interface{}, string, error) { iamIdentityClient, err := meta.(conns.ClientSession).IAMIdentityV1API() @@ -594,7 +593,7 @@ func isTrustedProfileAssignmentRemoved(id string, meta interface{}) resource.Sta } } -func isTrustedProfileTemplateAssigned(id string, meta interface{}) resource.StateRefreshFunc { +func isTrustedProfileTemplateAssigned(id string, meta interface{}) retry.StateRefreshFunc { return func() (interface{}, string, error) { iamIdentityClient, err := meta.(conns.ClientSession).IAMIdentityV1API() diff --git a/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_template_assignment_test.go b/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_template_assignment_test.go index fa8b5887b8..e8854558b8 100644 --- a/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_template_assignment_test.go +++ b/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_template_assignment_test.go @@ -8,9 +8,9 @@ import ( "regexp" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_template_test.go b/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_template_test.go index 5843210025..d59d69ac77 100644 --- a/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_template_test.go +++ b/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_template_test.go @@ -8,9 +8,9 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_test.go b/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_test.go index 958eca3992..0502e1595d 100644 --- a/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_test.go +++ b/ibm/service/iamidentity/resource_ibm_iam_trusted_profile_test.go @@ -10,9 +10,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/platform-services-go-sdk/iamidentityv1" ) diff --git a/ibm/service/iamidentity/resource_ibm_iam_user_settings_test.go b/ibm/service/iamidentity/resource_ibm_iam_user_settings_test.go index 00a7387aad..02813a2723 100644 --- a/ibm/service/iamidentity/resource_ibm_iam_user_settings_test.go +++ b/ibm/service/iamidentity/resource_ibm_iam_user_settings_test.go @@ -12,8 +12,8 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMIAMUserSettings_Basic(t *testing.T) { diff --git a/ibm/service/iampolicy/data_source_ibm_iam_access_group_policy_test.go b/ibm/service/iampolicy/data_source_ibm_iam_access_group_policy_test.go index af12171c6d..a1ca64c8fe 100644 --- a/ibm/service/iampolicy/data_source_ibm_iam_access_group_policy_test.go +++ b/ibm/service/iampolicy/data_source_ibm_iam_access_group_policy_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIAMAccessGroupPolicyDataSource_Basic(t *testing.T) { diff --git a/ibm/service/iampolicy/data_source_ibm_iam_authorization_policies_test.go b/ibm/service/iampolicy/data_source_ibm_iam_authorization_policies_test.go index b33893b921..84f0374dde 100644 --- a/ibm/service/iampolicy/data_source_ibm_iam_authorization_policies_test.go +++ b/ibm/service/iampolicy/data_source_ibm_iam_authorization_policies_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIAMAuthorizationPoliciesDataSource_Basic(t *testing.T) { diff --git a/ibm/service/iampolicy/data_source_ibm_iam_policy_assignment_test.go b/ibm/service/iampolicy/data_source_ibm_iam_policy_assignment_test.go index 96e7647359..c1b2495cb0 100644 --- a/ibm/service/iampolicy/data_source_ibm_iam_policy_assignment_test.go +++ b/ibm/service/iampolicy/data_source_ibm_iam_policy_assignment_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/iampolicy/data_source_ibm_iam_policy_assignments_test.go b/ibm/service/iampolicy/data_source_ibm_iam_policy_assignments_test.go index 76ec568bc3..3eb30387da 100644 --- a/ibm/service/iampolicy/data_source_ibm_iam_policy_assignments_test.go +++ b/ibm/service/iampolicy/data_source_ibm_iam_policy_assignments_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/iampolicy/data_source_ibm_iam_policy_template_test.go b/ibm/service/iampolicy/data_source_ibm_iam_policy_template_test.go index 02517278fe..0b1b05cbf4 100644 --- a/ibm/service/iampolicy/data_source_ibm_iam_policy_template_test.go +++ b/ibm/service/iampolicy/data_source_ibm_iam_policy_template_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/iampolicy/data_source_ibm_iam_policy_template_version_test.go b/ibm/service/iampolicy/data_source_ibm_iam_policy_template_version_test.go index e70fdde4dd..e05ed1093b 100644 --- a/ibm/service/iampolicy/data_source_ibm_iam_policy_template_version_test.go +++ b/ibm/service/iampolicy/data_source_ibm_iam_policy_template_version_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/iampolicy/data_source_ibm_iam_role_actions_test.go b/ibm/service/iampolicy/data_source_ibm_iam_role_actions_test.go index ee4f57f574..1e60bb3e25 100644 --- a/ibm/service/iampolicy/data_source_ibm_iam_role_actions_test.go +++ b/ibm/service/iampolicy/data_source_ibm_iam_role_actions_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIAMRoleDataSourceAction_basic(t *testing.T) { diff --git a/ibm/service/iampolicy/data_source_ibm_iam_roles_test.go b/ibm/service/iampolicy/data_source_ibm_iam_roles_test.go index 71a0f3987d..fbb983273d 100644 --- a/ibm/service/iampolicy/data_source_ibm_iam_roles_test.go +++ b/ibm/service/iampolicy/data_source_ibm_iam_roles_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIAMRoleDataSourcebasic(t *testing.T) { diff --git a/ibm/service/iampolicy/data_source_ibm_iam_service_policy_test.go b/ibm/service/iampolicy/data_source_ibm_iam_service_policy_test.go index eeb2dc0eff..8554442cb8 100644 --- a/ibm/service/iampolicy/data_source_ibm_iam_service_policy_test.go +++ b/ibm/service/iampolicy/data_source_ibm_iam_service_policy_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIAMServicePolicyDataSource_Basic(t *testing.T) { diff --git a/ibm/service/iampolicy/data_source_ibm_iam_trusted_profile_policy_test.go b/ibm/service/iampolicy/data_source_ibm_iam_trusted_profile_policy_test.go index 7e00c1e6ef..423f41bc54 100644 --- a/ibm/service/iampolicy/data_source_ibm_iam_trusted_profile_policy_test.go +++ b/ibm/service/iampolicy/data_source_ibm_iam_trusted_profile_policy_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIAMTrustedProfilePolicyDataSource_Basic(t *testing.T) { diff --git a/ibm/service/iampolicy/data_source_ibm_iam_user_policy_test.go b/ibm/service/iampolicy/data_source_ibm_iam_user_policy_test.go index 2d2c0231cb..05e01454df 100644 --- a/ibm/service/iampolicy/data_source_ibm_iam_user_policy_test.go +++ b/ibm/service/iampolicy/data_source_ibm_iam_user_policy_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) // TODO: test fails locally using test env because it returns 3 policies (even existing test) diff --git a/ibm/service/iampolicy/resource_ibm_iam_access_group_policy.go b/ibm/service/iampolicy/resource_ibm_iam_access_group_policy.go index 5dda95b0ab..190361acad 100644 --- a/ibm/service/iampolicy/resource_ibm_iam_access_group_policy.go +++ b/ibm/service/iampolicy/resource_ibm_iam_access_group_policy.go @@ -13,7 +13,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/IBM/go-sdk-core/v5/core" "github.com/IBM/platform-services-go-sdk/iampolicymanagementv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -414,14 +414,14 @@ func resourceIBMIAMAccessGroupPolicyCreate(d *schema.ResourceData, meta interfac getPolicyOptions.SetHeaders(map[string]string{"Transaction-Id": transactionID.(string)}) } - err = resource.Retry(5*time.Minute, func() *resource.RetryError { + err = retry.Retry(5*time.Minute, func() *retry.RetryError { var err error policy, res, err := iamPolicyManagementClient.GetV2Policy(getPolicyOptions) if err != nil || policy == nil { if res != nil && res.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) @@ -462,14 +462,14 @@ func resourceIBMIAMAccessGroupPolicyRead(d *schema.ResourceData, meta interface{ accessGroupPolicy := &iampolicymanagementv1.V2PolicyTemplateMetaData{} res := &core.DetailedResponse{} - err = resource.Retry(5*time.Minute, func() *resource.RetryError { + err = retry.Retry(5*time.Minute, func() *retry.RetryError { var err error accessGroupPolicy, res, err = iamPolicyManagementClient.GetV2Policy(getPolicyOptions) if err != nil || accessGroupPolicy == nil { if res != nil && res.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/iampolicy/resource_ibm_iam_access_group_policy_test.go b/ibm/service/iampolicy/resource_ibm_iam_access_group_policy_test.go index 1a5fd21c76..51827cd856 100644 --- a/ibm/service/iampolicy/resource_ibm_iam_access_group_policy_test.go +++ b/ibm/service/iampolicy/resource_ibm_iam_access_group_policy_test.go @@ -13,9 +13,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/platform-services-go-sdk/iampolicymanagementv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMIAMAccessGroupPolicy_Basic(t *testing.T) { diff --git a/ibm/service/iampolicy/resource_ibm_iam_authorization_policy.go b/ibm/service/iampolicy/resource_ibm_iam_authorization_policy.go index 3a43380ff0..0a3f17c710 100644 --- a/ibm/service/iampolicy/resource_ibm_iam_authorization_policy.go +++ b/ibm/service/iampolicy/resource_ibm_iam_authorization_policy.go @@ -14,7 +14,7 @@ import ( "github.com/IBM/go-sdk-core/v5/core" "github.com/IBM/platform-services-go-sdk/iampolicymanagementv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -501,14 +501,14 @@ func resourceIBMIAMAuthorizationPolicyRead(d *schema.ResourceData, meta interfac authorizationPolicy, resp, err := iampapClient.GetV2Policy(getPolicyOptions) - err = resource.Retry(5*time.Minute, func() *resource.RetryError { + err = retry.Retry(5*time.Minute, func() *retry.RetryError { var err error authorizationPolicy, resp, err = iampapClient.GetV2Policy(getPolicyOptions) if err != nil || authorizationPolicy == nil { if resp != nil && resp.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/iampolicy/resource_ibm_iam_authorization_policy_test.go b/ibm/service/iampolicy/resource_ibm_iam_authorization_policy_test.go index d6a62efaa7..75da4991fa 100644 --- a/ibm/service/iampolicy/resource_ibm_iam_authorization_policy_test.go +++ b/ibm/service/iampolicy/resource_ibm_iam_authorization_policy_test.go @@ -10,9 +10,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/platform-services-go-sdk/iampolicymanagementv1" ) diff --git a/ibm/service/iampolicy/resource_ibm_iam_custom_role_test.go b/ibm/service/iampolicy/resource_ibm_iam_custom_role_test.go index f248f295e0..522e1d6755 100644 --- a/ibm/service/iampolicy/resource_ibm_iam_custom_role_test.go +++ b/ibm/service/iampolicy/resource_ibm_iam_custom_role_test.go @@ -13,9 +13,9 @@ import ( "github.com/IBM/platform-services-go-sdk/iamaccessgroupsv2" "github.com/IBM/platform-services-go-sdk/iampolicymanagementv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMIAMCustomRole_Basic(t *testing.T) { diff --git a/ibm/service/iampolicy/resource_ibm_iam_policy_assignment.go b/ibm/service/iampolicy/resource_ibm_iam_policy_assignment.go index 564e450ac8..c4218dfb4b 100644 --- a/ibm/service/iampolicy/resource_ibm_iam_policy_assignment.go +++ b/ibm/service/iampolicy/resource_ibm_iam_policy_assignment.go @@ -11,7 +11,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -547,9 +547,9 @@ func GetTargetModel(d *schema.ResourceData) (*iampolicymanagementv1.AssignmentTa return targetModel, nil } -func waitForAssignment(timeout time.Duration, meta interface{}, d *schema.ResourceData, refreshFn func(string, interface{}) resource.StateRefreshFunc) (interface{}, error) { +func waitForAssignment(timeout time.Duration, meta interface{}, d *schema.ResourceData, refreshFn func(string, interface{}) retry.StateRefreshFunc) (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{InProgress}, Target: []string{complete}, Refresh: refreshFn(d.Id(), meta), @@ -561,7 +561,7 @@ func waitForAssignment(timeout time.Duration, meta interface{}, d *schema.Resour return stateConf.WaitForState() } -func isAccessPolicyAssigned(id string, meta interface{}) resource.StateRefreshFunc { +func isAccessPolicyAssigned(id string, meta interface{}) retry.StateRefreshFunc { return func() (interface{}, string, error) { iamPolicyManagementClient, err := meta.(conns.ClientSession).IAMPolicyManagementV1API() if err != nil { @@ -609,7 +609,7 @@ func isAccessPolicyAssigned(id string, meta interface{}) resource.StateRefreshFu } } -func isAccessPolicyAssignedDeleted(id string, meta interface{}) resource.StateRefreshFunc { +func isAccessPolicyAssignedDeleted(id string, meta interface{}) retry.StateRefreshFunc { return func() (interface{}, string, error) { iamPolicyManagementClient, err := meta.(conns.ClientSession).IAMPolicyManagementV1API() if err != nil { diff --git a/ibm/service/iampolicy/resource_ibm_iam_policy_assignment_test.go b/ibm/service/iampolicy/resource_ibm_iam_policy_assignment_test.go index aa1dc86bd7..c8cc3c7040 100644 --- a/ibm/service/iampolicy/resource_ibm_iam_policy_assignment_test.go +++ b/ibm/service/iampolicy/resource_ibm_iam_policy_assignment_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/iampolicy/resource_ibm_iam_policy_template_test.go b/ibm/service/iampolicy/resource_ibm_iam_policy_template_test.go index 65e82dae13..a73ceeef6e 100644 --- a/ibm/service/iampolicy/resource_ibm_iam_policy_template_test.go +++ b/ibm/service/iampolicy/resource_ibm_iam_policy_template_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/iampolicy/resource_ibm_iam_policy_template_version_test.go b/ibm/service/iampolicy/resource_ibm_iam_policy_template_version_test.go index c12060b51d..3ca56c79a4 100644 --- a/ibm/service/iampolicy/resource_ibm_iam_policy_template_version_test.go +++ b/ibm/service/iampolicy/resource_ibm_iam_policy_template_version_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/iampolicy/resource_ibm_iam_service_policy.go b/ibm/service/iampolicy/resource_ibm_iam_service_policy.go index 9b14ed0696..e29e4c5a8b 100644 --- a/ibm/service/iampolicy/resource_ibm_iam_service_policy.go +++ b/ibm/service/iampolicy/resource_ibm_iam_service_policy.go @@ -14,7 +14,7 @@ import ( "github.com/IBM/go-sdk-core/v5/core" "github.com/IBM/platform-services-go-sdk/iamidentityv1" "github.com/IBM/platform-services-go-sdk/iampolicymanagementv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -436,15 +436,15 @@ func resourceIBMIAMServicePolicyCreate(d *schema.ResourceData, meta interface{}) getPolicyOptions.SetHeaders(map[string]string{"Transaction-Id": transactionID.(string)}) } - err = resource.Retry(5*time.Minute, func() *resource.RetryError { + err = retry.Retry(5*time.Minute, func() *retry.RetryError { var err error policy, res, err := iamPolicyManagementClient.GetV2Policy(getPolicyOptions) if err != nil || policy == nil { if res != nil && res.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) @@ -496,15 +496,15 @@ func resourceIBMIAMServicePolicyRead(d *schema.ResourceData, meta interface{}) e getPolicyOptions.SetHeaders(map[string]string{"Transaction-Id": transactionID.(string)}) } - err = resource.Retry(5*time.Minute, func() *resource.RetryError { + err = retry.Retry(5*time.Minute, func() *retry.RetryError { var err error servicePolicy, res, err = iamPolicyManagementClient.GetV2Policy(getPolicyOptions) if err != nil || servicePolicy == nil { if res != nil && res.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/iampolicy/resource_ibm_iam_service_policy_test.go b/ibm/service/iampolicy/resource_ibm_iam_service_policy_test.go index 130677ad47..e2914f14c5 100644 --- a/ibm/service/iampolicy/resource_ibm_iam_service_policy_test.go +++ b/ibm/service/iampolicy/resource_ibm_iam_service_policy_test.go @@ -13,9 +13,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/platform-services-go-sdk/iampolicymanagementv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMIAMServicePolicy_Basic(t *testing.T) { diff --git a/ibm/service/iampolicy/resource_ibm_iam_trusted_profile_policy.go b/ibm/service/iampolicy/resource_ibm_iam_trusted_profile_policy.go index f3631f38ae..0737c6e5d5 100644 --- a/ibm/service/iampolicy/resource_ibm_iam_trusted_profile_policy.go +++ b/ibm/service/iampolicy/resource_ibm_iam_trusted_profile_policy.go @@ -14,7 +14,7 @@ import ( "github.com/IBM/go-sdk-core/v5/core" "github.com/IBM/platform-services-go-sdk/iamidentityv1" "github.com/IBM/platform-services-go-sdk/iampolicymanagementv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -435,15 +435,15 @@ func resourceIBMIAMTrustedProfilePolicyCreate(d *schema.ResourceData, meta inter getPolicyOptions.SetHeaders(map[string]string{"Transaction-Id": transactionID.(string)}) } - err = resource.Retry(5*time.Minute, func() *resource.RetryError { + err = retry.Retry(5*time.Minute, func() *retry.RetryError { var err error policy, res, err := iamPolicyManagementClient.GetV2Policy(getPolicyOptions) if err != nil || policy == nil { if res != nil && res.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) @@ -494,15 +494,15 @@ func resourceIBMIAMTrustedProfilePolicyRead(d *schema.ResourceData, meta interfa getPolicyOptions.SetHeaders(map[string]string{"Transaction-Id": transactionID.(string)}) } - err = resource.Retry(5*time.Minute, func() *resource.RetryError { + err = retry.Retry(5*time.Minute, func() *retry.RetryError { var err error trustedProfilePolicy, res, err = iamPolicyManagementClient.GetV2Policy(getPolicyOptions) if err != nil || trustedProfilePolicy == nil { if res != nil && res.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/iampolicy/resource_ibm_iam_trusted_profile_policy_test.go b/ibm/service/iampolicy/resource_ibm_iam_trusted_profile_policy_test.go index d973a6df24..7a583e7b93 100644 --- a/ibm/service/iampolicy/resource_ibm_iam_trusted_profile_policy_test.go +++ b/ibm/service/iampolicy/resource_ibm_iam_trusted_profile_policy_test.go @@ -13,9 +13,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/platform-services-go-sdk/iampolicymanagementv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMIAMTrustedProfilePolicyBasic(t *testing.T) { diff --git a/ibm/service/iampolicy/resource_ibm_iam_user_policy.go b/ibm/service/iampolicy/resource_ibm_iam_user_policy.go index c3c3529ada..8001457ee2 100644 --- a/ibm/service/iampolicy/resource_ibm_iam_user_policy.go +++ b/ibm/service/iampolicy/resource_ibm_iam_user_policy.go @@ -12,7 +12,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/go-sdk-core/v5/core" "github.com/IBM/platform-services-go-sdk/iampolicymanagementv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -403,15 +403,15 @@ func resourceIBMIAMUserPolicyCreate(d *schema.ResourceData, meta interface{}) er getPolicyOptions.SetHeaders(map[string]string{"Transaction-Id": transactionID.(string)}) } - err = resource.Retry(5*time.Minute, func() *resource.RetryError { + err = retry.Retry(5*time.Minute, func() *retry.RetryError { var err error policy, res, err := iamPolicyManagementClient.GetV2Policy(getPolicyOptions) if err != nil || policy == nil { if res != nil && res.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) @@ -452,15 +452,15 @@ func resourceIBMIAMUserPolicyRead(d *schema.ResourceData, meta interface{}) erro userPolicy := &iampolicymanagementv1.V2PolicyTemplateMetaData{} res := &core.DetailedResponse{} - err = resource.Retry(5*time.Minute, func() *resource.RetryError { + err = retry.Retry(5*time.Minute, func() *retry.RetryError { var err error userPolicy, res, err = iamPolicyManagementClient.GetV2Policy(getPolicyOptions) if err != nil || userPolicy == nil { if res != nil && res.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/iampolicy/resource_ibm_iam_user_policy_test.go b/ibm/service/iampolicy/resource_ibm_iam_user_policy_test.go index ce861ce2f4..981c48f813 100644 --- a/ibm/service/iampolicy/resource_ibm_iam_user_policy_test.go +++ b/ibm/service/iampolicy/resource_ibm_iam_user_policy_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/platform-services-go-sdk/iampolicymanagementv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMIAMUserPolicy_Basic(t *testing.T) { diff --git a/ibm/service/kms/data_source_ibm_kms_instance_policies_test.go b/ibm/service/kms/data_source_ibm_kms_instance_policies_test.go index e935172135..238d9a63c5 100644 --- a/ibm/service/kms/data_source_ibm_kms_instance_policies_test.go +++ b/ibm/service/kms/data_source_ibm_kms_instance_policies_test.go @@ -5,8 +5,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMKmsDataSourceInstancePolicy_basicNew(t *testing.T) { diff --git a/ibm/service/kms/data_source_ibm_kms_key_policies_test.go b/ibm/service/kms/data_source_ibm_kms_key_policies_test.go index 43ae4f8826..c1073a6f80 100644 --- a/ibm/service/kms/data_source_ibm_kms_key_policies_test.go +++ b/ibm/service/kms/data_source_ibm_kms_key_policies_test.go @@ -5,8 +5,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMKMSDataSourceKeyPolicy_basicNew(t *testing.T) { diff --git a/ibm/service/kms/data_source_ibm_kms_key_rings_test.go b/ibm/service/kms/data_source_ibm_kms_key_rings_test.go index d4f7b89789..fb4fee0cef 100644 --- a/ibm/service/kms/data_source_ibm_kms_key_rings_test.go +++ b/ibm/service/kms/data_source_ibm_kms_key_rings_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMKMSKeyRingDataSource_basic(t *testing.T) { diff --git a/ibm/service/kms/data_source_ibm_kms_key_test.go b/ibm/service/kms/data_source_ibm_kms_key_test.go index 8bc5f17116..8e35b13948 100644 --- a/ibm/service/kms/data_source_ibm_kms_key_test.go +++ b/ibm/service/kms/data_source_ibm_kms_key_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMKMSKeyDataSource_basic(t *testing.T) { diff --git a/ibm/service/kms/data_source_ibm_kms_keys_test.go b/ibm/service/kms/data_source_ibm_kms_keys_test.go index 94d4074453..e860cea6b1 100644 --- a/ibm/service/kms/data_source_ibm_kms_keys_test.go +++ b/ibm/service/kms/data_source_ibm_kms_keys_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMKMSDataSource_basic(t *testing.T) { diff --git a/ibm/service/kms/data_source_ibm_kms_kmip_adapter_test.go b/ibm/service/kms/data_source_ibm_kms_kmip_adapter_test.go index 96cd4050ee..4a5dd361bf 100644 --- a/ibm/service/kms/data_source_ibm_kms_kmip_adapter_test.go +++ b/ibm/service/kms/data_source_ibm_kms_kmip_adapter_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMKMSKMIPAdapterDataSource_basic(t *testing.T) { diff --git a/ibm/service/kms/data_source_ibm_kms_kmip_adapters_test.go b/ibm/service/kms/data_source_ibm_kms_kmip_adapters_test.go index de8194d639..c55ad5e4a6 100644 --- a/ibm/service/kms/data_source_ibm_kms_kmip_adapters_test.go +++ b/ibm/service/kms/data_source_ibm_kms_kmip_adapters_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMKMSKMIPAdaptersDataSource_basic(t *testing.T) { diff --git a/ibm/service/kms/data_source_ibm_kms_kmip_client_certificate_test.go b/ibm/service/kms/data_source_ibm_kms_kmip_client_certificate_test.go index 1ebc26239a..d7cbe3c8bb 100644 --- a/ibm/service/kms/data_source_ibm_kms_kmip_client_certificate_test.go +++ b/ibm/service/kms/data_source_ibm_kms_kmip_client_certificate_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMKMSKMIPClientCertDataSource_basic(t *testing.T) { diff --git a/ibm/service/kms/data_source_ibm_kms_kmip_client_certificates_test.go b/ibm/service/kms/data_source_ibm_kms_kmip_client_certificates_test.go index 66b20c54fb..9454bd835a 100644 --- a/ibm/service/kms/data_source_ibm_kms_kmip_client_certificates_test.go +++ b/ibm/service/kms/data_source_ibm_kms_kmip_client_certificates_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMKMSKMIPClientCertsDataSource_basic(t *testing.T) { diff --git a/ibm/service/kms/data_source_ibm_kms_kmip_object_test.go b/ibm/service/kms/data_source_ibm_kms_kmip_object_test.go index 2de0786ccd..ab0aa3f0a9 100644 --- a/ibm/service/kms/data_source_ibm_kms_kmip_object_test.go +++ b/ibm/service/kms/data_source_ibm_kms_kmip_object_test.go @@ -9,8 +9,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMKMSKMIPObjectDataSource_basic(t *testing.T) { diff --git a/ibm/service/kms/data_source_ibm_kms_kmip_objects_test.go b/ibm/service/kms/data_source_ibm_kms_kmip_objects_test.go index 9050739f54..892300bc80 100644 --- a/ibm/service/kms/data_source_ibm_kms_kmip_objects_test.go +++ b/ibm/service/kms/data_source_ibm_kms_kmip_objects_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMKMSKMIPObjectsDataSource_basic(t *testing.T) { diff --git a/ibm/service/kms/data_source_ibm_kp_key_test.go b/ibm/service/kms/data_source_ibm_kp_key_test.go index 48f486be82..cc85e6065a 100644 --- a/ibm/service/kms/data_source_ibm_kp_key_test.go +++ b/ibm/service/kms/data_source_ibm_kp_key_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMKpDataSource_basic(t *testing.T) { diff --git a/ibm/service/kms/resource_ibm_kms_instance_policies_test.go b/ibm/service/kms/resource_ibm_kms_instance_policies_test.go index cb712d1a34..8e8389f546 100644 --- a/ibm/service/kms/resource_ibm_kms_instance_policies_test.go +++ b/ibm/service/kms/resource_ibm_kms_instance_policies_test.go @@ -7,8 +7,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMKMSInstancePolicy_basic_check(t *testing.T) { diff --git a/ibm/service/kms/resource_ibm_kms_key_alias_test.go b/ibm/service/kms/resource_ibm_kms_key_alias_test.go index 28b43f8bbe..d1bbe45c6d 100644 --- a/ibm/service/kms/resource_ibm_kms_key_alias_test.go +++ b/ibm/service/kms/resource_ibm_kms_key_alias_test.go @@ -7,8 +7,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMKMSResource_Key_Alias_Name(t *testing.T) { diff --git a/ibm/service/kms/resource_ibm_kms_key_policies_test.go b/ibm/service/kms/resource_ibm_kms_key_policies_test.go index 2038a92ed8..2799ce1200 100644 --- a/ibm/service/kms/resource_ibm_kms_key_policies_test.go +++ b/ibm/service/kms/resource_ibm_kms_key_policies_test.go @@ -6,8 +6,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMKMSKeyPolicy_basic_check(t *testing.T) { diff --git a/ibm/service/kms/resource_ibm_kms_key_rings_test.go b/ibm/service/kms/resource_ibm_kms_key_rings_test.go index 47dc23027d..691948b28d 100644 --- a/ibm/service/kms/resource_ibm_kms_key_rings_test.go +++ b/ibm/service/kms/resource_ibm_kms_key_rings_test.go @@ -7,8 +7,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMKMSResource_Key_Ring_Name(t *testing.T) { diff --git a/ibm/service/kms/resource_ibm_kms_key_test.go b/ibm/service/kms/resource_ibm_kms_key_test.go index 24fd0ee9e9..cf8820e4b6 100644 --- a/ibm/service/kms/resource_ibm_kms_key_test.go +++ b/ibm/service/kms/resource_ibm_kms_key_test.go @@ -12,8 +12,8 @@ import ( "time" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMKMSResource_basic(t *testing.T) { diff --git a/ibm/service/kms/resource_ibm_kms_key_with_policy_overrides_test.go b/ibm/service/kms/resource_ibm_kms_key_with_policy_overrides_test.go index d20ab096c9..0f9c1910d8 100644 --- a/ibm/service/kms/resource_ibm_kms_key_with_policy_overrides_test.go +++ b/ibm/service/kms/resource_ibm_kms_key_with_policy_overrides_test.go @@ -13,8 +13,8 @@ import ( "time" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMKMSKeyWithPolicyOverridesResource_basic(t *testing.T) { diff --git a/ibm/service/kms/resource_ibm_kms_kmip_adapter_test.go b/ibm/service/kms/resource_ibm_kms_kmip_adapter_test.go index 92960e8ede..7ac97069de 100644 --- a/ibm/service/kms/resource_ibm_kms_kmip_adapter_test.go +++ b/ibm/service/kms/resource_ibm_kms_kmip_adapter_test.go @@ -10,8 +10,8 @@ import ( "time" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMKMSKMIPAdapterResource_basic(t *testing.T) { diff --git a/ibm/service/kms/resource_ibm_kms_kmip_client_cert_test.go b/ibm/service/kms/resource_ibm_kms_kmip_client_cert_test.go index 3aba90a537..5aa15d3f0d 100644 --- a/ibm/service/kms/resource_ibm_kms_kmip_client_cert_test.go +++ b/ibm/service/kms/resource_ibm_kms_kmip_client_cert_test.go @@ -19,8 +19,8 @@ import ( "time" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMKMSKMIPClientCertResource_basic(t *testing.T) { diff --git a/ibm/service/kms/resource_ibm_kp_key_test.go b/ibm/service/kms/resource_ibm_kp_key_test.go index 673c5d68cc..5eb3e4961a 100644 --- a/ibm/service/kms/resource_ibm_kp_key_test.go +++ b/ibm/service/kms/resource_ibm_kp_key_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMKpResource_basic(t *testing.T) { diff --git a/ibm/service/kubernetes/data_source_ibm_container_addons_test.go b/ibm/service/kubernetes/data_source_ibm_container_addons_test.go index 4efa2e1974..a364ad51a4 100644 --- a/ibm/service/kubernetes/data_source_ibm_container_addons_test.go +++ b/ibm/service/kubernetes/data_source_ibm_container_addons_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMContainerAddOnsDataSource_basic(t *testing.T) { diff --git a/ibm/service/kubernetes/data_source_ibm_container_cluster_config.go b/ibm/service/kubernetes/data_source_ibm_container_cluster_config.go index b8f1700804..9086306634 100644 --- a/ibm/service/kubernetes/data_source_ibm_container_cluster_config.go +++ b/ibm/service/kubernetes/data_source_ibm_container_cluster_config.go @@ -11,7 +11,7 @@ import ( "strings" "time" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" homedir "github.com/mitchellh/go-homedir" @@ -189,19 +189,19 @@ func dataSourceIBMContainerClusterConfigRead(d *schema.ResourceData, meta interf // For the Network config we need to gather the certs so we must override the admin value var calicoConfigFilePath string var clusterKeyDetails v1.ClusterKeyInfo - err = resource.Retry(5*time.Minute, func() *resource.RetryError { + err = retry.Retry(5*time.Minute, func() *retry.RetryError { var err error calicoConfigFilePath, clusterKeyDetails, err = csAPI.StoreConfigDetail(name, configDir, admin || true, network, targetEnv, endpointType) if err != nil { log.Printf("[DEBUG] Failed to fetch cluster config err %s", err) if strings.Contains(err.Error(), "Could not login to openshift account runtime error:") { - return resource.RetryableError(err) + return retry.RetryableError(err) } if intermittentUserLookupFailure, _ := regexp.MatchString("Error: lookup of user for \"(.+)\" failed", err.Error()); intermittentUserLookupFailure { // Intermittent error resulting from synchronisation delay - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) @@ -221,19 +221,19 @@ func dataSourceIBMContainerClusterConfigRead(d *schema.ResourceData, meta interf } else { var clusterKeyDetails v1.ClusterKeyInfo - err = resource.Retry(5*time.Minute, func() *resource.RetryError { + err = retry.Retry(5*time.Minute, func() *retry.RetryError { var err error clusterKeyDetails, err = csAPI.GetClusterConfigDetail(name, configDir, admin, targetEnv, endpointType) if err != nil { log.Printf("[DEBUG] Failed to fetch cluster config err %s", err) if strings.Contains(err.Error(), "Could not login to openshift account runtime error:") { - return resource.RetryableError(err) + return retry.RetryableError(err) } if intermittentUserLookupFailure, _ := regexp.MatchString("Error: lookup of user for \"(.+)\" failed", err.Error()); intermittentUserLookupFailure { // Intermittent error resulting from synchronisation delay - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/kubernetes/data_source_ibm_container_cluster_config_test.go b/ibm/service/kubernetes/data_source_ibm_container_cluster_config_test.go index e4010eca2b..1e75d4c115 100644 --- a/ibm/service/kubernetes/data_source_ibm_container_cluster_config_test.go +++ b/ibm/service/kubernetes/data_source_ibm_container_cluster_config_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/mitchellh/go-homedir" ) diff --git a/ibm/service/kubernetes/data_source_ibm_container_cluster_test.go b/ibm/service/kubernetes/data_source_ibm_container_cluster_test.go index 8a015ed639..c20faa55a3 100644 --- a/ibm/service/kubernetes/data_source_ibm_container_cluster_test.go +++ b/ibm/service/kubernetes/data_source_ibm_container_cluster_test.go @@ -10,9 +10,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMContainerClusterDataSource_basic(t *testing.T) { diff --git a/ibm/service/kubernetes/data_source_ibm_container_cluster_versions_test.go b/ibm/service/kubernetes/data_source_ibm_container_cluster_versions_test.go index 820e2033dc..946ec263fe 100644 --- a/ibm/service/kubernetes/data_source_ibm_container_cluster_versions_test.go +++ b/ibm/service/kubernetes/data_source_ibm_container_cluster_versions_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMContainerClusterVersionsDataSource_basic(t *testing.T) { diff --git a/ibm/service/kubernetes/data_source_ibm_container_cluster_worker_test.go b/ibm/service/kubernetes/data_source_ibm_container_cluster_worker_test.go index 5eab0a08dd..c0a036d5ea 100644 --- a/ibm/service/kubernetes/data_source_ibm_container_cluster_worker_test.go +++ b/ibm/service/kubernetes/data_source_ibm_container_cluster_worker_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMContainerWorkerDataSource_basic(t *testing.T) { diff --git a/ibm/service/kubernetes/data_source_ibm_container_dedicated_host_flavor_test.go b/ibm/service/kubernetes/data_source_ibm_container_dedicated_host_flavor_test.go index 7c2c4a2743..cc93008838 100644 --- a/ibm/service/kubernetes/data_source_ibm_container_dedicated_host_flavor_test.go +++ b/ibm/service/kubernetes/data_source_ibm_container_dedicated_host_flavor_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMContainerDedicatedHostFlavorDataSource_basic(t *testing.T) { diff --git a/ibm/service/kubernetes/data_source_ibm_container_dedicated_host_flavors_test.go b/ibm/service/kubernetes/data_source_ibm_container_dedicated_host_flavors_test.go index 51cb1fa79d..1d54fe1e86 100644 --- a/ibm/service/kubernetes/data_source_ibm_container_dedicated_host_flavors_test.go +++ b/ibm/service/kubernetes/data_source_ibm_container_dedicated_host_flavors_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMContainerDedicatedHostFlavorsDataSource_basic(t *testing.T) { diff --git a/ibm/service/kubernetes/data_source_ibm_container_dedicated_host_pool_test.go b/ibm/service/kubernetes/data_source_ibm_container_dedicated_host_pool_test.go index 306b3370c8..a75fa63180 100644 --- a/ibm/service/kubernetes/data_source_ibm_container_dedicated_host_pool_test.go +++ b/ibm/service/kubernetes/data_source_ibm_container_dedicated_host_pool_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMContainerDedicatedHostPoolDataSource_basic(t *testing.T) { diff --git a/ibm/service/kubernetes/data_source_ibm_container_dedicated_host_test.go b/ibm/service/kubernetes/data_source_ibm_container_dedicated_host_test.go index 5740c83c26..6225d86f8b 100644 --- a/ibm/service/kubernetes/data_source_ibm_container_dedicated_host_test.go +++ b/ibm/service/kubernetes/data_source_ibm_container_dedicated_host_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMContainerDedicatedHostDataSource_basic(t *testing.T) { diff --git a/ibm/service/kubernetes/data_source_ibm_container_ingress_instance_test.go b/ibm/service/kubernetes/data_source_ibm_container_ingress_instance_test.go index 168f38161e..36335d987f 100644 --- a/ibm/service/kubernetes/data_source_ibm_container_ingress_instance_test.go +++ b/ibm/service/kubernetes/data_source_ibm_container_ingress_instance_test.go @@ -5,7 +5,7 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMContainerIngressInstanceDatasourceBasic(t *testing.T) { diff --git a/ibm/service/kubernetes/data_source_ibm_container_ingress_secret_opaque_test.go b/ibm/service/kubernetes/data_source_ibm_container_ingress_secret_opaque_test.go index a15087a380..7b15deb31f 100644 --- a/ibm/service/kubernetes/data_source_ibm_container_ingress_secret_opaque_test.go +++ b/ibm/service/kubernetes/data_source_ibm_container_ingress_secret_opaque_test.go @@ -5,8 +5,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMContainerIngressSecretOpaqueDatasourceBasic(t *testing.T) { diff --git a/ibm/service/kubernetes/data_source_ibm_container_ingress_secret_tls_test.go b/ibm/service/kubernetes/data_source_ibm_container_ingress_secret_tls_test.go index dfedeb54f3..8ecb1f4edd 100644 --- a/ibm/service/kubernetes/data_source_ibm_container_ingress_secret_tls_test.go +++ b/ibm/service/kubernetes/data_source_ibm_container_ingress_secret_tls_test.go @@ -5,8 +5,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMContainerIngressSecretTLSDatasourceBasic(t *testing.T) { diff --git a/ibm/service/kubernetes/data_source_ibm_container_nlb_dns_test.go b/ibm/service/kubernetes/data_source_ibm_container_nlb_dns_test.go index 2a34b1bec4..700cc180fb 100644 --- a/ibm/service/kubernetes/data_source_ibm_container_nlb_dns_test.go +++ b/ibm/service/kubernetes/data_source_ibm_container_nlb_dns_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMContainerNLBDNSDatasourceBasic(t *testing.T) { diff --git a/ibm/service/kubernetes/data_source_ibm_container_storage_attachment_test.go b/ibm/service/kubernetes/data_source_ibm_container_storage_attachment_test.go index 624fc042f4..c1a2136e9c 100644 --- a/ibm/service/kubernetes/data_source_ibm_container_storage_attachment_test.go +++ b/ibm/service/kubernetes/data_source_ibm_container_storage_attachment_test.go @@ -6,8 +6,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMContainerVpcClusterWorkerVolumeAttachmentDatasource(t *testing.T) { diff --git a/ibm/service/kubernetes/data_source_ibm_container_vpc_alb_test.go b/ibm/service/kubernetes/data_source_ibm_container_vpc_alb_test.go index 8d64b12706..848793d4f0 100644 --- a/ibm/service/kubernetes/data_source_ibm_container_vpc_alb_test.go +++ b/ibm/service/kubernetes/data_source_ibm_container_vpc_alb_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMContainerVPCClusterALBDataSource_basic(t *testing.T) { diff --git a/ibm/service/kubernetes/data_source_ibm_container_vpc_cluster_test.go b/ibm/service/kubernetes/data_source_ibm_container_vpc_cluster_test.go index e95e67eca5..36f8d26821 100644 --- a/ibm/service/kubernetes/data_source_ibm_container_vpc_cluster_test.go +++ b/ibm/service/kubernetes/data_source_ibm_container_vpc_cluster_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMContainerVPCClusterDataSource_basic(t *testing.T) { diff --git a/ibm/service/kubernetes/data_source_ibm_container_vpc_cluster_worker_test.go b/ibm/service/kubernetes/data_source_ibm_container_vpc_cluster_worker_test.go index 4c1d9775ff..ed087ef396 100644 --- a/ibm/service/kubernetes/data_source_ibm_container_vpc_cluster_worker_test.go +++ b/ibm/service/kubernetes/data_source_ibm_container_vpc_cluster_worker_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMContainerVPCClusterWorkerDataSource_basic(t *testing.T) { diff --git a/ibm/service/kubernetes/data_source_ibm_container_vpc_worker_pool_test.go b/ibm/service/kubernetes/data_source_ibm_container_vpc_worker_pool_test.go index a8c4ee727a..0afd25902a 100644 --- a/ibm/service/kubernetes/data_source_ibm_container_vpc_worker_pool_test.go +++ b/ibm/service/kubernetes/data_source_ibm_container_vpc_worker_pool_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func testAccIBMContainerVPCClusterWorkerPoolDataSourceBase(cluster_name string) string { diff --git a/ibm/service/kubernetes/data_source_ibm_container_worker_pool_test.go b/ibm/service/kubernetes/data_source_ibm_container_worker_pool_test.go index d57d028aea..ee071e9cdf 100644 --- a/ibm/service/kubernetes/data_source_ibm_container_worker_pool_test.go +++ b/ibm/service/kubernetes/data_source_ibm_container_worker_pool_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMContainerWorkerPoolDataSource_basic(t *testing.T) { diff --git a/ibm/service/kubernetes/resource_ibm_container_addons.go b/ibm/service/kubernetes/resource_ibm_container_addons.go index 7036f201a0..9ba2dbd0ab 100644 --- a/ibm/service/kubernetes/resource_ibm_container_addons.go +++ b/ibm/service/kubernetes/resource_ibm_container_addons.go @@ -11,7 +11,7 @@ import ( "strings" "time" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" yaml "gopkg.in/yaml.v3" @@ -722,7 +722,7 @@ func waitForContainerAddOns(d *schema.ResourceData, meta interface{}, cluster, t return false, err } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pending", "updating", ""}, Target: []string{"normal", "warning", "critical", "available"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/kubernetes/resource_ibm_container_addons_test.go b/ibm/service/kubernetes/resource_ibm_container_addons_test.go index 22ba250360..7c81f93303 100644 --- a/ibm/service/kubernetes/resource_ibm_container_addons_test.go +++ b/ibm/service/kubernetes/resource_ibm_container_addons_test.go @@ -11,9 +11,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" v1 "github.com/IBM-Cloud/bluemix-go/api/container/containerv1" ) diff --git a/ibm/service/kubernetes/resource_ibm_container_alb.go b/ibm/service/kubernetes/resource_ibm_container_alb.go index 58e7978d71..d7e6b89716 100644 --- a/ibm/service/kubernetes/resource_ibm_container_alb.go +++ b/ibm/service/kubernetes/resource_ibm_container_alb.go @@ -8,7 +8,7 @@ import ( "log" "time" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" v1 "github.com/IBM-Cloud/bluemix-go/api/container/containerv1" @@ -223,7 +223,7 @@ func waitForContainerALB(d *schema.ResourceData, meta interface{}, albID, timeou return false, err } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pending"}, Target: []string{"active"}, Refresh: func() (interface{}, string, error) { @@ -284,7 +284,7 @@ func waitForClusterAvailable(d *schema.ResourceData, meta interface{}, albID str log.Printf("Waiting for worker of the cluster (%s) wokers to be available.", ClusterID) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", workerProvisioning}, Target: []string{workerNormal}, Refresh: workerStateRefreshFunc(csClient.Workers(), ClusterID, target), diff --git a/ibm/service/kubernetes/resource_ibm_container_alb_cert.go b/ibm/service/kubernetes/resource_ibm_container_alb_cert.go index e96683ed73..f05d35c69b 100644 --- a/ibm/service/kubernetes/resource_ibm_container_alb_cert.go +++ b/ibm/service/kubernetes/resource_ibm_container_alb_cert.go @@ -8,7 +8,7 @@ import ( "strings" "time" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" v2 "github.com/IBM-Cloud/bluemix-go/api/container/containerv2" @@ -241,7 +241,7 @@ func waitForALBCertDelete(d *schema.ResourceData, meta interface{}, timeout stri namespace = parts[2] } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"deleting"}, Target: []string{"deleted"}, Refresh: func() (interface{}, string, error) { @@ -354,7 +354,7 @@ func waitForContainerALBCert(d *schema.ResourceData, meta interface{}, timeout s namespace = parts[2] } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"creating"}, Target: []string{"done"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/kubernetes/resource_ibm_container_alb_cert_test.go b/ibm/service/kubernetes/resource_ibm_container_alb_cert_test.go index 3779f9ab6e..ffd4229100 100644 --- a/ibm/service/kubernetes/resource_ibm_container_alb_cert_test.go +++ b/ibm/service/kubernetes/resource_ibm_container_alb_cert_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMContainerALBCert_Basic(t *testing.T) { diff --git a/ibm/service/kubernetes/resource_ibm_container_alb_create_test.go b/ibm/service/kubernetes/resource_ibm_container_alb_create_test.go index 4b12db9965..83dcb7d6f9 100644 --- a/ibm/service/kubernetes/resource_ibm_container_alb_create_test.go +++ b/ibm/service/kubernetes/resource_ibm_container_alb_create_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" v1 "github.com/IBM-Cloud/bluemix-go/api/container/containerv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMContainerALB_Create(t *testing.T) { diff --git a/ibm/service/kubernetes/resource_ibm_container_alb_test.go b/ibm/service/kubernetes/resource_ibm_container_alb_test.go index 98ee4232d3..dea5396f4e 100644 --- a/ibm/service/kubernetes/resource_ibm_container_alb_test.go +++ b/ibm/service/kubernetes/resource_ibm_container_alb_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" v1 "github.com/IBM-Cloud/bluemix-go/api/container/containerv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMContainerALB_Basic(t *testing.T) { diff --git a/ibm/service/kubernetes/resource_ibm_container_bind_service_test.go b/ibm/service/kubernetes/resource_ibm_container_bind_service_test.go index f17e83a7ed..f7ef8d7666 100644 --- a/ibm/service/kubernetes/resource_ibm_container_bind_service_test.go +++ b/ibm/service/kubernetes/resource_ibm_container_bind_service_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMContainerBindServiceBasic(t *testing.T) { diff --git a/ibm/service/kubernetes/resource_ibm_container_cluster.go b/ibm/service/kubernetes/resource_ibm_container_cluster.go index b8320c6381..d1d949986b 100644 --- a/ibm/service/kubernetes/resource_ibm_container_cluster.go +++ b/ibm/service/kubernetes/resource_ibm_container_cluster.go @@ -17,7 +17,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) @@ -1271,7 +1271,7 @@ func waitForClusterDelete(d *schema.ResourceData, meta interface{}) (interface{} return nil, err } clusterID := d.Id() - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{clusterDeletePending}, Target: []string{clusterDeleted}, Refresh: func() (interface{}, string, error) { @@ -1305,7 +1305,7 @@ func waitForClusterMasterAvailable(d *schema.ResourceData, meta interface{}, tim } clusterID := d.Id() - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{deployRequested, deployInProgress}, Target: []string{ready}, Refresh: func() (interface{}, string, error) { @@ -1338,7 +1338,7 @@ func waitForClusterState(d *schema.ResourceData, meta interface{}, waitForState } clusterID := d.Id() - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: pendingState, Target: []string{waitForState}, Refresh: func() (interface{}, string, error) { @@ -1376,7 +1376,7 @@ func waitForClusterOneWorkerAvailable(d *schema.ResourceData, meta interface{}, } clusterID := d.Id() - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", "deploying", "provisioning"}, Target: []string{normal}, Refresh: func() (interface{}, string, error) { @@ -1432,7 +1432,7 @@ func WaitForWorkerAvailable(d *schema.ResourceData, meta interface{}, target v1. log.Printf("Waiting for worker of the cluster (%s) to be available.", d.Id()) id := d.Id() - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", workerProvisioning}, Target: []string{workerNormal}, Refresh: workerStateRefreshFunc(csClient.Workers(), id, target), @@ -1444,7 +1444,7 @@ func WaitForWorkerAvailable(d *schema.ResourceData, meta interface{}, target v1. return stateConf.WaitForState() } -func workerStateRefreshFunc(client v1.Workers, instanceID string, target v1.ClusterTargetHeader) resource.StateRefreshFunc { +func workerStateRefreshFunc(client v1.Workers, instanceID string, target v1.ClusterTargetHeader) retry.StateRefreshFunc { return func() (interface{}, string, error) { workerFields, err := client.List(instanceID, target) if err != nil { @@ -1471,7 +1471,7 @@ func WaitForSubnetAvailable(d *schema.ResourceData, meta interface{}, target v1. log.Printf("Waiting for Ingress Subdomain and secret being assigned.") id := d.Id() - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", workerProvisioning}, Target: []string{workerNormal}, Refresh: subnetStateRefreshFunc(csClient.Clusters(), id, d, target), @@ -1483,7 +1483,7 @@ func WaitForSubnetAvailable(d *schema.ResourceData, meta interface{}, target v1. return stateConf.WaitForState() } -func subnetStateRefreshFunc(client v1.Clusters, instanceID string, d *schema.ResourceData, target v1.ClusterTargetHeader) resource.StateRefreshFunc { +func subnetStateRefreshFunc(client v1.Clusters, instanceID string, d *schema.ResourceData, target v1.ClusterTargetHeader) retry.StateRefreshFunc { return func() (interface{}, string, error) { cluster, err := client.FindWithOutShowResourcesCompatible(instanceID, target) if err != nil { @@ -1505,7 +1505,7 @@ func WaitForClusterVersionUpdate(d *schema.ResourceData, meta interface{}, targe log.Printf("Waiting for cluster (%s) version to be updated.", d.Id()) id := d.Id() - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", versionUpdating}, Target: []string{clusterNormal}, Refresh: clusterVersionRefreshFunc(csClient.Clusters(), id, d, target), @@ -1518,7 +1518,7 @@ func WaitForClusterVersionUpdate(d *schema.ResourceData, meta interface{}, targe return stateConf.WaitForState() } -func clusterVersionRefreshFunc(client v1.Clusters, instanceID string, d *schema.ResourceData, target v1.ClusterTargetHeader) resource.StateRefreshFunc { +func clusterVersionRefreshFunc(client v1.Clusters, instanceID string, d *schema.ResourceData, target v1.ClusterTargetHeader) retry.StateRefreshFunc { return func() (interface{}, string, error) { clusterFields, err := client.FindWithOutShowResourcesCompatible(instanceID, target) if err != nil { diff --git a/ibm/service/kubernetes/resource_ibm_container_cluster_feature.go b/ibm/service/kubernetes/resource_ibm_container_cluster_feature.go index 72c718705e..5a9116cc28 100644 --- a/ibm/service/kubernetes/resource_ibm_container_cluster_feature.go +++ b/ibm/service/kubernetes/resource_ibm_container_cluster_feature.go @@ -9,7 +9,7 @@ import ( "strings" "time" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" v1 "github.com/IBM-Cloud/bluemix-go/api/container/containerv1" @@ -336,7 +336,7 @@ func WaitForClusterAvailableForFeatureUpdate(cluster string, timeout time.Durati log.Printf("Waiting for cluster (%s) to be available.", cluster) id := cluster - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", clusterProvisioning}, Target: []string{clusterNormal}, Refresh: clusterStateRefreshFunc(csClient.Clusters(), id, target), @@ -348,7 +348,7 @@ func WaitForClusterAvailableForFeatureUpdate(cluster string, timeout time.Durati return stateConf.WaitForState() } -func clusterStateRefreshFunc(client v1.Clusters, instanceID string, target v1.ClusterTargetHeader) resource.StateRefreshFunc { +func clusterStateRefreshFunc(client v1.Clusters, instanceID string, target v1.ClusterTargetHeader) retry.StateRefreshFunc { return func() (interface{}, string, error) { clusterFields, err := client.FindWithOutShowResourcesCompatible(instanceID, target) if err != nil { @@ -373,7 +373,7 @@ func WaitForWorkerAvailableForFeatureUpdate(cluster string, timeout time.Duratio log.Printf("Waiting for worker of the cluster (%s) to be available.", cluster) id := cluster - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", workerProvisioning}, Target: []string{workerNormal}, Refresh: workerStateRefreshFunc(csClient.Workers(), id, target), diff --git a/ibm/service/kubernetes/resource_ibm_container_cluster_feature_test.go b/ibm/service/kubernetes/resource_ibm_container_cluster_feature_test.go index 741e590c27..da4aaeafae 100644 --- a/ibm/service/kubernetes/resource_ibm_container_cluster_feature_test.go +++ b/ibm/service/kubernetes/resource_ibm_container_cluster_feature_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMContainerClusterFeature_Basic(t *testing.T) { diff --git a/ibm/service/kubernetes/resource_ibm_container_cluster_test.go b/ibm/service/kubernetes/resource_ibm_container_cluster_test.go index 017de8e89b..243153b256 100644 --- a/ibm/service/kubernetes/resource_ibm_container_cluster_test.go +++ b/ibm/service/kubernetes/resource_ibm_container_cluster_test.go @@ -12,9 +12,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM-Cloud/bluemix-go/api/container/containerv1" ) diff --git a/ibm/service/kubernetes/resource_ibm_container_dedicated_host.go b/ibm/service/kubernetes/resource_ibm_container_dedicated_host.go index 4aa7ea5c66..f611fc7a07 100644 --- a/ibm/service/kubernetes/resource_ibm_container_dedicated_host.go +++ b/ibm/service/kubernetes/resource_ibm_container_dedicated_host.go @@ -12,7 +12,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" v2 "github.com/IBM-Cloud/bluemix-go/api/container/containerv2" @@ -392,7 +392,7 @@ func waitForDedicatedHostAvailable(ctx context.Context, dedicatedHostAPI v2.Dedi log.Printf("[DEBUG] Waiting for the dedicated host (%s) for hostpool (%s) to be available.", hostID, hostPoolID) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{DedicatedHostStateCreatePending, DedicatedHostStateCreating}, Target: []string{DedicatedHostStateCreated}, Refresh: dedicatedHostStateRefreshFunc(dedicatedHostAPI, hostID, hostPoolID, target), @@ -408,7 +408,7 @@ func waitForDedicatedHostRemove(ctx context.Context, dedicatedHostAPI v2.Dedicat log.Printf("[DEBUG] Waiting for the dedicated host (%s) for hostpool (%s) to be removed.", hostID, hostPoolID) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{DedicatedHostStateCreated, DedicatedHostStateDeleting}, Target: []string{DedicatedHostStateDeleted}, Refresh: dedicatedHostStateRefreshFunc(dedicatedHostAPI, hostID, hostPoolID, target), @@ -420,7 +420,7 @@ func waitForDedicatedHostRemove(ctx context.Context, dedicatedHostAPI v2.Dedicat return stateConf.WaitForStateContext(ctx) } -func dedicatedHostStateRefreshFunc(dedicatedHostAPI v2.DedicatedHost, hostID, hostPoolID string, target v2.ClusterTargetHeader) resource.StateRefreshFunc { +func dedicatedHostStateRefreshFunc(dedicatedHostAPI v2.DedicatedHost, hostID, hostPoolID string, target v2.ClusterTargetHeader) retry.StateRefreshFunc { return func() (interface{}, string, error) { dedicatedHost, err := dedicatedHostAPI.GetDedicatedHost(hostID, hostPoolID, target) if err != nil { @@ -438,7 +438,7 @@ func waitForDedicatedHostPlacement(ctx context.Context, dedicatedHostAPI v2.Dedi pendingStr := strconv.FormatBool(!placement) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{pendingStr}, Target: []string{placementStr}, Refresh: dedicatedHostPlacementRefreshFunc(dedicatedHostAPI, hostID, hostPoolID, target), @@ -450,7 +450,7 @@ func waitForDedicatedHostPlacement(ctx context.Context, dedicatedHostAPI v2.Dedi return stateConf.WaitForStateContext(ctx) } -func dedicatedHostPlacementRefreshFunc(dedicatedHostAPI v2.DedicatedHost, hostID, hostPoolID string, target v2.ClusterTargetHeader) resource.StateRefreshFunc { +func dedicatedHostPlacementRefreshFunc(dedicatedHostAPI v2.DedicatedHost, hostID, hostPoolID string, target v2.ClusterTargetHeader) retry.StateRefreshFunc { return func() (interface{}, string, error) { dedicatedHost, err := dedicatedHostAPI.GetDedicatedHost(hostID, hostPoolID, target) if err != nil { diff --git a/ibm/service/kubernetes/resource_ibm_container_dedicated_host_pool.go b/ibm/service/kubernetes/resource_ibm_container_dedicated_host_pool.go index ef2b78d2a4..9189b130e3 100644 --- a/ibm/service/kubernetes/resource_ibm_container_dedicated_host_pool.go +++ b/ibm/service/kubernetes/resource_ibm_container_dedicated_host_pool.go @@ -10,7 +10,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" v2 "github.com/IBM-Cloud/bluemix-go/api/container/containerv2" @@ -261,7 +261,7 @@ func waitForDedicatedHostPoolAvailable(ctx context.Context, dedicatedHostPoolAPI log.Printf("[DEBUG] Waiting for the dedicated hostpool (%s) to be available.", hostPoolID) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{DedicatedHostPoolStateCreating}, Target: []string{DedicatedHostPoolStateCreated}, Refresh: dedicatedHostPoolStateRefreshFunc(dedicatedHostPoolAPI, hostPoolID, target), @@ -277,7 +277,7 @@ func waitForDedicatedHostPoolRemove(ctx context.Context, dedicatedHostPoolAPI v2 log.Printf("[DEBUG] Waiting for the dedicated hostpool (%s) to be removed.", hostPoolID) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{DedicatedHostPoolStateCreated, DedicatedHostPoolStateDeleting}, Target: []string{DedicatedHostPoolStateDeleted}, Refresh: dedicatedHostPoolStateRefreshFunc(dedicatedHostPoolAPI, hostPoolID, target), @@ -289,7 +289,7 @@ func waitForDedicatedHostPoolRemove(ctx context.Context, dedicatedHostPoolAPI v2 return stateConf.WaitForStateContext(ctx) } -func dedicatedHostPoolStateRefreshFunc(dedicatedHostPoolAPI v2.DedicatedHostPool, hostPoolID string, target v2.ClusterTargetHeader) resource.StateRefreshFunc { +func dedicatedHostPoolStateRefreshFunc(dedicatedHostPoolAPI v2.DedicatedHostPool, hostPoolID string, target v2.ClusterTargetHeader) retry.StateRefreshFunc { return func() (interface{}, string, error) { dedicatedHostPool, err := dedicatedHostPoolAPI.GetDedicatedHostPool(hostPoolID, target) if err != nil { diff --git a/ibm/service/kubernetes/resource_ibm_container_dedicated_host_pool_test.go b/ibm/service/kubernetes/resource_ibm_container_dedicated_host_pool_test.go index db1859ef13..53a245a4d3 100644 --- a/ibm/service/kubernetes/resource_ibm_container_dedicated_host_pool_test.go +++ b/ibm/service/kubernetes/resource_ibm_container_dedicated_host_pool_test.go @@ -13,9 +13,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" v2 "github.com/IBM-Cloud/bluemix-go/api/container/containerv2" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMContainerDedicatedHostPoolBasic(t *testing.T) { diff --git a/ibm/service/kubernetes/resource_ibm_container_dedicated_host_test.go b/ibm/service/kubernetes/resource_ibm_container_dedicated_host_test.go index 3beffc63cf..497cc64fb7 100644 --- a/ibm/service/kubernetes/resource_ibm_container_dedicated_host_test.go +++ b/ibm/service/kubernetes/resource_ibm_container_dedicated_host_test.go @@ -13,9 +13,9 @@ import ( v2 "github.com/IBM-Cloud/bluemix-go/api/container/containerv2" "github.com/IBM-Cloud/bluemix-go/bmxerror" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMContainerDedicatedHostBasic(t *testing.T) { diff --git a/ibm/service/kubernetes/resource_ibm_container_ingress_instance_test.go b/ibm/service/kubernetes/resource_ibm_container_ingress_instance_test.go index 40c4696aab..d416b3d021 100644 --- a/ibm/service/kubernetes/resource_ibm_container_ingress_instance_test.go +++ b/ibm/service/kubernetes/resource_ibm_container_ingress_instance_test.go @@ -11,8 +11,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMContainerIngressInstance_Basic(t *testing.T) { diff --git a/ibm/service/kubernetes/resource_ibm_container_ingress_secret_opaque_test.go b/ibm/service/kubernetes/resource_ibm_container_ingress_secret_opaque_test.go index 6e214768b2..855529aa5e 100644 --- a/ibm/service/kubernetes/resource_ibm_container_ingress_secret_opaque_test.go +++ b/ibm/service/kubernetes/resource_ibm_container_ingress_secret_opaque_test.go @@ -12,9 +12,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMContainerIngressSecretOpaque_Basic(t *testing.T) { diff --git a/ibm/service/kubernetes/resource_ibm_container_ingress_secret_tls_test.go b/ibm/service/kubernetes/resource_ibm_container_ingress_secret_tls_test.go index d2edc360de..710498e6c9 100644 --- a/ibm/service/kubernetes/resource_ibm_container_ingress_secret_tls_test.go +++ b/ibm/service/kubernetes/resource_ibm_container_ingress_secret_tls_test.go @@ -12,9 +12,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMContainerIngressSecretTLS_Basic(t *testing.T) { diff --git a/ibm/service/kubernetes/resource_ibm_container_nlb_dns_test.go b/ibm/service/kubernetes/resource_ibm_container_nlb_dns_test.go index 92dd3a53b1..034f90cea5 100644 --- a/ibm/service/kubernetes/resource_ibm_container_nlb_dns_test.go +++ b/ibm/service/kubernetes/resource_ibm_container_nlb_dns_test.go @@ -12,8 +12,8 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM-Cloud/container-services-go-sdk/kubernetesserviceapiv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIbmContainerNlbDnsBasic(t *testing.T) { diff --git a/ibm/service/kubernetes/resource_ibm_container_storage_attachment.go b/ibm/service/kubernetes/resource_ibm_container_storage_attachment.go index de157a4748..2edf554185 100644 --- a/ibm/service/kubernetes/resource_ibm_container_storage_attachment.go +++ b/ibm/service/kubernetes/resource_ibm_container_storage_attachment.go @@ -12,7 +12,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -280,7 +280,7 @@ func waitforVolumetoAttach(d *schema.ResourceData, meta interface{}) (interface{ workerID := parts[1] volumeAttachmentID := parts[2] - createStateConf := &resource.StateChangeConf{ + createStateConf := &retry.StateChangeConf{ Pending: []string{volumeAttaching}, Target: []string{volumeAttached}, Refresh: func() (interface{}, string, error) { @@ -325,7 +325,7 @@ func waitForStorageAttachmentDelete(d *schema.ResourceData, meta interface{}) (i workerID := parts[1] volumeAttachmentID := parts[2] - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"inprogress"}, Target: []string{"removed"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/kubernetes/resource_ibm_container_storage_attachment_test.go b/ibm/service/kubernetes/resource_ibm_container_storage_attachment_test.go index e9a756020c..cce49f8f3c 100644 --- a/ibm/service/kubernetes/resource_ibm_container_storage_attachment_test.go +++ b/ibm/service/kubernetes/resource_ibm_container_storage_attachment_test.go @@ -9,9 +9,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMContainerVpcClusterWorkerVolumeAttachment_Basic(t *testing.T) { diff --git a/ibm/service/kubernetes/resource_ibm_container_vpc_alb.go b/ibm/service/kubernetes/resource_ibm_container_vpc_alb.go index 4fad643223..b99989cf93 100644 --- a/ibm/service/kubernetes/resource_ibm_container_vpc_alb.go +++ b/ibm/service/kubernetes/resource_ibm_container_vpc_alb.go @@ -13,7 +13,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -233,7 +233,7 @@ func waitForVpcContainerALB(d *schema.ResourceData, meta interface{}, albID, tim if err != nil { return false, err } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pending"}, Target: []string{"active"}, Refresh: func() (interface{}, string, error) { @@ -275,7 +275,7 @@ func waitForVpcClusterAvailable(d *schema.ResourceData, meta interface{}, albID, if err != nil { return false, err } - createStateConf := &resource.StateChangeConf{ + createStateConf := &retry.StateChangeConf{ Pending: []string{deployRequested, deployInProgress}, Target: []string{ready}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/kubernetes/resource_ibm_container_vpc_alb_create_test.go b/ibm/service/kubernetes/resource_ibm_container_vpc_alb_create_test.go index 9495f511ca..34f886f53b 100644 --- a/ibm/service/kubernetes/resource_ibm_container_vpc_alb_create_test.go +++ b/ibm/service/kubernetes/resource_ibm_container_vpc_alb_create_test.go @@ -12,9 +12,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" v2 "github.com/IBM-Cloud/bluemix-go/api/container/containerv2" ) diff --git a/ibm/service/kubernetes/resource_ibm_container_vpc_alb_test.go b/ibm/service/kubernetes/resource_ibm_container_vpc_alb_test.go index 1c0388fadc..85ca160a1d 100644 --- a/ibm/service/kubernetes/resource_ibm_container_vpc_alb_test.go +++ b/ibm/service/kubernetes/resource_ibm_container_vpc_alb_test.go @@ -11,9 +11,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" v2 "github.com/IBM-Cloud/bluemix-go/api/container/containerv2" ) diff --git a/ibm/service/kubernetes/resource_ibm_container_vpc_cluster.go b/ibm/service/kubernetes/resource_ibm_container_vpc_cluster.go index f18e9a955b..69fd94e7a4 100644 --- a/ibm/service/kubernetes/resource_ibm_container_vpc_cluster.go +++ b/ibm/service/kubernetes/resource_ibm_container_vpc_cluster.go @@ -13,7 +13,7 @@ import ( "github.com/IBM/vpc-go-sdk/vpcv1" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" @@ -1100,7 +1100,7 @@ func vpcClient(meta interface{}) (*vpcv1.VpcV1, error) { func isWaitForLBDeleted(lbc *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for (%s) to be deleted.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", "deleting"}, Target: []string{"done", "failed"}, Refresh: isLBDeleteRefreshFunc(lbc, id), @@ -1112,7 +1112,7 @@ func isWaitForLBDeleted(lbc *vpcv1.VpcV1, id string, timeout time.Duration) (int return stateConf.WaitForState() } -func isLBDeleteRefreshFunc(lbc *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isLBDeleteRefreshFunc(lbc *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { log.Printf("[DEBUG] is lb delete function here") getLoadBalancerOptions := &vpcv1.GetLoadBalancerOptions{ @@ -1172,7 +1172,7 @@ func waitForVpcClusterDelete(d *schema.ResourceData, meta interface{}) (interfac return nil, err } clusterID := d.Id() - deleteStateConf := &resource.StateChangeConf{ + deleteStateConf := &retry.StateChangeConf{ Pending: []string{clusterDeletePending}, Target: []string{clusterDeleted}, Refresh: func() (interface{}, string, error) { @@ -1204,7 +1204,7 @@ func waitForVpcClusterOneWorkerAvailable(d *schema.ResourceData, meta interface{ return nil, err } clusterID := d.Id() - createStateConf := &resource.StateChangeConf{ + createStateConf := &retry.StateChangeConf{ Pending: []string{deployRequested, deployInProgress}, Target: []string{normal}, Refresh: func() (interface{}, string, error) { @@ -1245,7 +1245,7 @@ func waitForVpcClusterState(d *schema.ResourceData, meta interface{}, waitForSta return nil, err } clusterID := d.Id() - createStateConf := &resource.StateChangeConf{ + createStateConf := &retry.StateChangeConf{ Pending: pendingState, Target: []string{waitForState}, Refresh: func() (interface{}, string, error) { @@ -1281,7 +1281,7 @@ func waitForVpcClusterMasterAvailable(d *schema.ResourceData, meta interface{}, return nil, err } clusterID := d.Id() - createStateConf := &resource.StateChangeConf{ + createStateConf := &retry.StateChangeConf{ Pending: []string{deployRequested, deployInProgress}, Target: []string{ready}, Refresh: func() (interface{}, string, error) { @@ -1316,7 +1316,7 @@ func waitForVpcClusterMasterKMSApply(d *schema.ResourceData, meta interface{}) ( return nil, err } clusterID := d.Id() - createStateConf := &resource.StateChangeConf{ + createStateConf := &retry.StateChangeConf{ Pending: []string{deployRequested, deployInProgress}, Target: []string{ready}, Refresh: func() (interface{}, string, error) { @@ -1357,7 +1357,7 @@ func waitForVpcClusterIngressAvailable(d *schema.ResourceData, meta interface{}, return nil, err } clusterID := d.Id() - createStateConf := &resource.StateChangeConf{ + createStateConf := &retry.StateChangeConf{ Pending: []string{deployRequested, deployInProgress}, Target: []string{ready}, Refresh: func() (interface{}, string, error) { @@ -1401,7 +1401,7 @@ func waitForVpcClusterVersionUpdate(d *schema.ResourceData, meta interface{}, ta log.Printf("Waiting for cluster (%s) version to be updated.", d.Id()) id := d.Id() - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", versionUpdating}, Target: []string{clusterNormal}, Refresh: vpcClusterVersionRefreshFunc(csClient.Clusters(), id, d, target), @@ -1414,7 +1414,7 @@ func waitForVpcClusterVersionUpdate(d *schema.ResourceData, meta interface{}, ta return stateConf.WaitForState() } -func vpcClusterVersionRefreshFunc(client v2.Clusters, instanceID string, d *schema.ResourceData, target v2.ClusterTargetHeader) resource.StateRefreshFunc { +func vpcClusterVersionRefreshFunc(client v2.Clusters, instanceID string, d *schema.ResourceData, target v2.ClusterTargetHeader) retry.StateRefreshFunc { return func() (interface{}, string, error) { cls, err := client.GetCluster(instanceID, target) if err != nil { @@ -1439,7 +1439,7 @@ func waitForVpcClusterWokersVersionUpdate(d *schema.ResourceData, meta interface log.Printf("Waiting for worker (%s) version to be updated.", workerID) clusterID := d.Id() - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", versionUpdating}, Target: []string{workerNormal}, Refresh: vpcClusterWorkersVersionRefreshFunc(csClient.Workers(), workerID, clusterID, target), @@ -1452,7 +1452,7 @@ func waitForVpcClusterWokersVersionUpdate(d *schema.ResourceData, meta interface return stateConf.WaitForState() } -func vpcClusterWorkersVersionRefreshFunc(client v2.Workers, workerID, clusterID string, target v2.ClusterTargetHeader) resource.StateRefreshFunc { +func vpcClusterWorkersVersionRefreshFunc(client v2.Workers, workerID, clusterID string, target v2.ClusterTargetHeader) retry.StateRefreshFunc { return func() (interface{}, string, error) { worker, err := client.Get(clusterID, workerID, target) if err != nil { @@ -1474,7 +1474,7 @@ func waitForWorkerNodetoDelete(d *schema.ResourceData, meta interface{}, targetE } clusterID := d.Id() - deleteStateConf := &resource.StateChangeConf{ + deleteStateConf := &retry.StateChangeConf{ Pending: []string{workerDeletePending}, Target: []string{workerDeleteState}, Refresh: func() (interface{}, string, error) { @@ -1502,7 +1502,7 @@ func waitForNewWorker(d *schema.ResourceData, meta interface{}, targetEnv v2.Clu } clusterID := d.Id() - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"creating"}, Target: []string{"created"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/kubernetes/resource_ibm_container_vpc_cluster_test.go b/ibm/service/kubernetes/resource_ibm_container_vpc_cluster_test.go index a337fb400a..b5c0105bba 100644 --- a/ibm/service/kubernetes/resource_ibm_container_vpc_cluster_test.go +++ b/ibm/service/kubernetes/resource_ibm_container_vpc_cluster_test.go @@ -12,9 +12,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" bluemix "github.com/IBM-Cloud/bluemix-go" v2 "github.com/IBM-Cloud/bluemix-go/api/container/containerv2" diff --git a/ibm/service/kubernetes/resource_ibm_container_vpc_worker.go b/ibm/service/kubernetes/resource_ibm_container_vpc_worker.go index e45f55a5c4..f9dfbd7c32 100644 --- a/ibm/service/kubernetes/resource_ibm_container_vpc_worker.go +++ b/ibm/service/kubernetes/resource_ibm_container_vpc_worker.go @@ -14,7 +14,7 @@ import ( "sync" "time" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" v2 "github.com/IBM-Cloud/bluemix-go/api/container/containerv2" @@ -474,7 +474,7 @@ func WaitForPortworxPod(d *schema.ResourceData, clientset *kubernetes.Clientset, return nil, fmt.Errorf("[ERROR] Error parsing ptx_timeout: %s", err) } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"ptx_not_ready"}, Target: []string{"ptx_ready"}, Refresh: ptxPodRefreshFunc(clientset, worker_ip), @@ -486,7 +486,7 @@ func WaitForPortworxPod(d *schema.ResourceData, clientset *kubernetes.Clientset, return stateConf.WaitForState() } -func ptxPodRefreshFunc(clientset *kubernetes.Clientset, worker_ip string) resource.StateRefreshFunc { +func ptxPodRefreshFunc(clientset *kubernetes.Clientset, worker_ip string) retry.StateRefreshFunc { return func() (interface{}, string, error) { //1. List pods from kube-system namespace podList, err := clientset.CoreV1().Pods("kube-system").List(context.TODO(), metav1.ListOptions{LabelSelector: "name=portworx"}) @@ -520,7 +520,7 @@ func WaitForPortworxStatus(d *schema.ResourceData, clientset *kubernetes.Clients return nil, fmt.Errorf("[ERROR] Error parsing ptx_timeout: %s", err) } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pxctl_fail"}, Target: []string{"pxctl_success"}, Refresh: ptxStatusRefreshFunc(clientset, config, pod_name), @@ -532,7 +532,7 @@ func WaitForPortworxStatus(d *schema.ResourceData, clientset *kubernetes.Clients return stateConf.WaitForState() } -func ptxStatusRefreshFunc(clientset *kubernetes.Clientset, config *rest.Config, pod_name string) resource.StateRefreshFunc { +func ptxStatusRefreshFunc(clientset *kubernetes.Clientset, config *rest.Config, pod_name string) retry.StateRefreshFunc { return func() (interface{}, string, error) { //Byte buffers for the exec command output var stdout, stderr bytes.Buffer @@ -601,7 +601,7 @@ func waitForVpcWorkerNodetoDelete(d *schema.ResourceData, meta interface{}, targ } clusterID := d.Get("cluster_name").(string) - deleteStateConf := &resource.StateChangeConf{ + deleteStateConf := &retry.StateChangeConf{ Pending: []string{workerDeletePending}, Target: []string{workerDeleteState}, Refresh: func() (interface{}, string, error) { @@ -629,7 +629,7 @@ func waitForNewVpcWorker(d *schema.ResourceData, meta interface{}, targetEnv v2. } clusterID := d.Get("cluster_name").(string) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"creating"}, Target: []string{"created"}, Refresh: func() (interface{}, string, error) { @@ -681,7 +681,7 @@ func WaitForVpcClusterVpcWokersVersionUpdate(d *schema.ResourceData, meta interf log.Printf("Waiting for worker (%s) version to be updated.", workerID) clusterID := d.Get("cluster_name").(string) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", versionUpdating}, Target: []string{workerNormal}, Refresh: vpcClusterVpcWorkersVersionRefreshFunc(csClient.Workers(), workerID, clusterID, d, target, masterVersion), @@ -694,7 +694,7 @@ func WaitForVpcClusterVpcWokersVersionUpdate(d *schema.ResourceData, meta interf return stateConf.WaitForState() } -func vpcClusterVpcWorkersVersionRefreshFunc(client v2.Workers, workerID, clusterID string, d *schema.ResourceData, target v2.ClusterTargetHeader, masterVersion string) resource.StateRefreshFunc { +func vpcClusterVpcWorkersVersionRefreshFunc(client v2.Workers, workerID, clusterID string, d *schema.ResourceData, target v2.ClusterTargetHeader, masterVersion string) retry.StateRefreshFunc { return func() (interface{}, string, error) { worker, err := client.Get(clusterID, workerID, target) if err != nil { diff --git a/ibm/service/kubernetes/resource_ibm_container_vpc_worker_pool.go b/ibm/service/kubernetes/resource_ibm_container_vpc_worker_pool.go index 063073fafe..67348d21f8 100644 --- a/ibm/service/kubernetes/resource_ibm_container_vpc_worker_pool.go +++ b/ibm/service/kubernetes/resource_ibm_container_vpc_worker_pool.go @@ -9,7 +9,7 @@ import ( "strings" "time" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" v1 "github.com/IBM-Cloud/bluemix-go/api/container/containerv1" @@ -551,7 +551,7 @@ func WaitForV2WorkerZoneDeleted(clusterNameOrID, workerPoolNameOrID, zone string if err != nil { return nil, err } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"deleting"}, Target: []string{workerDeleteState}, Refresh: workerPoolV2ZoneDeleteStateRefreshFunc(csClient.Workers(), clusterNameOrID, workerPoolNameOrID, zone, target), @@ -563,7 +563,7 @@ func WaitForV2WorkerZoneDeleted(clusterNameOrID, workerPoolNameOrID, zone string return stateConf.WaitForState() } -func workerPoolV2ZoneDeleteStateRefreshFunc(client v2.Workers, instanceID, workerPoolNameOrID, zone string, target v2.ClusterTargetHeader) resource.StateRefreshFunc { +func workerPoolV2ZoneDeleteStateRefreshFunc(client v2.Workers, instanceID, workerPoolNameOrID, zone string, target v2.ClusterTargetHeader) retry.StateRefreshFunc { return func() (interface{}, string, error) { workerFields, err := client.ListByWorkerPool(instanceID, workerPoolNameOrID, true, target) if err != nil { @@ -787,7 +787,7 @@ func WaitForWorkerPoolAvailable(d *schema.ResourceData, meta interface{}, cluste log.Printf("Waiting for workerpool (%s) to be available.", d.Id()) // id := d.Id() - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"provision_pending"}, Target: []string{workerDesired}, Refresh: vpcWorkerPoolStateRefreshFunc(wpClient.Workers(), clusterNameOrID, workerPoolNameOrID, target), @@ -799,7 +799,7 @@ func WaitForWorkerPoolAvailable(d *schema.ResourceData, meta interface{}, cluste return stateConf.WaitForState() } -func vpcWorkerPoolStateRefreshFunc(client v2.Workers, instanceID string, workerPoolNameOrID string, target v2.ClusterTargetHeader) resource.StateRefreshFunc { +func vpcWorkerPoolStateRefreshFunc(client v2.Workers, instanceID string, workerPoolNameOrID string, target v2.ClusterTargetHeader) retry.StateRefreshFunc { return func() (interface{}, string, error) { workerFields, err := client.ListByWorkerPool(instanceID, workerPoolNameOrID, false, target) if err != nil { @@ -826,7 +826,7 @@ func WaitForVpcWorkerDelete(clusterNameOrID, workerPoolNameOrID string, meta int return nil, err } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"deleting"}, Target: []string{workerDeleteState}, Refresh: vpcworkerPoolDeleteStateRefreshFunc(wpClient.Workers(), clusterNameOrID, workerPoolNameOrID, target), @@ -838,7 +838,7 @@ func WaitForVpcWorkerDelete(clusterNameOrID, workerPoolNameOrID string, meta int return stateConf.WaitForState() } -func vpcworkerPoolDeleteStateRefreshFunc(client v2.Workers, instanceID, workerPoolNameOrID string, target v2.ClusterTargetHeader) resource.StateRefreshFunc { +func vpcworkerPoolDeleteStateRefreshFunc(client v2.Workers, instanceID, workerPoolNameOrID string, target v2.ClusterTargetHeader) retry.StateRefreshFunc { return func() (interface{}, string, error) { workerFields, err := client.ListByWorkerPool(instanceID, "", true, target) if err != nil { diff --git a/ibm/service/kubernetes/resource_ibm_container_vpc_worker_pool_test.go b/ibm/service/kubernetes/resource_ibm_container_vpc_worker_pool_test.go index 6a2e89a183..1c8e61347a 100644 --- a/ibm/service/kubernetes/resource_ibm_container_vpc_worker_pool_test.go +++ b/ibm/service/kubernetes/resource_ibm_container_vpc_worker_pool_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" v2 "github.com/IBM-Cloud/bluemix-go/api/container/containerv2" ) diff --git a/ibm/service/kubernetes/resource_ibm_container_vpc_worker_test.go b/ibm/service/kubernetes/resource_ibm_container_vpc_worker_test.go index a067bcdac4..41a39b633f 100644 --- a/ibm/service/kubernetes/resource_ibm_container_vpc_worker_test.go +++ b/ibm/service/kubernetes/resource_ibm_container_vpc_worker_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" v2 "github.com/IBM-Cloud/bluemix-go/api/container/containerv2" ) diff --git a/ibm/service/kubernetes/resource_ibm_container_worker_pool.go b/ibm/service/kubernetes/resource_ibm_container_worker_pool.go index 46d33b7120..7622c12428 100644 --- a/ibm/service/kubernetes/resource_ibm_container_worker_pool.go +++ b/ibm/service/kubernetes/resource_ibm_container_worker_pool.go @@ -10,7 +10,7 @@ import ( "time" v2 "github.com/IBM-Cloud/bluemix-go/api/container/containerv2" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" v1 "github.com/IBM-Cloud/bluemix-go/api/container/containerv1" @@ -542,7 +542,7 @@ func WaitForWorkerNormal(clusterNameOrID, workerPoolNameOrID string, meta interf return nil, err } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", workerProvisioning}, Target: []string{workerNormal}, Refresh: workerPoolStateRefreshFunc(csClient.Workers(), clusterNameOrID, workerPoolNameOrID, target), @@ -554,7 +554,7 @@ func WaitForWorkerNormal(clusterNameOrID, workerPoolNameOrID string, meta interf return stateConf.WaitForState() } -func workerPoolStateRefreshFunc(client v1.Workers, instanceID, workerPoolNameOrID string, target v1.ClusterTargetHeader) resource.StateRefreshFunc { +func workerPoolStateRefreshFunc(client v1.Workers, instanceID, workerPoolNameOrID string, target v1.ClusterTargetHeader) retry.StateRefreshFunc { return func() (interface{}, string, error) { workerFields, err := client.ListByWorkerPool(instanceID, workerPoolNameOrID, false, target) if err != nil { @@ -578,7 +578,7 @@ func WaitForWorkerDelete(clusterNameOrID, workerPoolNameOrID string, meta interf return nil, err } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"deleting"}, Target: []string{workerDeleteState}, Refresh: workerPoolDeleteStateRefreshFunc(csClient.Workers(), clusterNameOrID, workerPoolNameOrID, target), @@ -590,7 +590,7 @@ func WaitForWorkerDelete(clusterNameOrID, workerPoolNameOrID string, meta interf return stateConf.WaitForState() } -func workerPoolDeleteStateRefreshFunc(client v1.Workers, instanceID, workerPoolNameOrID string, target v1.ClusterTargetHeader) resource.StateRefreshFunc { +func workerPoolDeleteStateRefreshFunc(client v1.Workers, instanceID, workerPoolNameOrID string, target v1.ClusterTargetHeader) retry.StateRefreshFunc { return func() (interface{}, string, error) { workerFields, err := client.ListByWorkerPool(instanceID, "", true, target) if err != nil { diff --git a/ibm/service/kubernetes/resource_ibm_container_worker_pool_test.go b/ibm/service/kubernetes/resource_ibm_container_worker_pool_test.go index 0dd451e81b..c364bd62d0 100644 --- a/ibm/service/kubernetes/resource_ibm_container_worker_pool_test.go +++ b/ibm/service/kubernetes/resource_ibm_container_worker_pool_test.go @@ -14,9 +14,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" v1 "github.com/IBM-Cloud/bluemix-go/api/container/containerv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMContainerWorkerPoolBasic(t *testing.T) { diff --git a/ibm/service/kubernetes/resource_ibm_container_worker_pool_zone_attachment.go b/ibm/service/kubernetes/resource_ibm_container_worker_pool_zone_attachment.go index 4e4ad821b5..5f513d73fb 100644 --- a/ibm/service/kubernetes/resource_ibm_container_worker_pool_zone_attachment.go +++ b/ibm/service/kubernetes/resource_ibm_container_worker_pool_zone_attachment.go @@ -8,7 +8,7 @@ import ( "strings" "time" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" v1 "github.com/IBM-Cloud/bluemix-go/api/container/containerv1" @@ -334,7 +334,7 @@ func WaitForWorkerZoneNormal(clusterNameOrID, workerPoolNameOrID, zone string, m return nil, err } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", workerProvisioning}, Target: []string{workerNormal}, Refresh: workerPoolZoneStateRefreshFunc(csClient.Workers(), clusterNameOrID, workerPoolNameOrID, zone, target), @@ -346,7 +346,7 @@ func WaitForWorkerZoneNormal(clusterNameOrID, workerPoolNameOrID, zone string, m return stateConf.WaitForState() } -func workerPoolZoneStateRefreshFunc(client v1.Workers, instanceID, workerPoolNameOrID, zone string, target v1.ClusterTargetHeader) resource.StateRefreshFunc { +func workerPoolZoneStateRefreshFunc(client v1.Workers, instanceID, workerPoolNameOrID, zone string, target v1.ClusterTargetHeader) retry.StateRefreshFunc { return func() (interface{}, string, error) { workerFields, err := client.ListByWorkerPool(instanceID, workerPoolNameOrID, false, target) if err != nil { @@ -372,7 +372,7 @@ func WaitForWorkerZoneDeleted(clusterNameOrID, workerPoolNameOrID, zone string, return nil, err } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"deleting"}, Target: []string{workerDeleteState}, Refresh: workerPoolZoneDeleteStateRefreshFunc(csClient.Workers(), clusterNameOrID, workerPoolNameOrID, zone, target), @@ -384,7 +384,7 @@ func WaitForWorkerZoneDeleted(clusterNameOrID, workerPoolNameOrID, zone string, return stateConf.WaitForState() } -func workerPoolZoneDeleteStateRefreshFunc(client v1.Workers, instanceID, workerPoolNameOrID, zone string, target v1.ClusterTargetHeader) resource.StateRefreshFunc { +func workerPoolZoneDeleteStateRefreshFunc(client v1.Workers, instanceID, workerPoolNameOrID, zone string, target v1.ClusterTargetHeader) retry.StateRefreshFunc { return func() (interface{}, string, error) { workerFields, err := client.ListByWorkerPool(instanceID, workerPoolNameOrID, true, target) if err != nil { @@ -408,7 +408,7 @@ func waitForWorkerZoneALB(clusterNameOrID, zone string, meta interface{}, timeou return nil, err } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pending"}, Target: []string{"ready"}, Refresh: workerZoneALBStateRefreshFunc(csClient.Albs(), clusterNameOrID, zone, target), @@ -420,7 +420,7 @@ func waitForWorkerZoneALB(clusterNameOrID, zone string, meta interface{}, timeou return stateConf.WaitForState() } -func workerZoneALBStateRefreshFunc(client v1.Albs, instanceID, zone string, target v1.ClusterTargetHeader) resource.StateRefreshFunc { +func workerZoneALBStateRefreshFunc(client v1.Albs, instanceID, zone string, target v1.ClusterTargetHeader) retry.StateRefreshFunc { return func() (interface{}, string, error) { // Get all ALBs associated with cluster albs, err := client.ListClusterALBs(instanceID, target) diff --git a/ibm/service/kubernetes/resource_ibm_container_worker_pool_zone_attachment_test.go b/ibm/service/kubernetes/resource_ibm_container_worker_pool_zone_attachment_test.go index b3c4ddbb90..5475e49e8e 100644 --- a/ibm/service/kubernetes/resource_ibm_container_worker_pool_zone_attachment_test.go +++ b/ibm/service/kubernetes/resource_ibm_container_worker_pool_zone_attachment_test.go @@ -13,9 +13,9 @@ import ( "github.com/softlayer/softlayer-go/services" "github.com/softlayer/softlayer-go/sl" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) const NOT_FOUND = "SoftLayer_Exception_Network_LBaaS_ObjectNotFound" diff --git a/ibm/service/kubernetes/resource_ibm_ob_logging.go b/ibm/service/kubernetes/resource_ibm_ob_logging.go index ba7bd721fa..94ffa282bb 100644 --- a/ibm/service/kubernetes/resource_ibm_ob_logging.go +++ b/ibm/service/kubernetes/resource_ibm_ob_logging.go @@ -9,7 +9,7 @@ import ( "strings" "time" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" v2 "github.com/IBM-Cloud/bluemix-go/api/container/containerv2" @@ -128,7 +128,7 @@ func waitForClusterIntegration(d *schema.ResourceData, meta interface{}, cluster return nil, err } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{deployRequested, deployInProgress}, Target: []string{ready}, Refresh: func() (interface{}, string, error) { @@ -190,15 +190,15 @@ func resourceIBMLoggingCreate(d *schema.ResourceData, meta interface{}) error { } var logging v2.LoggingCreateResponse - err = resource.Retry(10*time.Minute, func() *resource.RetryError { + err = retry.Retry(10*time.Minute, func() *retry.RetryError { var err error logging, err = client.Logging().CreateLoggingConfig(params, targetEnv) if err != nil { log.Printf("[DEBUG] logging Instance err %s", err) if strings.Contains(err.Error(), "The user doesn't have enough privileges to perform this action") || strings.Contains(err.Error(), "A logging or monitoring configuration for this cluster already exists. To use a different configuration, delete the existing configuration and try again") { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil diff --git a/ibm/service/kubernetes/resource_ibm_ob_logging_test.go b/ibm/service/kubernetes/resource_ibm_ob_logging_test.go index 86c6399ecd..a2cf8caa12 100644 --- a/ibm/service/kubernetes/resource_ibm_ob_logging_test.go +++ b/ibm/service/kubernetes/resource_ibm_ob_logging_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" v2 "github.com/IBM-Cloud/bluemix-go/api/container/containerv2" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMLogging_basic(t *testing.T) { diff --git a/ibm/service/kubernetes/resource_ibm_ob_monitoring.go b/ibm/service/kubernetes/resource_ibm_ob_monitoring.go index ffc562e86f..1a175a0a17 100644 --- a/ibm/service/kubernetes/resource_ibm_ob_monitoring.go +++ b/ibm/service/kubernetes/resource_ibm_ob_monitoring.go @@ -9,7 +9,7 @@ import ( "strings" "time" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" v2 "github.com/IBM-Cloud/bluemix-go/api/container/containerv2" @@ -161,15 +161,15 @@ func resourceIBMMonitoringCreate(d *schema.ResourceData, meta interface{}) error } var monitoring v2.MonitoringCreateResponse - err = resource.Retry(10*time.Minute, func() *resource.RetryError { + err = retry.Retry(10*time.Minute, func() *retry.RetryError { var err error monitoring, err = client.Monitoring().CreateMonitoringConfig(params, targetEnv) if err != nil { log.Printf("[DEBUG] monitoring Instance err %s", err) if strings.Contains(err.Error(), "The user doesn't have enough privileges to perform this action") || strings.Contains(err.Error(), "A logging or monitoring configuration for this cluster already exists. To use a different configuration, delete the existing configuration and try again") { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil diff --git a/ibm/service/kubernetes/resource_ibm_ob_monitoring_test.go b/ibm/service/kubernetes/resource_ibm_ob_monitoring_test.go index 655cdfdc53..c81d4f2562 100644 --- a/ibm/service/kubernetes/resource_ibm_ob_monitoring_test.go +++ b/ibm/service/kubernetes/resource_ibm_ob_monitoring_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" v2 "github.com/IBM-Cloud/bluemix-go/api/container/containerv2" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMMonitoring_basic(t *testing.T) { diff --git a/ibm/service/kubernetes/utils/softwaredefinedstorage/odfWorkerReplace.go b/ibm/service/kubernetes/utils/softwaredefinedstorage/odfWorkerReplace.go index e5d5f0a3f2..c261915e45 100644 --- a/ibm/service/kubernetes/utils/softwaredefinedstorage/odfWorkerReplace.go +++ b/ibm/service/kubernetes/utils/softwaredefinedstorage/odfWorkerReplace.go @@ -10,7 +10,7 @@ import ( "time" v2 "github.com/IBM-Cloud/bluemix-go/api/container/containerv2" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" templatev1 "github.com/openshift/api/template/v1" templatev1client "github.com/openshift/client-go/template/clientset/versioned/typed/template/v1" cephv1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1" @@ -273,7 +273,7 @@ func executeTemplate(osdID string) error { } func waitForOdfDeploymentStatus(replicas int32, deploymentName string) (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"NotReady"}, Target: []string{"Ready"}, Refresh: odfDeploymentRefreshFunc(replicas, deploymentName), @@ -285,7 +285,7 @@ func waitForOdfDeploymentStatus(replicas int32, deploymentName string) (interfac return stateConf.WaitForState() } -func odfDeploymentRefreshFunc(replicas int32, deploymentName string) resource.StateRefreshFunc { +func odfDeploymentRefreshFunc(replicas int32, deploymentName string) retry.StateRefreshFunc { return func() (interface{}, string, error) { log.Println("Checking Deployment Status....") deploymentsClient := clientSet.AppsV1().Deployments(odfNamespace) @@ -303,7 +303,7 @@ func odfDeploymentRefreshFunc(replicas int32, deploymentName string) resource.St } func waitForCephClusterStatus() (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"NotReady"}, Target: []string{"Ready"}, Refresh: cephClusterRefreshFunc(), @@ -315,7 +315,7 @@ func waitForCephClusterStatus() (interface{}, error) { return stateConf.WaitForState() } -func cephClusterRefreshFunc() resource.StateRefreshFunc { +func cephClusterRefreshFunc() retry.StateRefreshFunc { return func() (interface{}, string, error) { scheme := runtime.NewScheme() utilruntime.Must(cephv1.AddToScheme(scheme)) @@ -355,7 +355,7 @@ func cephClusterRefreshFunc() resource.StateRefreshFunc { } func waitForNodeCordonStatus(node string) (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"NotReady"}, Target: []string{"Ready"}, Refresh: nodeCordonRefreshFunc(node), @@ -367,7 +367,7 @@ func waitForNodeCordonStatus(node string) (interface{}, error) { return stateConf.WaitForState() } -func nodeCordonRefreshFunc(node string) resource.StateRefreshFunc { +func nodeCordonRefreshFunc(node string) retry.StateRefreshFunc { return func() (interface{}, string, error) { n, err := clientSet.CoreV1().Nodes().Get(context.Background(), node, metav1.GetOptions{}) if err != nil { @@ -391,7 +391,7 @@ func nodeCordonRefreshFunc(node string) resource.StateRefreshFunc { } func waitForTemplateInstanceStatus(templateInstance *templatev1.TemplateInstance) (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"NotReady"}, Target: []string{"Ready"}, Refresh: templateInstanceRefreshFunc(templateInstance), @@ -403,7 +403,7 @@ func waitForTemplateInstanceStatus(templateInstance *templatev1.TemplateInstance return stateConf.WaitForState() } -func templateInstanceRefreshFunc(templateInstance *templatev1.TemplateInstance) resource.StateRefreshFunc { +func templateInstanceRefreshFunc(templateInstance *templatev1.TemplateInstance) retry.StateRefreshFunc { return func() (interface{}, string, error) { for _, cond := range templateInstance.Status.Conditions { // If the TemplateInstance contains a status condition diff --git a/ibm/service/logs/data_source_ibm_logs_alert_test.go b/ibm/service/logs/data_source_ibm_logs_alert_test.go index 8f847c051f..0d90e2d26e 100644 --- a/ibm/service/logs/data_source_ibm_logs_alert_test.go +++ b/ibm/service/logs/data_source_ibm_logs_alert_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/logs/data_source_ibm_logs_alerts_test.go b/ibm/service/logs/data_source_ibm_logs_alerts_test.go index e7b818d97d..ed429804b0 100644 --- a/ibm/service/logs/data_source_ibm_logs_alerts_test.go +++ b/ibm/service/logs/data_source_ibm_logs_alerts_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/logs/data_source_ibm_logs_dashboard_folders_test.go b/ibm/service/logs/data_source_ibm_logs_dashboard_folders_test.go index 2f2d2017fd..6e36670297 100644 --- a/ibm/service/logs/data_source_ibm_logs_dashboard_folders_test.go +++ b/ibm/service/logs/data_source_ibm_logs_dashboard_folders_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/logs" diff --git a/ibm/service/logs/data_source_ibm_logs_dashboard_test.go b/ibm/service/logs/data_source_ibm_logs_dashboard_test.go index ce3cf9b06c..a52b97f851 100644 --- a/ibm/service/logs/data_source_ibm_logs_dashboard_test.go +++ b/ibm/service/logs/data_source_ibm_logs_dashboard_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" // . "github.com/IBM-Cloud/terraform-provider-ibm/ibm/unittest" diff --git a/ibm/service/logs/data_source_ibm_logs_data_access_rules_test.go b/ibm/service/logs/data_source_ibm_logs_data_access_rules_test.go index 9f54a45403..c10855c7e5 100644 --- a/ibm/service/logs/data_source_ibm_logs_data_access_rules_test.go +++ b/ibm/service/logs/data_source_ibm_logs_data_access_rules_test.go @@ -11,8 +11,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/logs/data_source_ibm_logs_data_usage_metrics_test.go b/ibm/service/logs/data_source_ibm_logs_data_usage_metrics_test.go index 1a59d2ff78..8879b3f6d0 100644 --- a/ibm/service/logs/data_source_ibm_logs_data_usage_metrics_test.go +++ b/ibm/service/logs/data_source_ibm_logs_data_usage_metrics_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/logs/data_source_ibm_logs_e2m_test.go b/ibm/service/logs/data_source_ibm_logs_e2m_test.go index e94140f5d7..f473e6394f 100644 --- a/ibm/service/logs/data_source_ibm_logs_e2m_test.go +++ b/ibm/service/logs/data_source_ibm_logs_e2m_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/logs/data_source_ibm_logs_e2ms_test.go b/ibm/service/logs/data_source_ibm_logs_e2ms_test.go index 31c9d38255..8638544eb2 100644 --- a/ibm/service/logs/data_source_ibm_logs_e2ms_test.go +++ b/ibm/service/logs/data_source_ibm_logs_e2ms_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" // . "github.com/IBM-Cloud/terraform-provider-ibm/ibm/unittest" diff --git a/ibm/service/logs/data_source_ibm_logs_enrichments_test.go b/ibm/service/logs/data_source_ibm_logs_enrichments_test.go index 28a85aef64..b00ad42651 100644 --- a/ibm/service/logs/data_source_ibm_logs_enrichments_test.go +++ b/ibm/service/logs/data_source_ibm_logs_enrichments_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/logs/data_source_ibm_logs_outgoing_webhook_test.go b/ibm/service/logs/data_source_ibm_logs_outgoing_webhook_test.go index 03659ab42e..8224ac14aa 100644 --- a/ibm/service/logs/data_source_ibm_logs_outgoing_webhook_test.go +++ b/ibm/service/logs/data_source_ibm_logs_outgoing_webhook_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/logs" diff --git a/ibm/service/logs/data_source_ibm_logs_outgoing_webhooks_test.go b/ibm/service/logs/data_source_ibm_logs_outgoing_webhooks_test.go index 85980e9584..0075dabdd5 100644 --- a/ibm/service/logs/data_source_ibm_logs_outgoing_webhooks_test.go +++ b/ibm/service/logs/data_source_ibm_logs_outgoing_webhooks_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/logs" diff --git a/ibm/service/logs/data_source_ibm_logs_policies_test.go b/ibm/service/logs/data_source_ibm_logs_policies_test.go index d283174af2..28a0544e31 100644 --- a/ibm/service/logs/data_source_ibm_logs_policies_test.go +++ b/ibm/service/logs/data_source_ibm_logs_policies_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/logs" diff --git a/ibm/service/logs/data_source_ibm_logs_policy_test.go b/ibm/service/logs/data_source_ibm_logs_policy_test.go index 865ab49123..d3ebc46909 100644 --- a/ibm/service/logs/data_source_ibm_logs_policy_test.go +++ b/ibm/service/logs/data_source_ibm_logs_policy_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/logs" diff --git a/ibm/service/logs/data_source_ibm_logs_rule_group_test.go b/ibm/service/logs/data_source_ibm_logs_rule_group_test.go index d74544ba1b..2df824b753 100644 --- a/ibm/service/logs/data_source_ibm_logs_rule_group_test.go +++ b/ibm/service/logs/data_source_ibm_logs_rule_group_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" // . "github.com/IBM-Cloud/terraform-provider-ibm/ibm/unittest" diff --git a/ibm/service/logs/data_source_ibm_logs_rule_groups_test.go b/ibm/service/logs/data_source_ibm_logs_rule_groups_test.go index d65f8f1fbb..8ef0261fe0 100644 --- a/ibm/service/logs/data_source_ibm_logs_rule_groups_test.go +++ b/ibm/service/logs/data_source_ibm_logs_rule_groups_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" // . "github.com/IBM-Cloud/terraform-provider-ibm/ibm/unittest" diff --git a/ibm/service/logs/data_source_ibm_logs_view_folder_test.go b/ibm/service/logs/data_source_ibm_logs_view_folder_test.go index 606334e20f..965bbb391b 100644 --- a/ibm/service/logs/data_source_ibm_logs_view_folder_test.go +++ b/ibm/service/logs/data_source_ibm_logs_view_folder_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/logs/data_source_ibm_logs_view_folders_test.go b/ibm/service/logs/data_source_ibm_logs_view_folders_test.go index 7f744a8516..d1fd298fe3 100644 --- a/ibm/service/logs/data_source_ibm_logs_view_folders_test.go +++ b/ibm/service/logs/data_source_ibm_logs_view_folders_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/logs" diff --git a/ibm/service/logs/data_source_ibm_logs_view_test.go b/ibm/service/logs/data_source_ibm_logs_view_test.go index ec7d7ed3ba..8b74ea22c5 100644 --- a/ibm/service/logs/data_source_ibm_logs_view_test.go +++ b/ibm/service/logs/data_source_ibm_logs_view_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" // . "github.com/IBM-Cloud/terraform-provider-ibm/ibm/unittest" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" diff --git a/ibm/service/logs/data_source_ibm_logs_views_test.go b/ibm/service/logs/data_source_ibm_logs_views_test.go index 63b014813e..0af3626f00 100644 --- a/ibm/service/logs/data_source_ibm_logs_views_test.go +++ b/ibm/service/logs/data_source_ibm_logs_views_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" // . "github.com/IBM-Cloud/terraform-provider-ibm/ibm/unittest" diff --git a/ibm/service/logs/resource_ibm_logs_alert_test.go b/ibm/service/logs/resource_ibm_logs_alert_test.go index ad6c752a77..e7f4c547dc 100644 --- a/ibm/service/logs/resource_ibm_logs_alert_test.go +++ b/ibm/service/logs/resource_ibm_logs_alert_test.go @@ -8,9 +8,9 @@ import ( "testing" "github.com/go-openapi/strfmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/logs/resource_ibm_logs_dashboard_folder_test.go b/ibm/service/logs/resource_ibm_logs_dashboard_folder_test.go index 08eda95f24..45629cbcfd 100644 --- a/ibm/service/logs/resource_ibm_logs_dashboard_folder_test.go +++ b/ibm/service/logs/resource_ibm_logs_dashboard_folder_test.go @@ -8,9 +8,9 @@ import ( "testing" "github.com/go-openapi/strfmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/logs/resource_ibm_logs_dashboard_test.go b/ibm/service/logs/resource_ibm_logs_dashboard_test.go index be9361c2e9..b3d63c5f98 100644 --- a/ibm/service/logs/resource_ibm_logs_dashboard_test.go +++ b/ibm/service/logs/resource_ibm_logs_dashboard_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/logs/resource_ibm_logs_data_access_rule_test.go b/ibm/service/logs/resource_ibm_logs_data_access_rule_test.go index b6f6485301..d19b76d982 100644 --- a/ibm/service/logs/resource_ibm_logs_data_access_rule_test.go +++ b/ibm/service/logs/resource_ibm_logs_data_access_rule_test.go @@ -8,9 +8,9 @@ import ( "testing" "github.com/go-openapi/strfmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/logs/resource_ibm_logs_data_usage_metrics_test.go b/ibm/service/logs/resource_ibm_logs_data_usage_metrics_test.go index ef84807ff0..91865f4338 100644 --- a/ibm/service/logs/resource_ibm_logs_data_usage_metrics_test.go +++ b/ibm/service/logs/resource_ibm_logs_data_usage_metrics_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/logs/resource_ibm_logs_e2m_test.go b/ibm/service/logs/resource_ibm_logs_e2m_test.go index 3a5aaddbf9..2d8ea95930 100644 --- a/ibm/service/logs/resource_ibm_logs_e2m_test.go +++ b/ibm/service/logs/resource_ibm_logs_e2m_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/logs/resource_ibm_logs_enrichment_test.go b/ibm/service/logs/resource_ibm_logs_enrichment_test.go index 5cb5705657..f94e7e4c27 100644 --- a/ibm/service/logs/resource_ibm_logs_enrichment_test.go +++ b/ibm/service/logs/resource_ibm_logs_enrichment_test.go @@ -8,8 +8,8 @@ import ( "strconv" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/logs/resource_ibm_logs_outgoing_webhook_test.go b/ibm/service/logs/resource_ibm_logs_outgoing_webhook_test.go index 10b21524c3..5bbd49f3e3 100644 --- a/ibm/service/logs/resource_ibm_logs_outgoing_webhook_test.go +++ b/ibm/service/logs/resource_ibm_logs_outgoing_webhook_test.go @@ -8,9 +8,9 @@ import ( "testing" "github.com/go-openapi/strfmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/logs/resource_ibm_logs_policy_test.go b/ibm/service/logs/resource_ibm_logs_policy_test.go index b95a70d724..53212385ae 100644 --- a/ibm/service/logs/resource_ibm_logs_policy_test.go +++ b/ibm/service/logs/resource_ibm_logs_policy_test.go @@ -8,9 +8,9 @@ import ( "testing" "github.com/go-openapi/strfmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/logs/resource_ibm_logs_rule_group_test.go b/ibm/service/logs/resource_ibm_logs_rule_group_test.go index f2105fbd6c..8d536eeb63 100644 --- a/ibm/service/logs/resource_ibm_logs_rule_group_test.go +++ b/ibm/service/logs/resource_ibm_logs_rule_group_test.go @@ -8,9 +8,9 @@ import ( "testing" "github.com/go-openapi/strfmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/logs/resource_ibm_logs_view_folder_test.go b/ibm/service/logs/resource_ibm_logs_view_folder_test.go index cf709b406b..8dcb704088 100644 --- a/ibm/service/logs/resource_ibm_logs_view_folder_test.go +++ b/ibm/service/logs/resource_ibm_logs_view_folder_test.go @@ -9,9 +9,9 @@ import ( "github.com/IBM/go-sdk-core/v5/core" "github.com/go-openapi/strfmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/logs/resource_ibm_logs_view_test.go b/ibm/service/logs/resource_ibm_logs_view_test.go index a1e437d58a..dd97cfc53a 100644 --- a/ibm/service/logs/resource_ibm_logs_view_test.go +++ b/ibm/service/logs/resource_ibm_logs_view_test.go @@ -8,9 +8,9 @@ import ( "strconv" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/logsrouting/data_source_ibm_logs-router_targets_test.go b/ibm/service/logsrouting/data_source_ibm_logs-router_targets_test.go index 848adbc662..ce301c8590 100644 --- a/ibm/service/logsrouting/data_source_ibm_logs-router_targets_test.go +++ b/ibm/service/logsrouting/data_source_ibm_logs-router_targets_test.go @@ -11,8 +11,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/logsrouting" diff --git a/ibm/service/logsrouting/data_source_ibm_logs-router_tenants_test.go b/ibm/service/logsrouting/data_source_ibm_logs-router_tenants_test.go index 5165c0ce46..38b88e68b0 100644 --- a/ibm/service/logsrouting/data_source_ibm_logs-router_tenants_test.go +++ b/ibm/service/logsrouting/data_source_ibm_logs-router_tenants_test.go @@ -11,8 +11,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/logsrouting" diff --git a/ibm/service/logsrouting/resource_ibm_logs-router_tenant_test.go b/ibm/service/logsrouting/resource_ibm_logs-router_tenant_test.go index 2b3b7dca4f..54c7b77d4e 100644 --- a/ibm/service/logsrouting/resource_ibm_logs-router_tenant_test.go +++ b/ibm/service/logsrouting/resource_ibm_logs-router_tenant_test.go @@ -8,9 +8,9 @@ import ( "testing" "github.com/go-openapi/strfmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/metricsrouter/data_source_ibm_metrics_router_routes_test.go b/ibm/service/metricsrouter/data_source_ibm_metrics_router_routes_test.go index f9199a24ac..5aa8c1c8aa 100644 --- a/ibm/service/metricsrouter/data_source_ibm_metrics_router_routes_test.go +++ b/ibm/service/metricsrouter/data_source_ibm_metrics_router_routes_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/metricsrouter/data_source_ibm_metrics_router_targets_test.go b/ibm/service/metricsrouter/data_source_ibm_metrics_router_targets_test.go index c88e7687f8..4d61d4ecd0 100644 --- a/ibm/service/metricsrouter/data_source_ibm_metrics_router_targets_test.go +++ b/ibm/service/metricsrouter/data_source_ibm_metrics_router_targets_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/metricsrouter/resource_ibm_metrics_router_route_test.go b/ibm/service/metricsrouter/resource_ibm_metrics_router_route_test.go index 6c1e2e8fe7..0edeb9d20d 100644 --- a/ibm/service/metricsrouter/resource_ibm_metrics_router_route_test.go +++ b/ibm/service/metricsrouter/resource_ibm_metrics_router_route_test.go @@ -8,9 +8,9 @@ import ( "regexp" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/metricsrouter/resource_ibm_metrics_router_settings_test.go b/ibm/service/metricsrouter/resource_ibm_metrics_router_settings_test.go index 0de4fe306d..bd579b9d5d 100644 --- a/ibm/service/metricsrouter/resource_ibm_metrics_router_settings_test.go +++ b/ibm/service/metricsrouter/resource_ibm_metrics_router_settings_test.go @@ -8,8 +8,8 @@ import ( "regexp" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/metricsrouter/resource_ibm_metrics_router_target_test.go b/ibm/service/metricsrouter/resource_ibm_metrics_router_target_test.go index 069f3c5bd6..eb211c42df 100644 --- a/ibm/service/metricsrouter/resource_ibm_metrics_router_target_test.go +++ b/ibm/service/metricsrouter/resource_ibm_metrics_router_target_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/mqcloud/data_source_ibm_mqcloud_application_test.go b/ibm/service/mqcloud/data_source_ibm_mqcloud_application_test.go index 7d31288284..2da333d4ca 100644 --- a/ibm/service/mqcloud/data_source_ibm_mqcloud_application_test.go +++ b/ibm/service/mqcloud/data_source_ibm_mqcloud_application_test.go @@ -11,7 +11,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/mqcloud" diff --git a/ibm/service/mqcloud/data_source_ibm_mqcloud_keystore_certificate_test.go b/ibm/service/mqcloud/data_source_ibm_mqcloud_keystore_certificate_test.go index b801f2768b..0711c45c29 100644 --- a/ibm/service/mqcloud/data_source_ibm_mqcloud_keystore_certificate_test.go +++ b/ibm/service/mqcloud/data_source_ibm_mqcloud_keystore_certificate_test.go @@ -11,8 +11,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/mqcloud" diff --git a/ibm/service/mqcloud/data_source_ibm_mqcloud_queue_manager_options_test.go b/ibm/service/mqcloud/data_source_ibm_mqcloud_queue_manager_options_test.go index e7b5deaa73..55dd6355be 100644 --- a/ibm/service/mqcloud/data_source_ibm_mqcloud_queue_manager_options_test.go +++ b/ibm/service/mqcloud/data_source_ibm_mqcloud_queue_manager_options_test.go @@ -11,7 +11,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/mqcloud/data_source_ibm_mqcloud_queue_manager_status_test.go b/ibm/service/mqcloud/data_source_ibm_mqcloud_queue_manager_status_test.go index 451d67bc51..5373ec1357 100644 --- a/ibm/service/mqcloud/data_source_ibm_mqcloud_queue_manager_status_test.go +++ b/ibm/service/mqcloud/data_source_ibm_mqcloud_queue_manager_status_test.go @@ -11,7 +11,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/mqcloud/data_source_ibm_mqcloud_queue_manager_test.go b/ibm/service/mqcloud/data_source_ibm_mqcloud_queue_manager_test.go index f1709e2845..dbc22eaa3d 100644 --- a/ibm/service/mqcloud/data_source_ibm_mqcloud_queue_manager_test.go +++ b/ibm/service/mqcloud/data_source_ibm_mqcloud_queue_manager_test.go @@ -11,8 +11,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/mqcloud" diff --git a/ibm/service/mqcloud/data_source_ibm_mqcloud_truststore_certificate_test.go b/ibm/service/mqcloud/data_source_ibm_mqcloud_truststore_certificate_test.go index bbe0edb693..d34ca626c2 100644 --- a/ibm/service/mqcloud/data_source_ibm_mqcloud_truststore_certificate_test.go +++ b/ibm/service/mqcloud/data_source_ibm_mqcloud_truststore_certificate_test.go @@ -11,8 +11,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/mqcloud" diff --git a/ibm/service/mqcloud/data_source_ibm_mqcloud_user_test.go b/ibm/service/mqcloud/data_source_ibm_mqcloud_user_test.go index 98006d6b0e..798a7e631e 100644 --- a/ibm/service/mqcloud/data_source_ibm_mqcloud_user_test.go +++ b/ibm/service/mqcloud/data_source_ibm_mqcloud_user_test.go @@ -11,8 +11,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/mqcloud" diff --git a/ibm/service/mqcloud/data_source_ibm_mqcloud_virtual_private_endpoint_gateway_test.go b/ibm/service/mqcloud/data_source_ibm_mqcloud_virtual_private_endpoint_gateway_test.go index 51901087d2..6d0c724e8a 100644 --- a/ibm/service/mqcloud/data_source_ibm_mqcloud_virtual_private_endpoint_gateway_test.go +++ b/ibm/service/mqcloud/data_source_ibm_mqcloud_virtual_private_endpoint_gateway_test.go @@ -11,8 +11,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/mqcloud/data_source_ibm_mqcloud_virtual_private_endpoint_gateways_test.go b/ibm/service/mqcloud/data_source_ibm_mqcloud_virtual_private_endpoint_gateways_test.go index 221a856c87..5e70d55738 100644 --- a/ibm/service/mqcloud/data_source_ibm_mqcloud_virtual_private_endpoint_gateways_test.go +++ b/ibm/service/mqcloud/data_source_ibm_mqcloud_virtual_private_endpoint_gateways_test.go @@ -11,8 +11,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/mqcloud" diff --git a/ibm/service/mqcloud/resource_ibm_mqcloud_application_test.go b/ibm/service/mqcloud/resource_ibm_mqcloud_application_test.go index 281e230f11..5027cd5e7f 100644 --- a/ibm/service/mqcloud/resource_ibm_mqcloud_application_test.go +++ b/ibm/service/mqcloud/resource_ibm_mqcloud_application_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/mqcloud/resource_ibm_mqcloud_keystore_certificate_test.go b/ibm/service/mqcloud/resource_ibm_mqcloud_keystore_certificate_test.go index b4f480a6e8..28f9cddfad 100644 --- a/ibm/service/mqcloud/resource_ibm_mqcloud_keystore_certificate_test.go +++ b/ibm/service/mqcloud/resource_ibm_mqcloud_keystore_certificate_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/mqcloud/resource_ibm_mqcloud_queue_manager.go b/ibm/service/mqcloud/resource_ibm_mqcloud_queue_manager.go index 46c954af7c..1022b96f09 100644 --- a/ibm/service/mqcloud/resource_ibm_mqcloud_queue_manager.go +++ b/ibm/service/mqcloud/resource_ibm_mqcloud_queue_manager.go @@ -14,7 +14,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -264,13 +264,13 @@ func resourceIbmMqcloudQueueManagerRead(context context.Context, d *schema.Resou var queueManagerDetails *mqcloudv1.QueueManagerDetails var response *core.DetailedResponse - err = resource.RetryContext(context, 150*time.Second, func() *resource.RetryError { + err = retry.RetryContext(context, 150*time.Second, func() *retry.RetryError { queueManagerDetails, response, err = mqcloudClient.GetQueueManagerWithContext(context, getQueueManagerOptions) if err != nil || queueManagerDetails == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(fmt.Errorf("Queue Manager not found, retrying")) + return retry.RetryableError(fmt.Errorf("Queue Manager not found, retrying")) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil diff --git a/ibm/service/mqcloud/resource_ibm_mqcloud_queue_manager_test.go b/ibm/service/mqcloud/resource_ibm_mqcloud_queue_manager_test.go index 6667e40693..719c82bc98 100644 --- a/ibm/service/mqcloud/resource_ibm_mqcloud_queue_manager_test.go +++ b/ibm/service/mqcloud/resource_ibm_mqcloud_queue_manager_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/mqcloud/resource_ibm_mqcloud_truststore_certificate_test.go b/ibm/service/mqcloud/resource_ibm_mqcloud_truststore_certificate_test.go index eb17f3f3a0..4e423a9ec4 100644 --- a/ibm/service/mqcloud/resource_ibm_mqcloud_truststore_certificate_test.go +++ b/ibm/service/mqcloud/resource_ibm_mqcloud_truststore_certificate_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/mqcloud/resource_ibm_mqcloud_user_test.go b/ibm/service/mqcloud/resource_ibm_mqcloud_user_test.go index e732d993a9..d74d4a8ea3 100644 --- a/ibm/service/mqcloud/resource_ibm_mqcloud_user_test.go +++ b/ibm/service/mqcloud/resource_ibm_mqcloud_user_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/mqcloud/resource_ibm_mqcloud_virtual_private_endpoint_gateway_test.go b/ibm/service/mqcloud/resource_ibm_mqcloud_virtual_private_endpoint_gateway_test.go index 5c980cf794..c505d95074 100644 --- a/ibm/service/mqcloud/resource_ibm_mqcloud_virtual_private_endpoint_gateway_test.go +++ b/ibm/service/mqcloud/resource_ibm_mqcloud_virtual_private_endpoint_gateway_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/mqcloud/utils.go b/ibm/service/mqcloud/utils.go index fe2222b387..dcf5935cd0 100644 --- a/ibm/service/mqcloud/utils.go +++ b/ibm/service/mqcloud/utils.go @@ -13,9 +13,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/platform-services-go-sdk/resourcecontrollerv2" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/IBM/mqcloud-go-sdk/mqcloudv1" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -43,7 +43,7 @@ func waitForQmStatusUpdate(context context.Context, d *schema.ResourceData, meta return "", err } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{qmCreating}, Target: []string{qmStatus}, Refresh: func() (interface{}, string, error) { @@ -82,7 +82,7 @@ func waitForQueueManagerToDelete(context context.Context, d *schema.ResourceData return false, err } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isQueueManagerDeleting}, Target: []string{isQueueManagerDeleteDone}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/pag/resource_ibm_pag_instance_test.go b/ibm/service/pag/resource_ibm_pag_instance_test.go index 22b8d96656..1a194d5f2f 100644 --- a/ibm/service/pag/resource_ibm_pag_instance_test.go +++ b/ibm/service/pag/resource_ibm_pag_instance_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" rc "github.com/IBM/platform-services-go-sdk/resourcecontrollerv2" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMResourceInstanceBasic(t *testing.T) { diff --git a/ibm/service/partnercentersell/resource_ibm_onboarding_catalog_deployment_test.go b/ibm/service/partnercentersell/resource_ibm_onboarding_catalog_deployment_test.go index 94969554c8..a56f1f25bd 100644 --- a/ibm/service/partnercentersell/resource_ibm_onboarding_catalog_deployment_test.go +++ b/ibm/service/partnercentersell/resource_ibm_onboarding_catalog_deployment_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/partnercentersell/resource_ibm_onboarding_catalog_plan_test.go b/ibm/service/partnercentersell/resource_ibm_onboarding_catalog_plan_test.go index c7d144573d..940a15e87f 100644 --- a/ibm/service/partnercentersell/resource_ibm_onboarding_catalog_plan_test.go +++ b/ibm/service/partnercentersell/resource_ibm_onboarding_catalog_plan_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/partnercentersell/resource_ibm_onboarding_catalog_product_test.go b/ibm/service/partnercentersell/resource_ibm_onboarding_catalog_product_test.go index cb8d8e520a..8a89ae3c2f 100644 --- a/ibm/service/partnercentersell/resource_ibm_onboarding_catalog_product_test.go +++ b/ibm/service/partnercentersell/resource_ibm_onboarding_catalog_product_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/partnercentersell/resource_ibm_onboarding_iam_registration_test.go b/ibm/service/partnercentersell/resource_ibm_onboarding_iam_registration_test.go index beb4091ca8..d239ad0c3e 100644 --- a/ibm/service/partnercentersell/resource_ibm_onboarding_iam_registration_test.go +++ b/ibm/service/partnercentersell/resource_ibm_onboarding_iam_registration_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/partnercentersell/resource_ibm_onboarding_product_test.go b/ibm/service/partnercentersell/resource_ibm_onboarding_product_test.go index 8666264901..315dcea87c 100644 --- a/ibm/service/partnercentersell/resource_ibm_onboarding_product_test.go +++ b/ibm/service/partnercentersell/resource_ibm_onboarding_product_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/partnercentersell/resource_ibm_onboarding_registration_test.go b/ibm/service/partnercentersell/resource_ibm_onboarding_registration_test.go index b0e9ce9aa4..d2e925d421 100644 --- a/ibm/service/partnercentersell/resource_ibm_onboarding_registration_test.go +++ b/ibm/service/partnercentersell/resource_ibm_onboarding_registration_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/partnercentersell/resource_ibm_onboarding_resource_broker_test.go b/ibm/service/partnercentersell/resource_ibm_onboarding_resource_broker_test.go index 463d94a714..ed7b181397 100644 --- a/ibm/service/partnercentersell/resource_ibm_onboarding_resource_broker_test.go +++ b/ibm/service/partnercentersell/resource_ibm_onboarding_resource_broker_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/power/data_source_ibm_pi_available_hosts_test.go b/ibm/service/power/data_source_ibm_pi_available_hosts_test.go index 3739a3839c..eb694c4bde 100644 --- a/ibm/service/power/data_source_ibm_pi_available_hosts_test.go +++ b/ibm/service/power/data_source_ibm_pi_available_hosts_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/power/data_source_ibm_pi_catalog_images_test.go b/ibm/service/power/data_source_ibm_pi_catalog_images_test.go index f317397229..43c7b131c6 100644 --- a/ibm/service/power/data_source_ibm_pi_catalog_images_test.go +++ b/ibm/service/power/data_source_ibm_pi_catalog_images_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func testAccCheckIBMPICatalogImagesDataSourceBasicConfig() string { diff --git a/ibm/service/power/data_source_ibm_pi_cloud_connection_test.go b/ibm/service/power/data_source_ibm_pi_cloud_connection_test.go index 60eda0cb08..148e91b73a 100644 --- a/ibm/service/power/data_source_ibm_pi_cloud_connection_test.go +++ b/ibm/service/power/data_source_ibm_pi_cloud_connection_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPICloudConnectionDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_cloud_connections_test.go b/ibm/service/power/data_source_ibm_pi_cloud_connections_test.go index 9f53a57bcf..83d19e10eb 100644 --- a/ibm/service/power/data_source_ibm_pi_cloud_connections_test.go +++ b/ibm/service/power/data_source_ibm_pi_cloud_connections_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPICloudConnectionsDataSourceBasic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_cloud_instance_test.go b/ibm/service/power/data_source_ibm_pi_cloud_instance_test.go index d2f0b69db9..b2fe1aca68 100644 --- a/ibm/service/power/data_source_ibm_pi_cloud_instance_test.go +++ b/ibm/service/power/data_source_ibm_pi_cloud_instance_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPICloudInstanceDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_datacenter_test.go b/ibm/service/power/data_source_ibm_pi_datacenter_test.go index 688fe0b0b4..a1060ce01f 100644 --- a/ibm/service/power/data_source_ibm_pi_datacenter_test.go +++ b/ibm/service/power/data_source_ibm_pi_datacenter_test.go @@ -8,7 +8,7 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIDatacenterDataSourceBasic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_datacenters_test.go b/ibm/service/power/data_source_ibm_pi_datacenters_test.go index 4647dd5d91..66ad15c0d8 100644 --- a/ibm/service/power/data_source_ibm_pi_datacenters_test.go +++ b/ibm/service/power/data_source_ibm_pi_datacenters_test.go @@ -8,7 +8,7 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIDatacentersDataSourceBasic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_dhcp_test.go b/ibm/service/power/data_source_ibm_pi_dhcp_test.go index 76eecbe42f..b462f0ebff 100644 --- a/ibm/service/power/data_source_ibm_pi_dhcp_test.go +++ b/ibm/service/power/data_source_ibm_pi_dhcp_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIDhcpDataSourceBasic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_dhcps_test.go b/ibm/service/power/data_source_ibm_pi_dhcps_test.go index ec787992ea..572e486306 100644 --- a/ibm/service/power/data_source_ibm_pi_dhcps_test.go +++ b/ibm/service/power/data_source_ibm_pi_dhcps_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIDhcpServersDataSourceBasic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_disaster_recovery_location_test.go b/ibm/service/power/data_source_ibm_pi_disaster_recovery_location_test.go index ef7f68307e..026501e95a 100644 --- a/ibm/service/power/data_source_ibm_pi_disaster_recovery_location_test.go +++ b/ibm/service/power/data_source_ibm_pi_disaster_recovery_location_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIDisasterRecoveryLocationDataSourceBasic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_disaster_recovery_locations_test.go b/ibm/service/power/data_source_ibm_pi_disaster_recovery_locations_test.go index 49b3e3b47f..1559ee1710 100644 --- a/ibm/service/power/data_source_ibm_pi_disaster_recovery_locations_test.go +++ b/ibm/service/power/data_source_ibm_pi_disaster_recovery_locations_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIDisasterRecoveryLocationsDataSourceBasic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_host_group_test.go b/ibm/service/power/data_source_ibm_pi_host_group_test.go index 78e04ce5b4..fca0ae1652 100644 --- a/ibm/service/power/data_source_ibm_pi_host_group_test.go +++ b/ibm/service/power/data_source_ibm_pi_host_group_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/power/data_source_ibm_pi_host_groups_test.go b/ibm/service/power/data_source_ibm_pi_host_groups_test.go index 901eba2830..5f20321c3c 100644 --- a/ibm/service/power/data_source_ibm_pi_host_groups_test.go +++ b/ibm/service/power/data_source_ibm_pi_host_groups_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/power/data_source_ibm_pi_host_test.go b/ibm/service/power/data_source_ibm_pi_host_test.go index b8d9c775a2..166c3d2a42 100644 --- a/ibm/service/power/data_source_ibm_pi_host_test.go +++ b/ibm/service/power/data_source_ibm_pi_host_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/power/data_source_ibm_pi_hosts_test.go b/ibm/service/power/data_source_ibm_pi_hosts_test.go index 91d18be785..890cccf203 100644 --- a/ibm/service/power/data_source_ibm_pi_hosts_test.go +++ b/ibm/service/power/data_source_ibm_pi_hosts_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/power/data_source_ibm_pi_image_test.go b/ibm/service/power/data_source_ibm_pi_image_test.go index 734d3b71b7..76392f4645 100644 --- a/ibm/service/power/data_source_ibm_pi_image_test.go +++ b/ibm/service/power/data_source_ibm_pi_image_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIImageDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_images_test.go b/ibm/service/power/data_source_ibm_pi_images_test.go index ee670de149..cbf3920102 100644 --- a/ibm/service/power/data_source_ibm_pi_images_test.go +++ b/ibm/service/power/data_source_ibm_pi_images_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIImagesDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_instance_console_languages_test.go b/ibm/service/power/data_source_ibm_pi_instance_console_languages_test.go index 9d52aa963f..907be12876 100644 --- a/ibm/service/power/data_source_ibm_pi_instance_console_languages_test.go +++ b/ibm/service/power/data_source_ibm_pi_instance_console_languages_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIInstanceConsoleLanguages(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_instance_ip_test.go b/ibm/service/power/data_source_ibm_pi_instance_ip_test.go index b8963ee639..739240240c 100644 --- a/ibm/service/power/data_source_ibm_pi_instance_ip_test.go +++ b/ibm/service/power/data_source_ibm_pi_instance_ip_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIInstanceIPDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_instance_snapshot_test.go b/ibm/service/power/data_source_ibm_pi_instance_snapshot_test.go index 18369bfcda..717fbe2f1e 100644 --- a/ibm/service/power/data_source_ibm_pi_instance_snapshot_test.go +++ b/ibm/service/power/data_source_ibm_pi_instance_snapshot_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIInstanceSnapshotDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_instance_snapshots_test.go b/ibm/service/power/data_source_ibm_pi_instance_snapshots_test.go index df3b994096..864a77cdca 100644 --- a/ibm/service/power/data_source_ibm_pi_instance_snapshots_test.go +++ b/ibm/service/power/data_source_ibm_pi_instance_snapshots_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIInstanceSnapshotsDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_instance_test.go b/ibm/service/power/data_source_ibm_pi_instance_test.go index 080692e296..7f0da0a40d 100644 --- a/ibm/service/power/data_source_ibm_pi_instance_test.go +++ b/ibm/service/power/data_source_ibm_pi_instance_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIInstanceDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_instance_volumes_test.go b/ibm/service/power/data_source_ibm_pi_instance_volumes_test.go index 10543c5a66..e3891fb218 100644 --- a/ibm/service/power/data_source_ibm_pi_instance_volumes_test.go +++ b/ibm/service/power/data_source_ibm_pi_instance_volumes_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIVolumesDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_instances_test.go b/ibm/service/power/data_source_ibm_pi_instances_test.go index cf1dfe786f..5b0b8e0766 100644 --- a/ibm/service/power/data_source_ibm_pi_instances_test.go +++ b/ibm/service/power/data_source_ibm_pi_instances_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIInstancesDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_key_test.go b/ibm/service/power/data_source_ibm_pi_key_test.go index a4fb373339..83cfd0951f 100644 --- a/ibm/service/power/data_source_ibm_pi_key_test.go +++ b/ibm/service/power/data_source_ibm_pi_key_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIKeyDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_keys_test.go b/ibm/service/power/data_source_ibm_pi_keys_test.go index 66bb6c4596..e909d5c387 100644 --- a/ibm/service/power/data_source_ibm_pi_keys_test.go +++ b/ibm/service/power/data_source_ibm_pi_keys_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIKeysDataSourceBasic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_network_address_group_test.go b/ibm/service/power/data_source_ibm_pi_network_address_group_test.go index d076aa5100..522aa5ca01 100644 --- a/ibm/service/power/data_source_ibm_pi_network_address_group_test.go +++ b/ibm/service/power/data_source_ibm_pi_network_address_group_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/power/data_source_ibm_pi_network_address_groups_test.go b/ibm/service/power/data_source_ibm_pi_network_address_groups_test.go index fdb1f2c34f..00d30bd7d3 100644 --- a/ibm/service/power/data_source_ibm_pi_network_address_groups_test.go +++ b/ibm/service/power/data_source_ibm_pi_network_address_groups_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/power/data_source_ibm_pi_network_interface_test.go b/ibm/service/power/data_source_ibm_pi_network_interface_test.go index 599558207e..72ec64b5d8 100644 --- a/ibm/service/power/data_source_ibm_pi_network_interface_test.go +++ b/ibm/service/power/data_source_ibm_pi_network_interface_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/power" diff --git a/ibm/service/power/data_source_ibm_pi_network_interfaces_test.go b/ibm/service/power/data_source_ibm_pi_network_interfaces_test.go index 03e16df20d..b9f2704cde 100644 --- a/ibm/service/power/data_source_ibm_pi_network_interfaces_test.go +++ b/ibm/service/power/data_source_ibm_pi_network_interfaces_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/power/data_source_ibm_pi_network_peers_test.go b/ibm/service/power/data_source_ibm_pi_network_peers_test.go index 0493065877..6e553a6be3 100644 --- a/ibm/service/power/data_source_ibm_pi_network_peers_test.go +++ b/ibm/service/power/data_source_ibm_pi_network_peers_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/power/data_source_ibm_pi_network_port_test.go b/ibm/service/power/data_source_ibm_pi_network_port_test.go index 24a386af2d..13dbd8b1ff 100644 --- a/ibm/service/power/data_source_ibm_pi_network_port_test.go +++ b/ibm/service/power/data_source_ibm_pi_network_port_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPINetworkPortDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_network_security_group_test.go b/ibm/service/power/data_source_ibm_pi_network_security_group_test.go index 4bb77b59d9..d1229551c5 100644 --- a/ibm/service/power/data_source_ibm_pi_network_security_group_test.go +++ b/ibm/service/power/data_source_ibm_pi_network_security_group_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/power/data_source_ibm_pi_network_security_groups_test.go b/ibm/service/power/data_source_ibm_pi_network_security_groups_test.go index 7d3c9abf05..98f5cf6cfa 100644 --- a/ibm/service/power/data_source_ibm_pi_network_security_groups_test.go +++ b/ibm/service/power/data_source_ibm_pi_network_security_groups_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/power/data_source_ibm_pi_network_test.go b/ibm/service/power/data_source_ibm_pi_network_test.go index 9cb5fa3c72..fd5a830c68 100644 --- a/ibm/service/power/data_source_ibm_pi_network_test.go +++ b/ibm/service/power/data_source_ibm_pi_network_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPINetworkDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_networks_test.go b/ibm/service/power/data_source_ibm_pi_networks_test.go index 2d53f2e73b..a48a1b4f16 100644 --- a/ibm/service/power/data_source_ibm_pi_networks_test.go +++ b/ibm/service/power/data_source_ibm_pi_networks_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPINetworksDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_placement_group_test.go b/ibm/service/power/data_source_ibm_pi_placement_group_test.go index 05478cc72a..3dc0049398 100644 --- a/ibm/service/power/data_source_ibm_pi_placement_group_test.go +++ b/ibm/service/power/data_source_ibm_pi_placement_group_test.go @@ -8,7 +8,7 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIPlacementGroupDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_placement_groups_test.go b/ibm/service/power/data_source_ibm_pi_placement_groups_test.go index d520f3f1e0..c1c28e5614 100644 --- a/ibm/service/power/data_source_ibm_pi_placement_groups_test.go +++ b/ibm/service/power/data_source_ibm_pi_placement_groups_test.go @@ -8,7 +8,7 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIPlacementGrousDataSourceBasic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_public_network_test.go b/ibm/service/power/data_source_ibm_pi_public_network_test.go index 3062b232de..f12aa3b23d 100644 --- a/ibm/service/power/data_source_ibm_pi_public_network_test.go +++ b/ibm/service/power/data_source_ibm_pi_public_network_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIPublicNetworkDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_pvm_snapshot_test.go b/ibm/service/power/data_source_ibm_pi_pvm_snapshot_test.go index 0394b660a7..6f8069ede9 100644 --- a/ibm/service/power/data_source_ibm_pi_pvm_snapshot_test.go +++ b/ibm/service/power/data_source_ibm_pi_pvm_snapshot_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPISnapshotDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_sap_profile_test.go b/ibm/service/power/data_source_ibm_pi_sap_profile_test.go index dc4026bdfd..3f2b809aca 100644 --- a/ibm/service/power/data_source_ibm_pi_sap_profile_test.go +++ b/ibm/service/power/data_source_ibm_pi_sap_profile_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPISAPProfileDataSourceBasic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_sap_profiles_test.go b/ibm/service/power/data_source_ibm_pi_sap_profiles_test.go index 1fca79fe3c..69d45cc65b 100644 --- a/ibm/service/power/data_source_ibm_pi_sap_profiles_test.go +++ b/ibm/service/power/data_source_ibm_pi_sap_profiles_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPISAPProfilesDataSourceBasic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_shared_processor_pool_test.go b/ibm/service/power/data_source_ibm_pi_shared_processor_pool_test.go index 17df24c366..fa3711af6a 100644 --- a/ibm/service/power/data_source_ibm_pi_shared_processor_pool_test.go +++ b/ibm/service/power/data_source_ibm_pi_shared_processor_pool_test.go @@ -8,7 +8,7 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIPISharedProcessorPoolDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_shared_processor_pools_test.go b/ibm/service/power/data_source_ibm_pi_shared_processor_pools_test.go index 1d5367bf85..0e673e2585 100644 --- a/ibm/service/power/data_source_ibm_pi_shared_processor_pools_test.go +++ b/ibm/service/power/data_source_ibm_pi_shared_processor_pools_test.go @@ -8,7 +8,7 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPISharedProcessorPoolsDataSourceBasic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_spp_placement_group_test.go b/ibm/service/power/data_source_ibm_pi_spp_placement_group_test.go index 515a72b089..2fe5ba0d8a 100644 --- a/ibm/service/power/data_source_ibm_pi_spp_placement_group_test.go +++ b/ibm/service/power/data_source_ibm_pi_spp_placement_group_test.go @@ -8,7 +8,7 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPISPPPlacementGroupDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_spp_placement_groups_test.go b/ibm/service/power/data_source_ibm_pi_spp_placement_groups_test.go index 83b0a789ec..afb3b5b880 100644 --- a/ibm/service/power/data_source_ibm_pi_spp_placement_groups_test.go +++ b/ibm/service/power/data_source_ibm_pi_spp_placement_groups_test.go @@ -8,7 +8,7 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPISPPPlacementGroupsDataSourceBasic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_storage_pool_capacity_test.go b/ibm/service/power/data_source_ibm_pi_storage_pool_capacity_test.go index 1e202983fe..4791f6291a 100644 --- a/ibm/service/power/data_source_ibm_pi_storage_pool_capacity_test.go +++ b/ibm/service/power/data_source_ibm_pi_storage_pool_capacity_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIStoragePoolCapacityDataSourceBasic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_storage_pools_capacity_test.go b/ibm/service/power/data_source_ibm_pi_storage_pools_capacity_test.go index 2cb4d6185c..f063f160ff 100644 --- a/ibm/service/power/data_source_ibm_pi_storage_pools_capacity_test.go +++ b/ibm/service/power/data_source_ibm_pi_storage_pools_capacity_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIStoragePoolsCapacityDataSourceBasic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_storage_tiers_test.go b/ibm/service/power/data_source_ibm_pi_storage_tiers_test.go index 143d6f95b3..57dc25c01f 100644 --- a/ibm/service/power/data_source_ibm_pi_storage_tiers_test.go +++ b/ibm/service/power/data_source_ibm_pi_storage_tiers_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/power/data_source_ibm_pi_storage_type_capacity_test.go b/ibm/service/power/data_source_ibm_pi_storage_type_capacity_test.go index 424e777a6b..3b237e531b 100644 --- a/ibm/service/power/data_source_ibm_pi_storage_type_capacity_test.go +++ b/ibm/service/power/data_source_ibm_pi_storage_type_capacity_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIStorageTypeCapacityDataSourceBasic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_storage_types_capacity_test.go b/ibm/service/power/data_source_ibm_pi_storage_types_capacity_test.go index 0528d281bc..5ee980420b 100644 --- a/ibm/service/power/data_source_ibm_pi_storage_types_capacity_test.go +++ b/ibm/service/power/data_source_ibm_pi_storage_types_capacity_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIStorageTypesCapacityDataSourceBasic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_system_pools_test.go b/ibm/service/power/data_source_ibm_pi_system_pools_test.go index 606b435159..7188243523 100644 --- a/ibm/service/power/data_source_ibm_pi_system_pools_test.go +++ b/ibm/service/power/data_source_ibm_pi_system_pools_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPISystemPoolsDataSourceBasic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_tenant_test.go b/ibm/service/power/data_source_ibm_pi_tenant_test.go index d0d52a4e89..eca716a1d9 100644 --- a/ibm/service/power/data_source_ibm_pi_tenant_test.go +++ b/ibm/service/power/data_source_ibm_pi_tenant_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPITenantDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_volume_clone_test.go b/ibm/service/power/data_source_ibm_pi_volume_clone_test.go index 22ba0259ab..f6fd9ba04f 100644 --- a/ibm/service/power/data_source_ibm_pi_volume_clone_test.go +++ b/ibm/service/power/data_source_ibm_pi_volume_clone_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIVolumeClone_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_volume_flash_copy_mappings_test.go b/ibm/service/power/data_source_ibm_pi_volume_flash_copy_mappings_test.go index 3d77b0ec4d..3c71b8fb96 100644 --- a/ibm/service/power/data_source_ibm_pi_volume_flash_copy_mappings_test.go +++ b/ibm/service/power/data_source_ibm_pi_volume_flash_copy_mappings_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIVolumeFlashCopyMappingsDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_volume_group_details_test.go b/ibm/service/power/data_source_ibm_pi_volume_group_details_test.go index 90153d4b73..b3c30aca53 100644 --- a/ibm/service/power/data_source_ibm_pi_volume_group_details_test.go +++ b/ibm/service/power/data_source_ibm_pi_volume_group_details_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIVolumeGroupDetailsDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_volume_group_remote_copy_relationships_test.go b/ibm/service/power/data_source_ibm_pi_volume_group_remote_copy_relationships_test.go index dcbd95aad8..16a7e7fde5 100644 --- a/ibm/service/power/data_source_ibm_pi_volume_group_remote_copy_relationships_test.go +++ b/ibm/service/power/data_source_ibm_pi_volume_group_remote_copy_relationships_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIVolumeGroupRemoteCopyRelationshipsDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_volume_group_storage_details_test.go b/ibm/service/power/data_source_ibm_pi_volume_group_storage_details_test.go index 10c6a6f784..870e5b7434 100644 --- a/ibm/service/power/data_source_ibm_pi_volume_group_storage_details_test.go +++ b/ibm/service/power/data_source_ibm_pi_volume_group_storage_details_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIVolumeGroupStorageDetailsDataSourceBasic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_volume_group_test.go b/ibm/service/power/data_source_ibm_pi_volume_group_test.go index 34a0182257..daf291c819 100644 --- a/ibm/service/power/data_source_ibm_pi_volume_group_test.go +++ b/ibm/service/power/data_source_ibm_pi_volume_group_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIVolumeGroupDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_volume_groups_details_test.go b/ibm/service/power/data_source_ibm_pi_volume_groups_details_test.go index d0418110a8..53212aa656 100644 --- a/ibm/service/power/data_source_ibm_pi_volume_groups_details_test.go +++ b/ibm/service/power/data_source_ibm_pi_volume_groups_details_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIVolumeGroupsDetailsDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_volume_groups_test.go b/ibm/service/power/data_source_ibm_pi_volume_groups_test.go index c1f9338511..d142b5fae0 100644 --- a/ibm/service/power/data_source_ibm_pi_volume_groups_test.go +++ b/ibm/service/power/data_source_ibm_pi_volume_groups_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIVolumeGroupsDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_volume_onboarding_test.go b/ibm/service/power/data_source_ibm_pi_volume_onboarding_test.go index 861148e976..d8f2578ac7 100644 --- a/ibm/service/power/data_source_ibm_pi_volume_onboarding_test.go +++ b/ibm/service/power/data_source_ibm_pi_volume_onboarding_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIVolumeOnboardingDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_volume_onboardings_test.go b/ibm/service/power/data_source_ibm_pi_volume_onboardings_test.go index c784204bb0..a469dddb86 100644 --- a/ibm/service/power/data_source_ibm_pi_volume_onboardings_test.go +++ b/ibm/service/power/data_source_ibm_pi_volume_onboardings_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIVolumeOnboardingsDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_volume_remote_copy_relationship_test.go b/ibm/service/power/data_source_ibm_pi_volume_remote_copy_relationship_test.go index 5b98a49a94..073a822796 100644 --- a/ibm/service/power/data_source_ibm_pi_volume_remote_copy_relationship_test.go +++ b/ibm/service/power/data_source_ibm_pi_volume_remote_copy_relationship_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIVolumeRemoteCopyRelationshipDataSource_basics(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_volume_snapshot_test.go b/ibm/service/power/data_source_ibm_pi_volume_snapshot_test.go index 2b974cb803..a940d1aedd 100644 --- a/ibm/service/power/data_source_ibm_pi_volume_snapshot_test.go +++ b/ibm/service/power/data_source_ibm_pi_volume_snapshot_test.go @@ -8,7 +8,7 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIVolumeSnapshotDataSourceBasic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_volume_snapshots_test.go b/ibm/service/power/data_source_ibm_pi_volume_snapshots_test.go index 356e412652..067e2b27d2 100644 --- a/ibm/service/power/data_source_ibm_pi_volume_snapshots_test.go +++ b/ibm/service/power/data_source_ibm_pi_volume_snapshots_test.go @@ -8,7 +8,7 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIVolumeSnapshotsDataSourceBasic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_volume_test.go b/ibm/service/power/data_source_ibm_pi_volume_test.go index f40fb2dca8..1562d39898 100644 --- a/ibm/service/power/data_source_ibm_pi_volume_test.go +++ b/ibm/service/power/data_source_ibm_pi_volume_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIVolumeDataSource_basic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_workspace_test.go b/ibm/service/power/data_source_ibm_pi_workspace_test.go index 4a7df8e63a..2fcfd9fe06 100644 --- a/ibm/service/power/data_source_ibm_pi_workspace_test.go +++ b/ibm/service/power/data_source_ibm_pi_workspace_test.go @@ -8,7 +8,7 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIWorkspaceDataSourceBasic(t *testing.T) { diff --git a/ibm/service/power/data_source_ibm_pi_workspaces_test.go b/ibm/service/power/data_source_ibm_pi_workspaces_test.go index 10b38e677a..fed448662a 100644 --- a/ibm/service/power/data_source_ibm_pi_workspaces_test.go +++ b/ibm/service/power/data_source_ibm_pi_workspaces_test.go @@ -8,7 +8,7 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIWorkspacesDataSourceBasic(t *testing.T) { diff --git a/ibm/service/power/resource_ibm_pi_capture_test.go b/ibm/service/power/resource_ibm_pi_capture_test.go index e66401efa6..2a6917dd4a 100644 --- a/ibm/service/power/resource_ibm_pi_capture_test.go +++ b/ibm/service/power/resource_ibm_pi_capture_test.go @@ -14,9 +14,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMPICaptureBasic(t *testing.T) { diff --git a/ibm/service/power/resource_ibm_pi_cloud_connection_network_attach_test.go b/ibm/service/power/resource_ibm_pi_cloud_connection_network_attach_test.go index d951b02a47..437944bcca 100644 --- a/ibm/service/power/resource_ibm_pi_cloud_connection_network_attach_test.go +++ b/ibm/service/power/resource_ibm_pi_cloud_connection_network_attach_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPICloudConnectionNetworkAttachBasic(t *testing.T) { diff --git a/ibm/service/power/resource_ibm_pi_cloud_connection_test.go b/ibm/service/power/resource_ibm_pi_cloud_connection_test.go index a70f85763f..3be4e79869 100644 --- a/ibm/service/power/resource_ibm_pi_cloud_connection_test.go +++ b/ibm/service/power/resource_ibm_pi_cloud_connection_test.go @@ -13,9 +13,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" st "github.com/IBM-Cloud/power-go-client/clients/instance" ) diff --git a/ibm/service/power/resource_ibm_pi_dhcp_test.go b/ibm/service/power/resource_ibm_pi_dhcp_test.go index 87ecc8a512..110cc67332 100644 --- a/ibm/service/power/resource_ibm_pi_dhcp_test.go +++ b/ibm/service/power/resource_ibm_pi_dhcp_test.go @@ -13,9 +13,9 @@ import ( "github.com/IBM-Cloud/power-go-client/clients/instance" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMPIDhcpbasic(t *testing.T) { diff --git a/ibm/service/power/resource_ibm_pi_host_group_test.go b/ibm/service/power/resource_ibm_pi_host_group_test.go index 11bb34d989..98a8449fc0 100644 --- a/ibm/service/power/resource_ibm_pi_host_group_test.go +++ b/ibm/service/power/resource_ibm_pi_host_group_test.go @@ -9,9 +9,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM-Cloud/power-go-client/clients/instance" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" diff --git a/ibm/service/power/resource_ibm_pi_host_test.go b/ibm/service/power/resource_ibm_pi_host_test.go index 1ca0fd9018..0d8a347ed0 100644 --- a/ibm/service/power/resource_ibm_pi_host_test.go +++ b/ibm/service/power/resource_ibm_pi_host_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/power-go-client/clients/instance" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMIHostBasic(t *testing.T) { diff --git a/ibm/service/power/resource_ibm_pi_ike_policy_test.go b/ibm/service/power/resource_ibm_pi_ike_policy_test.go index 4738d14731..54b1192d45 100644 --- a/ibm/service/power/resource_ibm_pi_ike_policy_test.go +++ b/ibm/service/power/resource_ibm_pi_ike_policy_test.go @@ -12,9 +12,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" st "github.com/IBM-Cloud/power-go-client/clients/instance" ) diff --git a/ibm/service/power/resource_ibm_pi_image.go b/ibm/service/power/resource_ibm_pi_image.go index eb770c72d5..695f978bf9 100644 --- a/ibm/service/power/resource_ibm_pi_image.go +++ b/ibm/service/power/resource_ibm_pi_image.go @@ -12,7 +12,7 @@ import ( "github.com/IBM/go-sdk-core/v5/core" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" st "github.com/IBM-Cloud/power-go-client/clients/instance" @@ -450,7 +450,7 @@ func resourceIBMPIImageDelete(ctx context.Context, d *schema.ResourceData, meta func isWaitForIBMPIImageAvailable(ctx context.Context, client *st.IBMPIImageClient, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for Power Image (%s) to be available.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", helpers.PIImageQueStatus}, Target: []string{helpers.PIImageActiveStatus}, Refresh: isIBMPIImageRefreshFunc(ctx, client, id), @@ -462,7 +462,7 @@ func isWaitForIBMPIImageAvailable(ctx context.Context, client *st.IBMPIImageClie return stateConf.WaitForStateContext(ctx) } -func isIBMPIImageRefreshFunc(ctx context.Context, client *st.IBMPIImageClient, id string) resource.StateRefreshFunc { +func isIBMPIImageRefreshFunc(ctx context.Context, client *st.IBMPIImageClient, id string) retry.StateRefreshFunc { log.Printf("Calling the isIBMPIImageRefreshFunc Refresh Function....") return func() (interface{}, string, error) { @@ -480,7 +480,7 @@ func isIBMPIImageRefreshFunc(ctx context.Context, client *st.IBMPIImageClient, i } func waitForIBMPIJobCompleted(ctx context.Context, client *st.IBMPIJobClient, jobID string, timeout time.Duration) (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{helpers.JobStatusQueued, helpers.JobStatusReadyForProcessing, helpers.JobStatusInProgress, helpers.JobStatusRunning, helpers.JobStatusWaiting}, Target: []string{helpers.JobStatusCompleted, helpers.JobStatusFailed}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/power/resource_ibm_pi_image_export_test.go b/ibm/service/power/resource_ibm_pi_image_export_test.go index 82def95b39..6141a74587 100644 --- a/ibm/service/power/resource_ibm_pi_image_export_test.go +++ b/ibm/service/power/resource_ibm_pi_image_export_test.go @@ -8,7 +8,7 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIImageEport(t *testing.T) { diff --git a/ibm/service/power/resource_ibm_pi_image_test.go b/ibm/service/power/resource_ibm_pi_image_test.go index 5c4d8c4450..edf9218aca 100644 --- a/ibm/service/power/resource_ibm_pi_image_test.go +++ b/ibm/service/power/resource_ibm_pi_image_test.go @@ -12,9 +12,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" st "github.com/IBM-Cloud/power-go-client/clients/instance" ) diff --git a/ibm/service/power/resource_ibm_pi_instance_action_test.go b/ibm/service/power/resource_ibm_pi_instance_action_test.go index 48fe0832dd..8ede9fc274 100644 --- a/ibm/service/power/resource_ibm_pi_instance_action_test.go +++ b/ibm/service/power/resource_ibm_pi_instance_action_test.go @@ -11,8 +11,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/power" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIInstanceAction(t *testing.T) { diff --git a/ibm/service/power/resource_ibm_pi_instance_console_language_test.go b/ibm/service/power/resource_ibm_pi_instance_console_language_test.go index 4cd83e1862..0f642feeb4 100644 --- a/ibm/service/power/resource_ibm_pi_instance_console_language_test.go +++ b/ibm/service/power/resource_ibm_pi_instance_console_language_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPIInstanceConsoleLanguage(t *testing.T) { diff --git a/ibm/service/power/resource_ibm_pi_instance_test.go b/ibm/service/power/resource_ibm_pi_instance_test.go index 7c2974f1d2..68e8bc7786 100644 --- a/ibm/service/power/resource_ibm_pi_instance_test.go +++ b/ibm/service/power/resource_ibm_pi_instance_test.go @@ -16,9 +16,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/power" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" st "github.com/IBM-Cloud/power-go-client/clients/instance" ) diff --git a/ibm/service/power/resource_ibm_pi_ipsec_policy_test.go b/ibm/service/power/resource_ibm_pi_ipsec_policy_test.go index 0c88c2679f..adf947a99e 100644 --- a/ibm/service/power/resource_ibm_pi_ipsec_policy_test.go +++ b/ibm/service/power/resource_ibm_pi_ipsec_policy_test.go @@ -12,9 +12,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" st "github.com/IBM-Cloud/power-go-client/clients/instance" ) diff --git a/ibm/service/power/resource_ibm_pi_key_test.go b/ibm/service/power/resource_ibm_pi_key_test.go index 1059989ddf..8c25deec1e 100644 --- a/ibm/service/power/resource_ibm_pi_key_test.go +++ b/ibm/service/power/resource_ibm_pi_key_test.go @@ -14,9 +14,9 @@ import ( "github.com/IBM-Cloud/power-go-client/clients/instance" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMPIKey_basic(t *testing.T) { diff --git a/ibm/service/power/resource_ibm_pi_network.go b/ibm/service/power/resource_ibm_pi_network.go index b336156aa9..b89bb52ee6 100644 --- a/ibm/service/power/resource_ibm_pi_network.go +++ b/ibm/service/power/resource_ibm_pi_network.go @@ -14,7 +14,6 @@ import ( "github.com/apparentlymart/go-cidr/cidr" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" @@ -460,7 +459,7 @@ func resourceIBMPINetworkDelete(ctx context.Context, d *schema.ResourceData, met } func isWaitForIBMPINetworkAvailable(ctx context.Context, client *instance.IBMPINetworkClient, id string, timeout time.Duration) (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", helpers.PINetworkProvisioning}, Target: []string{"NETWORK_READY"}, Refresh: isIBMPINetworkRefreshFunc(client, id), @@ -472,7 +471,7 @@ func isWaitForIBMPINetworkAvailable(ctx context.Context, client *instance.IBMPIN return stateConf.WaitForStateContext(ctx) } -func isIBMPINetworkRefreshFunc(client *instance.IBMPINetworkClient, id string) resource.StateRefreshFunc { +func isIBMPINetworkRefreshFunc(client *instance.IBMPINetworkClient, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { network, err := client.Get(id) if err != nil { @@ -500,7 +499,7 @@ func isWaitForIBMPINetworkDeleted(ctx context.Context, client *instance.IBMPINet return stateConf.WaitForStateContext(ctx) } -func isIBMPINetworkRefreshDeleteFunc(client *instance.IBMPINetworkClient, id string) resource.StateRefreshFunc { +func isIBMPINetworkRefreshDeleteFunc(client *instance.IBMPINetworkClient, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { network, err := client.Get(id) if err != nil { diff --git a/ibm/service/power/resource_ibm_pi_network_address_group_member_test.go b/ibm/service/power/resource_ibm_pi_network_address_group_member_test.go index f2f443369c..01890bbfb3 100644 --- a/ibm/service/power/resource_ibm_pi_network_address_group_member_test.go +++ b/ibm/service/power/resource_ibm_pi_network_address_group_member_test.go @@ -13,9 +13,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/power" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMPINetworkAddressGroupMemberBasic(t *testing.T) { diff --git a/ibm/service/power/resource_ibm_pi_network_address_group_test.go b/ibm/service/power/resource_ibm_pi_network_address_group_test.go index 098d7ca1ac..4138ac202a 100644 --- a/ibm/service/power/resource_ibm_pi_network_address_group_test.go +++ b/ibm/service/power/resource_ibm_pi_network_address_group_test.go @@ -10,9 +10,9 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM-Cloud/power-go-client/clients/instance" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" diff --git a/ibm/service/power/resource_ibm_pi_network_interface_test.go b/ibm/service/power/resource_ibm_pi_network_interface_test.go index cc3e937e14..ff942dfce0 100644 --- a/ibm/service/power/resource_ibm_pi_network_interface_test.go +++ b/ibm/service/power/resource_ibm_pi_network_interface_test.go @@ -9,9 +9,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM-Cloud/power-go-client/clients/instance" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" diff --git a/ibm/service/power/resource_ibm_pi_network_port_attach.go b/ibm/service/power/resource_ibm_pi_network_port_attach.go index da171a1b67..d2594aaf7f 100644 --- a/ibm/service/power/resource_ibm_pi_network_port_attach.go +++ b/ibm/service/power/resource_ibm_pi_network_port_attach.go @@ -10,13 +10,13 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" st "github.com/IBM-Cloud/power-go-client/clients/instance" "github.com/IBM-Cloud/power-go-client/helpers" "github.com/IBM-Cloud/power-go-client/power/models" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -211,7 +211,7 @@ func resourceIBMPINetworkPortAttachDelete(ctx context.Context, d *schema.Resourc func isWaitForIBMPINetworkportAvailable(ctx context.Context, client *st.IBMPINetworkClient, id string, networkname string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for Power Network (%s) that was created for Network Zone (%s) to be available.", id, networkname) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", helpers.PINetworkProvisioning}, Target: []string{"DOWN"}, Refresh: isIBMPINetworkportRefreshFunc(client, id, networkname), @@ -223,7 +223,7 @@ func isWaitForIBMPINetworkportAvailable(ctx context.Context, client *st.IBMPINet return stateConf.WaitForStateContext(ctx) } -func isIBMPINetworkportRefreshFunc(client *st.IBMPINetworkClient, id, networkname string) resource.StateRefreshFunc { +func isIBMPINetworkportRefreshFunc(client *st.IBMPINetworkClient, id, networkname string) retry.StateRefreshFunc { log.Printf("Calling the IsIBMPINetwork Refresh Function....with the following id (%s) for network port and following id (%s) for network name and waiting for network to be READY", id, networkname) return func() (interface{}, string, error) { @@ -243,7 +243,7 @@ func isIBMPINetworkportRefreshFunc(client *st.IBMPINetworkClient, id, networknam func isWaitForIBMPINetworkPortAttachAvailable(ctx context.Context, client *st.IBMPINetworkClient, id, networkname, instanceid string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for Power Network (%s) that was created for Network Zone (%s) to be available.", id, networkname) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", helpers.PINetworkProvisioning}, Target: []string{"ACTIVE"}, Refresh: isIBMPINetworkPortAttachRefreshFunc(client, id, networkname, instanceid), @@ -255,7 +255,7 @@ func isWaitForIBMPINetworkPortAttachAvailable(ctx context.Context, client *st.IB return stateConf.WaitForStateContext(ctx) } -func isIBMPINetworkPortAttachRefreshFunc(client *st.IBMPINetworkClient, id, networkname, instanceid string) resource.StateRefreshFunc { +func isIBMPINetworkPortAttachRefreshFunc(client *st.IBMPINetworkClient, id, networkname, instanceid string) retry.StateRefreshFunc { log.Printf("Calling the IsIBMPINetwork Refresh Function....with the following id (%s) for network port and following id (%s) for network name and waiting for network to be READY", id, networkname) return func() (interface{}, string, error) { diff --git a/ibm/service/power/resource_ibm_pi_network_port_attach_test.go b/ibm/service/power/resource_ibm_pi_network_port_attach_test.go index 7980808608..39ba4df52f 100644 --- a/ibm/service/power/resource_ibm_pi_network_port_attach_test.go +++ b/ibm/service/power/resource_ibm_pi_network_port_attach_test.go @@ -13,9 +13,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" st "github.com/IBM-Cloud/power-go-client/clients/instance" ) diff --git a/ibm/service/power/resource_ibm_pi_network_security_group_action_test.go b/ibm/service/power/resource_ibm_pi_network_security_group_action_test.go index d7cb8683b2..e4d836309a 100644 --- a/ibm/service/power/resource_ibm_pi_network_security_group_action_test.go +++ b/ibm/service/power/resource_ibm_pi_network_security_group_action_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/power" diff --git a/ibm/service/power/resource_ibm_pi_network_security_group_member_test.go b/ibm/service/power/resource_ibm_pi_network_security_group_member_test.go index e716bc6ff2..461b47552b 100644 --- a/ibm/service/power/resource_ibm_pi_network_security_group_member_test.go +++ b/ibm/service/power/resource_ibm_pi_network_security_group_member_test.go @@ -9,9 +9,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM-Cloud/power-go-client/clients/instance" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" diff --git a/ibm/service/power/resource_ibm_pi_network_security_group_rule_test.go b/ibm/service/power/resource_ibm_pi_network_security_group_rule_test.go index f6234b2abf..50d9a0948e 100644 --- a/ibm/service/power/resource_ibm_pi_network_security_group_rule_test.go +++ b/ibm/service/power/resource_ibm_pi_network_security_group_rule_test.go @@ -9,8 +9,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM-Cloud/power-go-client/clients/instance" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" diff --git a/ibm/service/power/resource_ibm_pi_network_security_group_test.go b/ibm/service/power/resource_ibm_pi_network_security_group_test.go index 233c8dcdf4..51dafffaeb 100644 --- a/ibm/service/power/resource_ibm_pi_network_security_group_test.go +++ b/ibm/service/power/resource_ibm_pi_network_security_group_test.go @@ -9,9 +9,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM-Cloud/power-go-client/clients/instance" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" diff --git a/ibm/service/power/resource_ibm_pi_network_test.go b/ibm/service/power/resource_ibm_pi_network_test.go index a3cd335ac0..a28e1d3d90 100644 --- a/ibm/service/power/resource_ibm_pi_network_test.go +++ b/ibm/service/power/resource_ibm_pi_network_test.go @@ -12,9 +12,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" st "github.com/IBM-Cloud/power-go-client/clients/instance" ) diff --git a/ibm/service/power/resource_ibm_pi_placement_group_test.go b/ibm/service/power/resource_ibm_pi_placement_group_test.go index 1f53ad8fd3..df0bd43a52 100644 --- a/ibm/service/power/resource_ibm_pi_placement_group_test.go +++ b/ibm/service/power/resource_ibm_pi_placement_group_test.go @@ -15,9 +15,9 @@ import ( "github.com/IBM-Cloud/power-go-client/clients/instance" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMPIPlacementGroupBasic(t *testing.T) { diff --git a/ibm/service/power/resource_ibm_pi_shared_processor_pool_test.go b/ibm/service/power/resource_ibm_pi_shared_processor_pool_test.go index 4b9d19dbb1..e42b76c7f5 100644 --- a/ibm/service/power/resource_ibm_pi_shared_processor_pool_test.go +++ b/ibm/service/power/resource_ibm_pi_shared_processor_pool_test.go @@ -13,9 +13,9 @@ import ( "github.com/IBM-Cloud/power-go-client/clients/instance" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMPISPPbasic(t *testing.T) { diff --git a/ibm/service/power/resource_ibm_pi_snapshot_test.go b/ibm/service/power/resource_ibm_pi_snapshot_test.go index fca0ff5ea1..d89fac88cb 100644 --- a/ibm/service/power/resource_ibm_pi_snapshot_test.go +++ b/ibm/service/power/resource_ibm_pi_snapshot_test.go @@ -14,9 +14,9 @@ import ( "github.com/IBM-Cloud/power-go-client/clients/instance" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/power" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMPIInstanceSnapshotbasic(t *testing.T) { diff --git a/ibm/service/power/resource_ibm_pi_spp_placement_group_test.go b/ibm/service/power/resource_ibm_pi_spp_placement_group_test.go index 0df6351a1a..450dc0e0c2 100644 --- a/ibm/service/power/resource_ibm_pi_spp_placement_group_test.go +++ b/ibm/service/power/resource_ibm_pi_spp_placement_group_test.go @@ -11,9 +11,9 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" st "github.com/IBM-Cloud/power-go-client/clients/instance" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" diff --git a/ibm/service/power/resource_ibm_pi_volume_attach.go b/ibm/service/power/resource_ibm_pi_volume_attach.go index cc17613006..25de827906 100644 --- a/ibm/service/power/resource_ibm_pi_volume_attach.go +++ b/ibm/service/power/resource_ibm_pi_volume_attach.go @@ -16,7 +16,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -173,7 +173,7 @@ func resourceIBMPIVolumeAttachDelete(ctx context.Context, d *schema.ResourceData func isWaitForIBMPIVolumeAttachAvailable(ctx context.Context, client *st.IBMPIVolumeClient, id, cloudInstanceID, pvmInstanceID string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for Volume (%s) to be available for attachment", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", helpers.PIVolumeProvisioning}, Target: []string{helpers.PIVolumeAllowableAttachStatus}, Refresh: isIBMPIVolumeAttachRefreshFunc(client, id, cloudInstanceID, pvmInstanceID), @@ -185,7 +185,7 @@ func isWaitForIBMPIVolumeAttachAvailable(ctx context.Context, client *st.IBMPIVo return stateConf.WaitForStateContext(ctx) } -func isIBMPIVolumeAttachRefreshFunc(client *st.IBMPIVolumeClient, id, cloudInstanceID, pvmInstanceID string) resource.StateRefreshFunc { +func isIBMPIVolumeAttachRefreshFunc(client *st.IBMPIVolumeClient, id, cloudInstanceID, pvmInstanceID string) retry.StateRefreshFunc { return func() (interface{}, string, error) { vol, err := client.Get(id) if err != nil { @@ -203,7 +203,7 @@ func isIBMPIVolumeAttachRefreshFunc(client *st.IBMPIVolumeClient, id, cloudInsta func isWaitForIBMPIVolumeDetach(ctx context.Context, client *st.IBMPIVolumeClient, id, cloudInstanceID, pvmInstanceID string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for Volume (%s) to be available after detachment", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"detaching", helpers.PowerVolumeAttachDeleting}, Target: []string{helpers.PIVolumeProvisioningDone}, Refresh: isIBMPIVolumeDetachRefreshFunc(client, id, cloudInstanceID, pvmInstanceID), @@ -215,7 +215,7 @@ func isWaitForIBMPIVolumeDetach(ctx context.Context, client *st.IBMPIVolumeClien return stateConf.WaitForStateContext(ctx) } -func isIBMPIVolumeDetachRefreshFunc(client *st.IBMPIVolumeClient, id, cloudInstanceID, pvmInstanceID string) resource.StateRefreshFunc { +func isIBMPIVolumeDetachRefreshFunc(client *st.IBMPIVolumeClient, id, cloudInstanceID, pvmInstanceID string) retry.StateRefreshFunc { return func() (interface{}, string, error) { vol, err := client.Get(id) if err != nil { diff --git a/ibm/service/power/resource_ibm_pi_volume_attach_test.go b/ibm/service/power/resource_ibm_pi_volume_attach_test.go index 287e5b08c6..270335fb8b 100644 --- a/ibm/service/power/resource_ibm_pi_volume_attach_test.go +++ b/ibm/service/power/resource_ibm_pi_volume_attach_test.go @@ -10,9 +10,9 @@ import ( "log" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" st "github.com/IBM-Cloud/power-go-client/clients/instance" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" diff --git a/ibm/service/power/resource_ibm_pi_volume_clone_test.go b/ibm/service/power/resource_ibm_pi_volume_clone_test.go index fc7c485786..9e13451388 100644 --- a/ibm/service/power/resource_ibm_pi_volume_clone_test.go +++ b/ibm/service/power/resource_ibm_pi_volume_clone_test.go @@ -14,9 +14,9 @@ import ( "github.com/IBM-Cloud/power-go-client/clients/instance" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMPIVolumeClone(t *testing.T) { diff --git a/ibm/service/power/resource_ibm_pi_volume_group_action_test.go b/ibm/service/power/resource_ibm_pi_volume_group_action_test.go index 6142e87374..d2b8745f84 100644 --- a/ibm/service/power/resource_ibm_pi_volume_group_action_test.go +++ b/ibm/service/power/resource_ibm_pi_volume_group_action_test.go @@ -9,9 +9,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" st "github.com/IBM-Cloud/power-go-client/clients/instance" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" diff --git a/ibm/service/power/resource_ibm_pi_volume_group_test.go b/ibm/service/power/resource_ibm_pi_volume_group_test.go index b7b2a01473..e3525d1f55 100644 --- a/ibm/service/power/resource_ibm_pi_volume_group_test.go +++ b/ibm/service/power/resource_ibm_pi_volume_group_test.go @@ -14,9 +14,9 @@ import ( "github.com/IBM-Cloud/power-go-client/clients/instance" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMPIVolumeGroupUpdate(t *testing.T) { diff --git a/ibm/service/power/resource_ibm_pi_volume_onboarding_test.go b/ibm/service/power/resource_ibm_pi_volume_onboarding_test.go index 14c01fb51d..9bc7279774 100644 --- a/ibm/service/power/resource_ibm_pi_volume_onboarding_test.go +++ b/ibm/service/power/resource_ibm_pi_volume_onboarding_test.go @@ -9,9 +9,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" st "github.com/IBM-Cloud/power-go-client/clients/instance" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" diff --git a/ibm/service/power/resource_ibm_pi_volume_test.go b/ibm/service/power/resource_ibm_pi_volume_test.go index dc149fc974..9083453afb 100644 --- a/ibm/service/power/resource_ibm_pi_volume_test.go +++ b/ibm/service/power/resource_ibm_pi_volume_test.go @@ -14,9 +14,9 @@ import ( "github.com/IBM-Cloud/power-go-client/clients/instance" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMPIVolumebasic(t *testing.T) { diff --git a/ibm/service/power/resource_ibm_pi_vpn_connection_test.go b/ibm/service/power/resource_ibm_pi_vpn_connection_test.go index 31258540a2..184c579d60 100644 --- a/ibm/service/power/resource_ibm_pi_vpn_connection_test.go +++ b/ibm/service/power/resource_ibm_pi_vpn_connection_test.go @@ -12,9 +12,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" st "github.com/IBM-Cloud/power-go-client/clients/instance" ) diff --git a/ibm/service/power/resource_ibm_pi_workspace_test.go b/ibm/service/power/resource_ibm_pi_workspace_test.go index 148a1337a9..8138a1f815 100644 --- a/ibm/service/power/resource_ibm_pi_workspace_test.go +++ b/ibm/service/power/resource_ibm_pi_workspace_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/power-go-client/clients/instance" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/power" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMPIWorkspaceBasic(t *testing.T) { diff --git a/ibm/service/project/data_source_ibm_project_config_test.go b/ibm/service/project/data_source_ibm_project_config_test.go index 638c582550..6a2fae7899 100644 --- a/ibm/service/project/data_source_ibm_project_config_test.go +++ b/ibm/service/project/data_source_ibm_project_config_test.go @@ -11,7 +11,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/project/data_source_ibm_project_environment_test.go b/ibm/service/project/data_source_ibm_project_environment_test.go index 9017c85f61..e720c03933 100644 --- a/ibm/service/project/data_source_ibm_project_environment_test.go +++ b/ibm/service/project/data_source_ibm_project_environment_test.go @@ -11,7 +11,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/project/data_source_ibm_project_test.go b/ibm/service/project/data_source_ibm_project_test.go index a3fbdc5455..9edc59fd71 100644 --- a/ibm/service/project/data_source_ibm_project_test.go +++ b/ibm/service/project/data_source_ibm_project_test.go @@ -11,7 +11,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/project/resource_ibm_project_config_test.go b/ibm/service/project/resource_ibm_project_config_test.go index e434069ae8..7fe74e6382 100644 --- a/ibm/service/project/resource_ibm_project_config_test.go +++ b/ibm/service/project/resource_ibm_project_config_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/project/resource_ibm_project_environment_test.go b/ibm/service/project/resource_ibm_project_environment_test.go index a42d440bcf..9abf568f8a 100644 --- a/ibm/service/project/resource_ibm_project_environment_test.go +++ b/ibm/service/project/resource_ibm_project_environment_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/project/resource_ibm_project_test.go b/ibm/service/project/resource_ibm_project_test.go index 18759b95df..e329c79f76 100644 --- a/ibm/service/project/resource_ibm_project_test.go +++ b/ibm/service/project/resource_ibm_project_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/pushnotification/data_source_ibm_push_notification_chrome_test.go b/ibm/service/pushnotification/data_source_ibm_push_notification_chrome_test.go index 7ff1600199..9db3f17653 100644 --- a/ibm/service/pushnotification/data_source_ibm_push_notification_chrome_test.go +++ b/ibm/service/pushnotification/data_source_ibm_push_notification_chrome_test.go @@ -6,8 +6,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMPNApplicationChromeDataSource_Basic(t *testing.T) { diff --git a/ibm/service/pushnotification/resource_ibm_push_notification_chrome_test.go b/ibm/service/pushnotification/resource_ibm_push_notification_chrome_test.go index fb3582008e..e02b3d8c4e 100644 --- a/ibm/service/pushnotification/resource_ibm_push_notification_chrome_test.go +++ b/ibm/service/pushnotification/resource_ibm_push_notification_chrome_test.go @@ -9,9 +9,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/push-notifications-go-sdk/pushservicev1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMPNApplicationChrome_Basic(t *testing.T) { diff --git a/ibm/service/registry/data_source_ibm_cr_namespaces_test.go b/ibm/service/registry/data_source_ibm_cr_namespaces_test.go index 8cbbd87fb4..1cb2b6e3ca 100644 --- a/ibm/service/registry/data_source_ibm_cr_namespaces_test.go +++ b/ibm/service/registry/data_source_ibm_cr_namespaces_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMCrNamespacesDataSourceBasic(t *testing.T) { diff --git a/ibm/service/registry/resource_ibm_cr_namespace_test.go b/ibm/service/registry/resource_ibm_cr_namespace_test.go index ebf93a3fe1..eb91c965c7 100644 --- a/ibm/service/registry/resource_ibm_cr_namespace_test.go +++ b/ibm/service/registry/resource_ibm_cr_namespace_test.go @@ -10,9 +10,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/container-registry-go-sdk/containerregistryv1" ) diff --git a/ibm/service/registry/resource_ibm_cr_retention_policy_test.go b/ibm/service/registry/resource_ibm_cr_retention_policy_test.go index f3d412ff3a..89768687d6 100644 --- a/ibm/service/registry/resource_ibm_cr_retention_policy_test.go +++ b/ibm/service/registry/resource_ibm_cr_retention_policy_test.go @@ -10,9 +10,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/container-registry-go-sdk/containerregistryv1" ) diff --git a/ibm/service/resourcecontroller/data_source_ibm_resource_instance_test.go b/ibm/service/resourcecontroller/data_source_ibm_resource_instance_test.go index 1d1a112161..ee4104fd02 100644 --- a/ibm/service/resourcecontroller/data_source_ibm_resource_instance_test.go +++ b/ibm/service/resourcecontroller/data_source_ibm_resource_instance_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMResourceInstanceDataSource_basic(t *testing.T) { diff --git a/ibm/service/resourcecontroller/data_source_ibm_resource_key_test.go b/ibm/service/resourcecontroller/data_source_ibm_resource_key_test.go index 3041400963..96388b2423 100644 --- a/ibm/service/resourcecontroller/data_source_ibm_resource_key_test.go +++ b/ibm/service/resourcecontroller/data_source_ibm_resource_key_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMResourceKeyDataSource_basic(t *testing.T) { diff --git a/ibm/service/resourcecontroller/data_source_ibm_resource_quota_test.go b/ibm/service/resourcecontroller/data_source_ibm_resource_quota_test.go index c4aefb5451..8e5a9ae732 100644 --- a/ibm/service/resourcecontroller/data_source_ibm_resource_quota_test.go +++ b/ibm/service/resourcecontroller/data_source_ibm_resource_quota_test.go @@ -10,7 +10,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMResourceQuotaDataSource_basic(t *testing.T) { diff --git a/ibm/service/resourcecontroller/resource_ibm_resource_instance_test.go b/ibm/service/resourcecontroller/resource_ibm_resource_instance_test.go index 4543f0eb96..19634c47d1 100644 --- a/ibm/service/resourcecontroller/resource_ibm_resource_instance_test.go +++ b/ibm/service/resourcecontroller/resource_ibm_resource_instance_test.go @@ -13,9 +13,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" rc "github.com/IBM/platform-services-go-sdk/resourcecontrollerv2" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMResourceInstanceBasic(t *testing.T) { diff --git a/ibm/service/resourcecontroller/resource_ibm_resource_key_test.go b/ibm/service/resourcecontroller/resource_ibm_resource_key_test.go index a189af59c1..2a9c899e46 100644 --- a/ibm/service/resourcecontroller/resource_ibm_resource_key_test.go +++ b/ibm/service/resourcecontroller/resource_ibm_resource_key_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" rc "github.com/IBM/platform-services-go-sdk/resourcecontrollerv2" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMResourceKey_Basic(t *testing.T) { diff --git a/ibm/service/resourcemanager/data_source_ibm_resource_group_test.go b/ibm/service/resourcemanager/data_source_ibm_resource_group_test.go index dbc137e6cc..0c19afc622 100644 --- a/ibm/service/resourcemanager/data_source_ibm_resource_group_test.go +++ b/ibm/service/resourcemanager/data_source_ibm_resource_group_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMResourceGroupDataSource_Basic(t *testing.T) { diff --git a/ibm/service/resourcemanager/resource_ibm_resource_group.go b/ibm/service/resourcemanager/resource_ibm_resource_group.go index f69da9ab2e..940cc98d52 100644 --- a/ibm/service/resourcemanager/resource_ibm_resource_group.go +++ b/ibm/service/resourcemanager/resource_ibm_resource_group.go @@ -10,7 +10,6 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" rg "github.com/IBM/platform-services-go-sdk/resourcemanagerv2" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -234,13 +233,13 @@ func resourceIBMResourceGroupDelete(d *schema.ResourceData, meta interface{}) er resp, err = rMgtClient.DeleteResourceGroup(&resourceGroupDelete) if err != nil { if resp != nil && resp.StatusCode == 500 { - return resource.RetryableError(err) + return retry.RetryableError(err) } if resp != nil && resp.StatusCode == 404 { log.Printf("[WARN] Resource Group is not found") return nil } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/resourcemanager/resource_ibm_resource_group_test.go b/ibm/service/resourcemanager/resource_ibm_resource_group_test.go index b0826f0783..89b7fcc70d 100644 --- a/ibm/service/resourcemanager/resource_ibm_resource_group_test.go +++ b/ibm/service/resourcemanager/resource_ibm_resource_group_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" rg "github.com/IBM/platform-services-go-sdk/resourcemanagerv2" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMResourceGroupBasic(t *testing.T) { diff --git a/ibm/service/satellite/data_source_ibm_satellite_cluster_test.go b/ibm/service/satellite/data_source_ibm_satellite_cluster_test.go index 729e3f6e3b..139ca9eb0b 100644 --- a/ibm/service/satellite/data_source_ibm_satellite_cluster_test.go +++ b/ibm/service/satellite/data_source_ibm_satellite_cluster_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMSatelliteClusterDataSourceBasic(t *testing.T) { diff --git a/ibm/service/satellite/data_source_ibm_satellite_cluster_worker_pool_test.go b/ibm/service/satellite/data_source_ibm_satellite_cluster_worker_pool_test.go index 86c1a516a8..512cbe7fc0 100644 --- a/ibm/service/satellite/data_source_ibm_satellite_cluster_worker_pool_test.go +++ b/ibm/service/satellite/data_source_ibm_satellite_cluster_worker_pool_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMSatelliteClusterWorkerPoolDataSourceBasic(t *testing.T) { diff --git a/ibm/service/satellite/data_source_ibm_satellite_cluster_worker_pool_zone_attachment_test.go b/ibm/service/satellite/data_source_ibm_satellite_cluster_worker_pool_zone_attachment_test.go index e498b2c3e3..fb5a71e962 100644 --- a/ibm/service/satellite/data_source_ibm_satellite_cluster_worker_pool_zone_attachment_test.go +++ b/ibm/service/satellite/data_source_ibm_satellite_cluster_worker_pool_zone_attachment_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMSatelliteClusterWorkerPoolZoneAttachmentDataSourceBasic(t *testing.T) { diff --git a/ibm/service/satellite/data_source_ibm_satellite_endpoint_test.go b/ibm/service/satellite/data_source_ibm_satellite_endpoint_test.go index b180d6369b..59a6e1827b 100644 --- a/ibm/service/satellite/data_source_ibm_satellite_endpoint_test.go +++ b/ibm/service/satellite/data_source_ibm_satellite_endpoint_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmSatelliteEndpointDataSourceBasic(t *testing.T) { diff --git a/ibm/service/satellite/data_source_ibm_satellite_host_script.go b/ibm/service/satellite/data_source_ibm_satellite_host_script.go index f502b07d11..c2dfe52918 100644 --- a/ibm/service/satellite/data_source_ibm_satellite_host_script.go +++ b/ibm/service/satellite/data_source_ibm_satellite_host_script.go @@ -15,7 +15,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/go-sdk-core/v5/core" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" homedir "github.com/mitchellh/go-homedir" ) @@ -103,13 +103,13 @@ func dataSourceIBMSatelliteAttachHostScriptRead(d *schema.ResourceData, meta int Controller: &location, } - err = resource.Retry(1*time.Minute, func() *resource.RetryError { + err = retry.Retry(1*time.Minute, func() *retry.RetryError { locData, response, err = satClient.GetSatelliteLocation(getSatLocOptions) if err != nil || locData == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/satellite/data_source_ibm_satellite_host_script_test.go b/ibm/service/satellite/data_source_ibm_satellite_host_script_test.go index 9c09d5a5a8..8d91c7f549 100644 --- a/ibm/service/satellite/data_source_ibm_satellite_host_script_test.go +++ b/ibm/service/satellite/data_source_ibm_satellite_host_script_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMSatelliteAttachHostScriptDataSourceBasic(t *testing.T) { diff --git a/ibm/service/satellite/data_source_ibm_satellite_link_test.go b/ibm/service/satellite/data_source_ibm_satellite_link_test.go index ba1fc6b632..794679fd38 100644 --- a/ibm/service/satellite/data_source_ibm_satellite_link_test.go +++ b/ibm/service/satellite/data_source_ibm_satellite_link_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmSatelliteLinkDataSourceBasic(t *testing.T) { diff --git a/ibm/service/satellite/data_source_ibm_satellite_location.go b/ibm/service/satellite/data_source_ibm_satellite_location.go index fde706eb39..a0b9d279c1 100644 --- a/ibm/service/satellite/data_source_ibm_satellite_location.go +++ b/ibm/service/satellite/data_source_ibm_satellite_location.go @@ -10,7 +10,7 @@ import ( "github.com/IBM-Cloud/container-services-go-sdk/kubernetesserviceapiv1" "github.com/IBM/go-sdk-core/v5/core" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -179,15 +179,15 @@ func dataSourceIBMSatelliteLocationRead(d *schema.ResourceData, meta interface{} var instance *kubernetesserviceapiv1.MultishiftGetController var response *core.DetailedResponse - // TO-DO: resource.Retry, resource.RetryError, resource.RetryableError and resource.NonRetryableError + // TO-DO: retry.Retry, retry.RetryError, retry.RetryableError and retry.NonRetryableError // seem to be deprecated. This shall be replaced. - err = resource.Retry(1*time.Minute, func() *resource.RetryError { + err = retry.Retry(1*time.Minute, func() *retry.RetryError { instance, response, err = satClient.GetSatelliteLocation(getSatLocOptions) if err != nil || instance == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/satellite/data_source_ibm_satellite_location_nlb_dns_test.go b/ibm/service/satellite/data_source_ibm_satellite_location_nlb_dns_test.go index 8a2263c49b..3a18906581 100644 --- a/ibm/service/satellite/data_source_ibm_satellite_location_nlb_dns_test.go +++ b/ibm/service/satellite/data_source_ibm_satellite_location_nlb_dns_test.go @@ -8,8 +8,8 @@ import ( "testing" "github.com/IBM-Cloud/container-services-go-sdk/kubernetesserviceapiv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/satellite/data_source_ibm_satellite_location_test.go b/ibm/service/satellite/data_source_ibm_satellite_location_test.go index 5364e053f6..9f63b2adb9 100644 --- a/ibm/service/satellite/data_source_ibm_satellite_location_test.go +++ b/ibm/service/satellite/data_source_ibm_satellite_location_test.go @@ -8,8 +8,8 @@ import ( "testing" "github.com/IBM-Cloud/container-services-go-sdk/kubernetesserviceapiv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/satellite/data_source_ibm_satellite_storage_assignment_test.go b/ibm/service/satellite/data_source_ibm_satellite_storage_assignment_test.go index 8483791a38..eb8ce3dfde 100644 --- a/ibm/service/satellite/data_source_ibm_satellite_storage_assignment_test.go +++ b/ibm/service/satellite/data_source_ibm_satellite_storage_assignment_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmSatelliteStorageAssignmentDataSourceBasic(t *testing.T) { diff --git a/ibm/service/satellite/data_source_ibm_satellite_storage_configuration_test.go b/ibm/service/satellite/data_source_ibm_satellite_storage_configuration_test.go index 9265a54957..b37489ff45 100644 --- a/ibm/service/satellite/data_source_ibm_satellite_storage_configuration_test.go +++ b/ibm/service/satellite/data_source_ibm_satellite_storage_configuration_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmSatelliteStorageConfigurationDataSourceBasic(t *testing.T) { diff --git a/ibm/service/satellite/resource_ibm_satellite_cluster.go b/ibm/service/satellite/resource_ibm_satellite_cluster.go index af7733052a..52ac3735f4 100644 --- a/ibm/service/satellite/resource_ibm_satellite_cluster.go +++ b/ibm/service/satellite/resource_ibm_satellite_cluster.go @@ -18,7 +18,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/IBM/go-sdk-core/v5/core" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/jinzhu/copier" ) @@ -823,7 +823,7 @@ func waitForLocationNormal(location string, d *schema.ResourceData, meta interfa return false, err } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isLocationProvisioning}, Target: []string{isLocationNormal}, Refresh: func() (interface{}, string, error) { @@ -834,13 +834,13 @@ func waitForLocationNormal(location string, d *schema.ResourceData, meta interfa var instance *kubernetesserviceapiv1.MultishiftGetController var response *core.DetailedResponse var err error - err = resource.Retry(5*time.Minute, func() *resource.RetryError { + err = retry.Retry(5*time.Minute, func() *retry.RetryError { instance, response, err = satClient.GetSatelliteLocation(getSatLocOptions) if err != nil || instance == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) @@ -871,7 +871,7 @@ func waitForClusterToReady(cluster string, d *schema.ResourceData, meta interfac return false, err } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isCluterDeploying}, Target: []string{isClusterNormal, isCluterDeployFailed}, Refresh: func() (interface{}, string, error) { @@ -905,7 +905,7 @@ func waitForClusterToDelete(cluster string, d *schema.ResourceData, meta interfa return false, err } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isClusterDeleting}, Target: []string{isClusterDeleteDone}, Refresh: func() (interface{}, string, error) { @@ -936,7 +936,7 @@ func WaitForSatelliteWorkerVersionUpdate(d *schema.ResourceData, meta interface{ return nil, err } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{versionUpdating}, Target: []string{workerNormal}, Refresh: func() (interface{}, string, error) { @@ -977,7 +977,7 @@ func WaitForSatelliteClusterVersionUpdate(d *schema.ResourceData, meta interface log.Printf("Waiting for satellite cluster (%s) version to be updated.", d.Id()) id := d.Id() - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", versionUpdating}, Target: []string{clusterNormal}, Refresh: satelliteClusterVersionRefreshFunc(csClient.Clusters(), id, d, target), @@ -990,7 +990,7 @@ func WaitForSatelliteClusterVersionUpdate(d *schema.ResourceData, meta interface return stateConf.WaitForState() } -func satelliteClusterVersionRefreshFunc(client v1.Clusters, instanceID string, d *schema.ResourceData, target v1.ClusterTargetHeader) resource.StateRefreshFunc { +func satelliteClusterVersionRefreshFunc(client v1.Clusters, instanceID string, d *schema.ResourceData, target v1.ClusterTargetHeader) retry.StateRefreshFunc { return func() (interface{}, string, error) { clusterFields, err := client.FindWithOutShowResourcesCompatible(instanceID, target) if err != nil { diff --git a/ibm/service/satellite/resource_ibm_satellite_cluster_test.go b/ibm/service/satellite/resource_ibm_satellite_cluster_test.go index 76752e640c..dbfdee6643 100644 --- a/ibm/service/satellite/resource_ibm_satellite_cluster_test.go +++ b/ibm/service/satellite/resource_ibm_satellite_cluster_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/container-services-go-sdk/kubernetesserviceapiv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccSatelliteCluster_Basic(t *testing.T) { diff --git a/ibm/service/satellite/resource_ibm_satellite_cluster_worker_pool.go b/ibm/service/satellite/resource_ibm_satellite_cluster_worker_pool.go index 82d4af921b..de7d346ab1 100644 --- a/ibm/service/satellite/resource_ibm_satellite_cluster_worker_pool.go +++ b/ibm/service/satellite/resource_ibm_satellite_cluster_worker_pool.go @@ -14,7 +14,7 @@ import ( "github.com/IBM-Cloud/container-services-go-sdk/kubernetesserviceapiv1" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -493,7 +493,7 @@ func WaitForSatelliteWorkerPoolAvailable(d *schema.ResourceData, meta interface{ return nil, err } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"provision_pending"}, Target: []string{workerPoolDesired}, Refresh: func() (interface{}, string, error) { @@ -533,7 +533,7 @@ func WaitForSatelliteWorkerDelete(clusterNameOrID, workerPoolNameOrID string, me return nil, err } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"deleting"}, Target: []string{workerDeleteState}, Refresh: satelliteWorkerPoolDeleteStateRefreshFunc(satClient, clusterNameOrID, workerPoolNameOrID, target), @@ -545,7 +545,7 @@ func WaitForSatelliteWorkerDelete(clusterNameOrID, workerPoolNameOrID string, me return stateConf.WaitForState() } -func satelliteWorkerPoolDeleteStateRefreshFunc(satClient *kubernetesserviceapiv1.KubernetesServiceApiV1, clusterID, workerPoolNameOrID string, target v2.ClusterTargetHeader) resource.StateRefreshFunc { +func satelliteWorkerPoolDeleteStateRefreshFunc(satClient *kubernetesserviceapiv1.KubernetesServiceApiV1, clusterID, workerPoolNameOrID string, target v2.ClusterTargetHeader) retry.StateRefreshFunc { return func() (interface{}, string, error) { diff --git a/ibm/service/satellite/resource_ibm_satellite_cluster_worker_pool_test.go b/ibm/service/satellite/resource_ibm_satellite_cluster_worker_pool_test.go index 6b79c1c144..a8ed8bfdca 100644 --- a/ibm/service/satellite/resource_ibm_satellite_cluster_worker_pool_test.go +++ b/ibm/service/satellite/resource_ibm_satellite_cluster_worker_pool_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM-Cloud/container-services-go-sdk/kubernetesserviceapiv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccSatelliteClusterWorkerPool_Basic(t *testing.T) { diff --git a/ibm/service/satellite/resource_ibm_satellite_cluster_worker_pool_zone_attachment_test.go b/ibm/service/satellite/resource_ibm_satellite_cluster_worker_pool_zone_attachment_test.go index 215250f407..d2afb67baf 100644 --- a/ibm/service/satellite/resource_ibm_satellite_cluster_worker_pool_zone_attachment_test.go +++ b/ibm/service/satellite/resource_ibm_satellite_cluster_worker_pool_zone_attachment_test.go @@ -11,9 +11,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIbmSatelliteClusterWorkerPoolZoneAttachmentBasic(t *testing.T) { diff --git a/ibm/service/satellite/resource_ibm_satellite_endpoint_test.go b/ibm/service/satellite/resource_ibm_satellite_endpoint_test.go index c27f0f9efb..42356837ff 100644 --- a/ibm/service/satellite/resource_ibm_satellite_endpoint_test.go +++ b/ibm/service/satellite/resource_ibm_satellite_endpoint_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM-Cloud/container-services-go-sdk/satellitelinkv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIbmSatelliteEndpointBasic(t *testing.T) { diff --git a/ibm/service/satellite/resource_ibm_satellite_host.go b/ibm/service/satellite/resource_ibm_satellite_host.go index 1a8d5f0678..2e321dbe74 100644 --- a/ibm/service/satellite/resource_ibm_satellite_host.go +++ b/ibm/service/satellite/resource_ibm_satellite_host.go @@ -12,7 +12,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/bluemix-go/bmxerror" @@ -316,7 +316,7 @@ func waitForHostAttachment(hostNameOrID, location string, d *schema.ResourceData return false, err } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{rsHostProvisioningStatus, rsHostUnknownStatus}, Target: []string{rsHostReadyStatus, rsHostNormalStatus}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/satellite/resource_ibm_satellite_host_test.go b/ibm/service/satellite/resource_ibm_satellite_host_test.go index 6b6a201c96..0c9f1b06ca 100644 --- a/ibm/service/satellite/resource_ibm_satellite_host_test.go +++ b/ibm/service/satellite/resource_ibm_satellite_host_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM-Cloud/container-services-go-sdk/kubernetesserviceapiv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccFunctionSatelliteHost_Basic(t *testing.T) { diff --git a/ibm/service/satellite/resource_ibm_satellite_link_test.go b/ibm/service/satellite/resource_ibm_satellite_link_test.go index f7a9db2cc9..b901f636dc 100644 --- a/ibm/service/satellite/resource_ibm_satellite_link_test.go +++ b/ibm/service/satellite/resource_ibm_satellite_link_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/container-services-go-sdk/satellitelinkv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIbmSatelliteLinkBasic(t *testing.T) { diff --git a/ibm/service/satellite/resource_ibm_satellite_location.go b/ibm/service/satellite/resource_ibm_satellite_location.go index 41d43c1750..795843c258 100644 --- a/ibm/service/satellite/resource_ibm_satellite_location.go +++ b/ibm/service/satellite/resource_ibm_satellite_location.go @@ -13,7 +13,7 @@ import ( "github.com/IBM-Cloud/container-services-go-sdk/kubernetesserviceapiv1" "github.com/IBM/go-sdk-core/v5/core" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -501,7 +501,7 @@ func waitForLocationDelete(location string, d *schema.ResourceData, meta interfa return false, err } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isLocationDeleting, ""}, Target: []string{isLocationDeleteDone}, Refresh: func() (interface{}, string, error) { @@ -539,7 +539,7 @@ func waitForLocationToReady(loc string, d *schema.ResourceData, meta interface{} return false, err } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isLocationDeploying}, Target: []string{isLocationReady, isLocationDeployFailed}, Refresh: func() (interface{}, string, error) { @@ -550,13 +550,13 @@ func waitForLocationToReady(loc string, d *schema.ResourceData, meta interface{} var location *kubernetesserviceapiv1.MultishiftGetController var response *core.DetailedResponse var err error - err = resource.Retry(5*time.Minute, func() *resource.RetryError { + err = retry.Retry(5*time.Minute, func() *retry.RetryError { location, response, err = satClient.GetSatelliteLocation(getSatLocOptions) if err != nil || location == nil { if response != nil && response.StatusCode == 404 { - return resource.RetryableError(err) + return retry.RetryableError(err) } - return resource.NonRetryableError(err) + return retry.NonRetryableError(err) } return nil }) diff --git a/ibm/service/satellite/resource_ibm_satellite_location_nlb_dns_test.go b/ibm/service/satellite/resource_ibm_satellite_location_nlb_dns_test.go index 6bea09762c..8c5384d0b9 100644 --- a/ibm/service/satellite/resource_ibm_satellite_location_nlb_dns_test.go +++ b/ibm/service/satellite/resource_ibm_satellite_location_nlb_dns_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/bluemix-go/api/container/containerv2" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIbmSatelliteLocationNlbDnsBasic(t *testing.T) { diff --git a/ibm/service/satellite/resource_ibm_satellite_location_test.go b/ibm/service/satellite/resource_ibm_satellite_location_test.go index b6f9f3c66e..9d83f6a1ec 100644 --- a/ibm/service/satellite/resource_ibm_satellite_location_test.go +++ b/ibm/service/satellite/resource_ibm_satellite_location_test.go @@ -8,9 +8,9 @@ import ( "testing" "github.com/IBM-Cloud/container-services-go-sdk/kubernetesserviceapiv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/satellite/resource_ibm_satellite_storage_assignment.go b/ibm/service/satellite/resource_ibm_satellite_storage_assignment.go index 46cf05bda6..8dc6559843 100644 --- a/ibm/service/satellite/resource_ibm_satellite_storage_assignment.go +++ b/ibm/service/satellite/resource_ibm_satellite_storage_assignment.go @@ -7,7 +7,7 @@ import ( "github.com/IBM-Cloud/container-services-go-sdk/kubernetesserviceapiv1" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -290,7 +290,7 @@ func resourceIBMContainerStorageAssignmentDelete(d *schema.ResourceData, meta in } func waitForAssignmentCreationStatus(getAssignmentOptions *kubernetesserviceapiv1.GetAssignmentOptions, meta interface{}, d *schema.ResourceData) (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"NotReady"}, Target: []string{"Ready"}, Refresh: assignmentCreationStatusRefreshFunc(getAssignmentOptions, meta), @@ -302,7 +302,7 @@ func waitForAssignmentCreationStatus(getAssignmentOptions *kubernetesserviceapiv return stateConf.WaitForState() } -func assignmentCreationStatusRefreshFunc(getAssignmentOptions *kubernetesserviceapiv1.GetAssignmentOptions, meta interface{}) resource.StateRefreshFunc { +func assignmentCreationStatusRefreshFunc(getAssignmentOptions *kubernetesserviceapiv1.GetAssignmentOptions, meta interface{}) retry.StateRefreshFunc { return func() (interface{}, string, error) { satClient, err := meta.(conns.ClientSession).SatelliteClientSession() @@ -321,7 +321,7 @@ func assignmentCreationStatusRefreshFunc(getAssignmentOptions *kubernetesservice } func waitForAssignmentUpdateStatus(updateAssignmentOptions *kubernetesserviceapiv1.UpdateAssignmentOptions, meta interface{}, d *schema.ResourceData) (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"NotReady"}, Target: []string{"Ready"}, Refresh: assignmentUpdateStatusRefreshFunc(updateAssignmentOptions, meta), @@ -333,7 +333,7 @@ func waitForAssignmentUpdateStatus(updateAssignmentOptions *kubernetesserviceapi return stateConf.WaitForState() } -func assignmentUpdateStatusRefreshFunc(updateAssignmentOptions *kubernetesserviceapiv1.UpdateAssignmentOptions, meta interface{}) resource.StateRefreshFunc { +func assignmentUpdateStatusRefreshFunc(updateAssignmentOptions *kubernetesserviceapiv1.UpdateAssignmentOptions, meta interface{}) retry.StateRefreshFunc { return func() (interface{}, string, error) { satClient, err := meta.(conns.ClientSession).SatelliteClientSession() @@ -353,7 +353,7 @@ func assignmentUpdateStatusRefreshFunc(updateAssignmentOptions *kubernetesservic } func waitForAssignmentDeletionStatus(removeAssignmentOptions *kubernetesserviceapiv1.RemoveAssignmentOptions, meta interface{}, d *schema.ResourceData) (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"NotReady"}, Target: []string{"Ready"}, Refresh: assignmentDeletionStatusRefreshFunc(removeAssignmentOptions, meta), @@ -365,7 +365,7 @@ func waitForAssignmentDeletionStatus(removeAssignmentOptions *kubernetesservicea return stateConf.WaitForState() } -func assignmentDeletionStatusRefreshFunc(removeAssignmentOptions *kubernetesserviceapiv1.RemoveAssignmentOptions, meta interface{}) resource.StateRefreshFunc { +func assignmentDeletionStatusRefreshFunc(removeAssignmentOptions *kubernetesserviceapiv1.RemoveAssignmentOptions, meta interface{}) retry.StateRefreshFunc { return func() (interface{}, string, error) { satClient, err := meta.(conns.ClientSession).SatelliteClientSession() diff --git a/ibm/service/satellite/resource_ibm_satellite_storage_assignment_test.go b/ibm/service/satellite/resource_ibm_satellite_storage_assignment_test.go index a41e35fee7..7c3437d57d 100644 --- a/ibm/service/satellite/resource_ibm_satellite_storage_assignment_test.go +++ b/ibm/service/satellite/resource_ibm_satellite_storage_assignment_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/container-services-go-sdk/kubernetesserviceapiv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccSatelliteStorageAssignment_Basic(t *testing.T) { diff --git a/ibm/service/satellite/resource_ibm_satellite_storage_configuration.go b/ibm/service/satellite/resource_ibm_satellite_storage_configuration.go index b4140211dd..e5875a30e3 100644 --- a/ibm/service/satellite/resource_ibm_satellite_storage_configuration.go +++ b/ibm/service/satellite/resource_ibm_satellite_storage_configuration.go @@ -8,7 +8,7 @@ import ( "github.com/IBM-Cloud/container-services-go-sdk/kubernetesserviceapiv1" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "k8s.io/utils/strings/slices" ) @@ -468,7 +468,7 @@ func getDefinedStorageClasses(definedMaps []map[string]string, getMaps map[strin } func waitForStorageConfigurationStatus(getStorageConfigurationOptions *kubernetesserviceapiv1.GetStorageConfigurationOptions, meta interface{}, d *schema.ResourceData) (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"NotReady"}, Target: []string{"Ready"}, Refresh: storageConfigurationStatusRefreshFunc(getStorageConfigurationOptions, meta), @@ -480,7 +480,7 @@ func waitForStorageConfigurationStatus(getStorageConfigurationOptions *kubernete return stateConf.WaitForState() } -func storageConfigurationStatusRefreshFunc(getStorageConfigurationOptions *kubernetesserviceapiv1.GetStorageConfigurationOptions, meta interface{}) resource.StateRefreshFunc { +func storageConfigurationStatusRefreshFunc(getStorageConfigurationOptions *kubernetesserviceapiv1.GetStorageConfigurationOptions, meta interface{}) retry.StateRefreshFunc { return func() (interface{}, string, error) { satClient, err := meta.(conns.ClientSession).SatelliteClientSession() @@ -499,7 +499,7 @@ func storageConfigurationStatusRefreshFunc(getStorageConfigurationOptions *kuber } func waitForStorageConfigurationDeletionStatus(getStorageConfigurationOptions *kubernetesserviceapiv1.GetStorageConfigurationOptions, meta interface{}, d *schema.ResourceData) (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"NotReady"}, Target: []string{"Ready"}, Refresh: storageConfigurationDeletionStatusRefreshFunc(getStorageConfigurationOptions, meta), @@ -511,7 +511,7 @@ func waitForStorageConfigurationDeletionStatus(getStorageConfigurationOptions *k return stateConf.WaitForState() } -func storageConfigurationDeletionStatusRefreshFunc(getStorageConfigurationOptions *kubernetesserviceapiv1.GetStorageConfigurationOptions, meta interface{}) resource.StateRefreshFunc { +func storageConfigurationDeletionStatusRefreshFunc(getStorageConfigurationOptions *kubernetesserviceapiv1.GetStorageConfigurationOptions, meta interface{}) retry.StateRefreshFunc { return func() (interface{}, string, error) { satClient, err := meta.(conns.ClientSession).SatelliteClientSession() diff --git a/ibm/service/satellite/resource_ibm_satellite_storage_configuration_test.go b/ibm/service/satellite/resource_ibm_satellite_storage_configuration_test.go index 394baec68a..197ddbe96a 100644 --- a/ibm/service/satellite/resource_ibm_satellite_storage_configuration_test.go +++ b/ibm/service/satellite/resource_ibm_satellite_storage_configuration_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM-Cloud/container-services-go-sdk/kubernetesserviceapiv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccSatelliteStorageConfiguration_Basic(t *testing.T) { diff --git a/ibm/service/scc/data_source_ibm_scc_control_libraries_test.go b/ibm/service/scc/data_source_ibm_scc_control_libraries_test.go index d5a799bf70..20bffa4ce5 100644 --- a/ibm/service/scc/data_source_ibm_scc_control_libraries_test.go +++ b/ibm/service/scc/data_source_ibm_scc_control_libraries_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/scc/data_source_ibm_scc_control_library_test.go b/ibm/service/scc/data_source_ibm_scc_control_library_test.go index d557801ce3..d22707ac96 100644 --- a/ibm/service/scc/data_source_ibm_scc_control_library_test.go +++ b/ibm/service/scc/data_source_ibm_scc_control_library_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/scc/data_source_ibm_scc_instance_settings_test.go b/ibm/service/scc/data_source_ibm_scc_instance_settings_test.go index e91ea633eb..2e6cd32121 100644 --- a/ibm/service/scc/data_source_ibm_scc_instance_settings_test.go +++ b/ibm/service/scc/data_source_ibm_scc_instance_settings_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/scc/data_source_ibm_scc_latest_reports_test.go b/ibm/service/scc/data_source_ibm_scc_latest_reports_test.go index bb710d33fb..5b617659d7 100644 --- a/ibm/service/scc/data_source_ibm_scc_latest_reports_test.go +++ b/ibm/service/scc/data_source_ibm_scc_latest_reports_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/scc/data_source_ibm_scc_profile_attachment_test.go b/ibm/service/scc/data_source_ibm_scc_profile_attachment_test.go index 84d113eae8..ab2267863a 100644 --- a/ibm/service/scc/data_source_ibm_scc_profile_attachment_test.go +++ b/ibm/service/scc/data_source_ibm_scc_profile_attachment_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/scc/data_source_ibm_scc_profile_test.go b/ibm/service/scc/data_source_ibm_scc_profile_test.go index 47ab120f1f..850682e103 100644 --- a/ibm/service/scc/data_source_ibm_scc_profile_test.go +++ b/ibm/service/scc/data_source_ibm_scc_profile_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/scc/data_source_ibm_scc_profiles_test.go b/ibm/service/scc/data_source_ibm_scc_profiles_test.go index efed00e964..13e3e15dfc 100644 --- a/ibm/service/scc/data_source_ibm_scc_profiles_test.go +++ b/ibm/service/scc/data_source_ibm_scc_profiles_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/scc/data_source_ibm_scc_provider_type_collection_test.go b/ibm/service/scc/data_source_ibm_scc_provider_type_collection_test.go index 8838d2a0d0..6c425594e6 100644 --- a/ibm/service/scc/data_source_ibm_scc_provider_type_collection_test.go +++ b/ibm/service/scc/data_source_ibm_scc_provider_type_collection_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/scc/data_source_ibm_scc_provider_type_instance_test.go b/ibm/service/scc/data_source_ibm_scc_provider_type_instance_test.go index bfdbf88791..72ee15f3c2 100644 --- a/ibm/service/scc/data_source_ibm_scc_provider_type_instance_test.go +++ b/ibm/service/scc/data_source_ibm_scc_provider_type_instance_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/scc/data_source_ibm_scc_provider_type_test.go b/ibm/service/scc/data_source_ibm_scc_provider_type_test.go index d302b59a7f..c702153ff5 100644 --- a/ibm/service/scc/data_source_ibm_scc_provider_type_test.go +++ b/ibm/service/scc/data_source_ibm_scc_provider_type_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/scc/data_source_ibm_scc_provider_types_test.go b/ibm/service/scc/data_source_ibm_scc_provider_types_test.go index 9b18ba6249..b63381208f 100644 --- a/ibm/service/scc/data_source_ibm_scc_provider_types_test.go +++ b/ibm/service/scc/data_source_ibm_scc_provider_types_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/scc/data_source_ibm_scc_report_controls_test.go b/ibm/service/scc/data_source_ibm_scc_report_controls_test.go index d3e6d13eeb..2aa637c192 100644 --- a/ibm/service/scc/data_source_ibm_scc_report_controls_test.go +++ b/ibm/service/scc/data_source_ibm_scc_report_controls_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/scc/data_source_ibm_scc_report_evaluations_test.go b/ibm/service/scc/data_source_ibm_scc_report_evaluations_test.go index e7019dc543..d1d0e44c35 100644 --- a/ibm/service/scc/data_source_ibm_scc_report_evaluations_test.go +++ b/ibm/service/scc/data_source_ibm_scc_report_evaluations_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/scc/data_source_ibm_scc_report_resources_test.go b/ibm/service/scc/data_source_ibm_scc_report_resources_test.go index 4334ea3fa2..e7b71ed86e 100644 --- a/ibm/service/scc/data_source_ibm_scc_report_resources_test.go +++ b/ibm/service/scc/data_source_ibm_scc_report_resources_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/scc/data_source_ibm_scc_report_rule_test.go b/ibm/service/scc/data_source_ibm_scc_report_rule_test.go index ace64c9529..15aac6c893 100644 --- a/ibm/service/scc/data_source_ibm_scc_report_rule_test.go +++ b/ibm/service/scc/data_source_ibm_scc_report_rule_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/scc/data_source_ibm_scc_report_summary_test.go b/ibm/service/scc/data_source_ibm_scc_report_summary_test.go index 6339470867..049d6f39d0 100644 --- a/ibm/service/scc/data_source_ibm_scc_report_summary_test.go +++ b/ibm/service/scc/data_source_ibm_scc_report_summary_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/scc/data_source_ibm_scc_report_tags_test.go b/ibm/service/scc/data_source_ibm_scc_report_tags_test.go index c7ff551d09..bdb930daaf 100644 --- a/ibm/service/scc/data_source_ibm_scc_report_tags_test.go +++ b/ibm/service/scc/data_source_ibm_scc_report_tags_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/scc/data_source_ibm_scc_report_test.go b/ibm/service/scc/data_source_ibm_scc_report_test.go index 9aad4050f7..9c55d4f86b 100644 --- a/ibm/service/scc/data_source_ibm_scc_report_test.go +++ b/ibm/service/scc/data_source_ibm_scc_report_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/scc/data_source_ibm_scc_report_violation_drift_test.go b/ibm/service/scc/data_source_ibm_scc_report_violation_drift_test.go index 496779ad72..9b2eedbeb1 100644 --- a/ibm/service/scc/data_source_ibm_scc_report_violation_drift_test.go +++ b/ibm/service/scc/data_source_ibm_scc_report_violation_drift_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/scc/data_source_ibm_scc_rule_test.go b/ibm/service/scc/data_source_ibm_scc_rule_test.go index e79fe4ccac..57ba97ab14 100644 --- a/ibm/service/scc/data_source_ibm_scc_rule_test.go +++ b/ibm/service/scc/data_source_ibm_scc_rule_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/scc/resource_ibm_scc_control_library_test.go b/ibm/service/scc/resource_ibm_scc_control_library_test.go index 4b3d380fe7..c8bc33101b 100644 --- a/ibm/service/scc/resource_ibm_scc_control_library_test.go +++ b/ibm/service/scc/resource_ibm_scc_control_library_test.go @@ -8,9 +8,9 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/scc/resource_ibm_scc_instance_settings_test.go b/ibm/service/scc/resource_ibm_scc_instance_settings_test.go index d8914a4d63..9d14cfefc4 100644 --- a/ibm/service/scc/resource_ibm_scc_instance_settings_test.go +++ b/ibm/service/scc/resource_ibm_scc_instance_settings_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/scc/resource_ibm_scc_profile_attachment_test.go b/ibm/service/scc/resource_ibm_scc_profile_attachment_test.go index bb2ba775ef..04b6405641 100644 --- a/ibm/service/scc/resource_ibm_scc_profile_attachment_test.go +++ b/ibm/service/scc/resource_ibm_scc_profile_attachment_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/scc/resource_ibm_scc_profile_test.go b/ibm/service/scc/resource_ibm_scc_profile_test.go index 9ecb68ac6c..aa4cea35f0 100644 --- a/ibm/service/scc/resource_ibm_scc_profile_test.go +++ b/ibm/service/scc/resource_ibm_scc_profile_test.go @@ -8,9 +8,9 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/scc/resource_ibm_scc_provider_type_instance_test.go b/ibm/service/scc/resource_ibm_scc_provider_type_instance_test.go index a52c91dc6e..9ddc1b8fc1 100644 --- a/ibm/service/scc/resource_ibm_scc_provider_type_instance_test.go +++ b/ibm/service/scc/resource_ibm_scc_provider_type_instance_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/scc/resource_ibm_scc_rule_test.go b/ibm/service/scc/resource_ibm_scc_rule_test.go index d8af238f04..8edec47cd4 100644 --- a/ibm/service/scc/resource_ibm_scc_rule_test.go +++ b/ibm/service/scc/resource_ibm_scc_rule_test.go @@ -8,9 +8,9 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/schematics/data_source_ibm_schematics_action_test.go b/ibm/service/schematics/data_source_ibm_schematics_action_test.go index b59d973354..dda238ef13 100644 --- a/ibm/service/schematics/data_source_ibm_schematics_action_test.go +++ b/ibm/service/schematics/data_source_ibm_schematics_action_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMSchematicsActionDataSourceBasic(t *testing.T) { diff --git a/ibm/service/schematics/data_source_ibm_schematics_agent_deploy_test.go b/ibm/service/schematics/data_source_ibm_schematics_agent_deploy_test.go index 1a00e2eef4..b8f2b74b9e 100644 --- a/ibm/service/schematics/data_source_ibm_schematics_agent_deploy_test.go +++ b/ibm/service/schematics/data_source_ibm_schematics_agent_deploy_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/schematics/data_source_ibm_schematics_agent_health_test.go b/ibm/service/schematics/data_source_ibm_schematics_agent_health_test.go index 0aae09bed8..98f50fd88c 100644 --- a/ibm/service/schematics/data_source_ibm_schematics_agent_health_test.go +++ b/ibm/service/schematics/data_source_ibm_schematics_agent_health_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/schematics/data_source_ibm_schematics_agent_prs_test.go b/ibm/service/schematics/data_source_ibm_schematics_agent_prs_test.go index e872a6b1a6..878ab32cdd 100644 --- a/ibm/service/schematics/data_source_ibm_schematics_agent_prs_test.go +++ b/ibm/service/schematics/data_source_ibm_schematics_agent_prs_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/schematics/data_source_ibm_schematics_agent_test.go b/ibm/service/schematics/data_source_ibm_schematics_agent_test.go index c5d5ab56b5..2023e2befe 100644 --- a/ibm/service/schematics/data_source_ibm_schematics_agent_test.go +++ b/ibm/service/schematics/data_source_ibm_schematics_agent_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/schematics/data_source_ibm_schematics_agents_test.go b/ibm/service/schematics/data_source_ibm_schematics_agents_test.go index ea9b65b48a..1776f48f05 100644 --- a/ibm/service/schematics/data_source_ibm_schematics_agents_test.go +++ b/ibm/service/schematics/data_source_ibm_schematics_agents_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/schematics/data_source_ibm_schematics_inventory_test.go b/ibm/service/schematics/data_source_ibm_schematics_inventory_test.go index 5e29ebe267..00f017099c 100644 --- a/ibm/service/schematics/data_source_ibm_schematics_inventory_test.go +++ b/ibm/service/schematics/data_source_ibm_schematics_inventory_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMSchematicsInventoryDataSourceBasic(t *testing.T) { diff --git a/ibm/service/schematics/data_source_ibm_schematics_job_test.go b/ibm/service/schematics/data_source_ibm_schematics_job_test.go index c159433eaf..6eef9a0231 100644 --- a/ibm/service/schematics/data_source_ibm_schematics_job_test.go +++ b/ibm/service/schematics/data_source_ibm_schematics_job_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMSchematicsJobDataSourceBasic(t *testing.T) { diff --git a/ibm/service/schematics/data_source_ibm_schematics_output_test.go b/ibm/service/schematics/data_source_ibm_schematics_output_test.go index fb75b1c8f8..e5bd27c072 100644 --- a/ibm/service/schematics/data_source_ibm_schematics_output_test.go +++ b/ibm/service/schematics/data_source_ibm_schematics_output_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMSchematicsOutputDataSourceBasic(t *testing.T) { diff --git a/ibm/service/schematics/data_source_ibm_schematics_policies_test.go b/ibm/service/schematics/data_source_ibm_schematics_policies_test.go index a1ed441df9..d2452e95ef 100644 --- a/ibm/service/schematics/data_source_ibm_schematics_policies_test.go +++ b/ibm/service/schematics/data_source_ibm_schematics_policies_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/schematics/data_source_ibm_schematics_policy_test.go b/ibm/service/schematics/data_source_ibm_schematics_policy_test.go index d9075ac22d..ace0f204df 100644 --- a/ibm/service/schematics/data_source_ibm_schematics_policy_test.go +++ b/ibm/service/schematics/data_source_ibm_schematics_policy_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/schematics/data_source_ibm_schematics_state_test.go b/ibm/service/schematics/data_source_ibm_schematics_state_test.go index 5286bef52f..156f188b1d 100644 --- a/ibm/service/schematics/data_source_ibm_schematics_state_test.go +++ b/ibm/service/schematics/data_source_ibm_schematics_state_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMSchematicsStateDataSourceBasic(t *testing.T) { diff --git a/ibm/service/schematics/data_source_ibm_schematics_workspace_test.go b/ibm/service/schematics/data_source_ibm_schematics_workspace_test.go index ccbaf9885d..31a7f85871 100644 --- a/ibm/service/schematics/data_source_ibm_schematics_workspace_test.go +++ b/ibm/service/schematics/data_source_ibm_schematics_workspace_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMSchematicsWorkspaceDataSourceBasic(t *testing.T) { diff --git a/ibm/service/schematics/resource_ibm_schematics_action_test.go b/ibm/service/schematics/resource_ibm_schematics_action_test.go index 94e50fa586..524f5c832d 100644 --- a/ibm/service/schematics/resource_ibm_schematics_action_test.go +++ b/ibm/service/schematics/resource_ibm_schematics_action_test.go @@ -10,9 +10,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/schematics-go-sdk/schematicsv1" ) diff --git a/ibm/service/schematics/resource_ibm_schematics_agent.go b/ibm/service/schematics/resource_ibm_schematics_agent.go index 5dd0150fe9..0566570aca 100644 --- a/ibm/service/schematics/resource_ibm_schematics_agent.go +++ b/ibm/service/schematics/resource_ibm_schematics_agent.go @@ -10,7 +10,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -774,7 +774,7 @@ func resourceIbmSchematicsAgentRead(context context.Context, d *schema.ResourceD } func isWaitForAgentDestroyResources(context context.Context, schematicsClient *schematicsv1.SchematicsV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for agent (%s) resources to be destroyed.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", agentProvisioningStatusCodeJobInProgress, agentProvisioningStatusCodeJobPending, agentProvisioningStatusCodeJobReadyToExecute, agentProvisioningStatusCodeJobStopInProgress}, Target: []string{agentProvisioningStatusCodeJobFinished, agentProvisioningStatusCodeJobFailed, agentProvisioningStatusCodeJobCancelled, agentProvisioningStatusCodeJobStopped, ""}, Refresh: agentDestroyRefreshFunc(schematicsClient, id), @@ -784,7 +784,7 @@ func isWaitForAgentDestroyResources(context context.Context, schematicsClient *s } return stateConf.WaitForStateContext(context) } -func agentDestroyRefreshFunc(schematicsClient *schematicsv1.SchematicsV1, id string) resource.StateRefreshFunc { +func agentDestroyRefreshFunc(schematicsClient *schematicsv1.SchematicsV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getAgentDataOptions := &schematicsv1.GetAgentDataOptions{ AgentID: core.StringPtr(id), diff --git a/ibm/service/schematics/resource_ibm_schematics_agent_deploy.go b/ibm/service/schematics/resource_ibm_schematics_agent_deploy.go index 5610a01ef6..717d5f676c 100644 --- a/ibm/service/schematics/resource_ibm_schematics_agent_deploy.go +++ b/ibm/service/schematics/resource_ibm_schematics_agent_deploy.go @@ -10,7 +10,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -141,7 +141,7 @@ const ( func isWaitForAgentAvailable(context context.Context, schematicsClient *schematicsv1.SchematicsV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for agent (%s) to be available.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", agentProvisioningStatusCodeJobInProgress, agentProvisioningStatusCodeJobPending, agentProvisioningStatusCodeJobReadyToExecute, agentProvisioningStatusCodeJobStopInProgress}, Target: []string{agentProvisioningStatusCodeJobFinished, agentProvisioningStatusCodeJobFailed, agentProvisioningStatusCodeJobCancelled, agentProvisioningStatusCodeJobStopped, ""}, Refresh: agentRefreshFunc(schematicsClient, id), @@ -151,7 +151,7 @@ func isWaitForAgentAvailable(context context.Context, schematicsClient *schemati } return stateConf.WaitForStateContext(context) } -func agentRefreshFunc(schematicsClient *schematicsv1.SchematicsV1, id string) resource.StateRefreshFunc { +func agentRefreshFunc(schematicsClient *schematicsv1.SchematicsV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getAgentDataOptions := &schematicsv1.GetAgentDataOptions{ AgentID: core.StringPtr(id), diff --git a/ibm/service/schematics/resource_ibm_schematics_agent_deploy_test.go b/ibm/service/schematics/resource_ibm_schematics_agent_deploy_test.go index 0ff719cb81..f9fe13defd 100644 --- a/ibm/service/schematics/resource_ibm_schematics_agent_deploy_test.go +++ b/ibm/service/schematics/resource_ibm_schematics_agent_deploy_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/schematics/resource_ibm_schematics_agent_health_test.go b/ibm/service/schematics/resource_ibm_schematics_agent_health_test.go index 9ab319b352..a0cdb59831 100644 --- a/ibm/service/schematics/resource_ibm_schematics_agent_health_test.go +++ b/ibm/service/schematics/resource_ibm_schematics_agent_health_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/schematics/resource_ibm_schematics_agent_prs_test.go b/ibm/service/schematics/resource_ibm_schematics_agent_prs_test.go index 1f06d8db2b..b1fb2fb591 100644 --- a/ibm/service/schematics/resource_ibm_schematics_agent_prs_test.go +++ b/ibm/service/schematics/resource_ibm_schematics_agent_prs_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/schematics/resource_ibm_schematics_agent_test.go b/ibm/service/schematics/resource_ibm_schematics_agent_test.go index 3a2dd4384e..242c967a7d 100644 --- a/ibm/service/schematics/resource_ibm_schematics_agent_test.go +++ b/ibm/service/schematics/resource_ibm_schematics_agent_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/schematics/resource_ibm_schematics_inventory_test.go b/ibm/service/schematics/resource_ibm_schematics_inventory_test.go index 0f2f454953..321f1a16bb 100644 --- a/ibm/service/schematics/resource_ibm_schematics_inventory_test.go +++ b/ibm/service/schematics/resource_ibm_schematics_inventory_test.go @@ -10,9 +10,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/schematics-go-sdk/schematicsv1" ) diff --git a/ibm/service/schematics/resource_ibm_schematics_job_test.go b/ibm/service/schematics/resource_ibm_schematics_job_test.go index fb877f7866..d4d4990899 100644 --- a/ibm/service/schematics/resource_ibm_schematics_job_test.go +++ b/ibm/service/schematics/resource_ibm_schematics_job_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/schematics-go-sdk/schematicsv1" ) diff --git a/ibm/service/schematics/resource_ibm_schematics_policy_test.go b/ibm/service/schematics/resource_ibm_schematics_policy_test.go index 92807c354f..4acb7feae2 100644 --- a/ibm/service/schematics/resource_ibm_schematics_policy_test.go +++ b/ibm/service/schematics/resource_ibm_schematics_policy_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/schematics/resource_ibm_schematics_resource_query_test.go b/ibm/service/schematics/resource_ibm_schematics_resource_query_test.go index 1d4b652861..648dab2414 100644 --- a/ibm/service/schematics/resource_ibm_schematics_resource_query_test.go +++ b/ibm/service/schematics/resource_ibm_schematics_resource_query_test.go @@ -10,9 +10,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/schematics-go-sdk/schematicsv1" ) diff --git a/ibm/service/schematics/resource_ibm_schematics_workspace_test.go b/ibm/service/schematics/resource_ibm_schematics_workspace_test.go index 3b0ad8d735..e8ed00c9ed 100644 --- a/ibm/service/schematics/resource_ibm_schematics_workspace_test.go +++ b/ibm/service/schematics/resource_ibm_schematics_workspace_test.go @@ -10,9 +10,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/schematics-go-sdk/schematicsv1" ) diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_arbitrary_secret_metadata_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_arbitrary_secret_metadata_test.go index 34cc1c262c..f41914edb5 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_arbitrary_secret_metadata_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_arbitrary_secret_metadata_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_arbitrary_secret_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_arbitrary_secret_test.go index 9675cb28a4..15ea13128d 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_arbitrary_secret_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_arbitrary_secret_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_configurations_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_configurations_test.go index 1b7b23c688..059b02e085 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_configurations_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_configurations_test.go @@ -5,9 +5,10 @@ package secretsmanager_test import ( "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "testing" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_en_registration_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_en_registration_test.go index 882f692827..2682cecaeb 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_en_registration_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_en_registration_test.go @@ -5,9 +5,10 @@ package secretsmanager_test import ( "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "testing" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_iam_credentials_configuration_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_iam_credentials_configuration_test.go index 3a4dad1820..408b79e53d 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_iam_credentials_configuration_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_iam_credentials_configuration_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_iam_credentials_secret_metadata_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_iam_credentials_secret_metadata_test.go index 266fd6d84e..e8456b103b 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_iam_credentials_secret_metadata_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_iam_credentials_secret_metadata_test.go @@ -5,9 +5,10 @@ package secretsmanager_test import ( "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "testing" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_iam_credentials_secret_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_iam_credentials_secret_test.go index 1638bf7dd5..1ab6fb3078 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_iam_credentials_secret_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_iam_credentials_secret_test.go @@ -5,9 +5,10 @@ package secretsmanager_test import ( "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "testing" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_imported_certificate_metadata_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_imported_certificate_metadata_test.go index f791cb61b1..a155830660 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_imported_certificate_metadata_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_imported_certificate_metadata_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_imported_certificate_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_imported_certificate_test.go index 76c9ba5b6a..359e7230b1 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_imported_certificate_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_imported_certificate_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_kv_secret_metadata_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_kv_secret_metadata_test.go index 6ef25aad9c..d8dcc0265f 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_kv_secret_metadata_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_kv_secret_metadata_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_kv_secret_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_kv_secret_test.go index 072af95792..bd4ac859c5 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_kv_secret_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_kv_secret_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_private_certificate_configuration_intermediate_ca_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_private_certificate_configuration_intermediate_ca_test.go index e347ec2d13..71ab0d7652 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_private_certificate_configuration_intermediate_ca_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_private_certificate_configuration_intermediate_ca_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_private_certificate_configuration_root_ca_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_private_certificate_configuration_root_ca_test.go index a2b2dfe0af..c2dee66612 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_private_certificate_configuration_root_ca_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_private_certificate_configuration_root_ca_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_private_certificate_configuration_template_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_private_certificate_configuration_template_test.go index dd7165c665..03de036d5f 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_private_certificate_configuration_template_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_private_certificate_configuration_template_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_private_certificate_metadata_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_private_certificate_metadata_test.go index efcb9e42bd..b736cb2c53 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_private_certificate_metadata_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_private_certificate_metadata_test.go @@ -5,9 +5,10 @@ package secretsmanager_test import ( "fmt" - acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "testing" + + acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmSmPrivateCertificateMetadataDataSourceBasic(t *testing.T) { diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_private_certificate_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_private_certificate_test.go index cfe6ad93c3..a2615bfa8a 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_private_certificate_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_private_certificate_test.go @@ -5,9 +5,10 @@ package secretsmanager_test import ( "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "testing" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_public_certificate_configuration_ca_lets_encrypt_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_public_certificate_configuration_ca_lets_encrypt_test.go index 97750ba699..70034eac09 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_public_certificate_configuration_ca_lets_encrypt_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_public_certificate_configuration_ca_lets_encrypt_test.go @@ -5,9 +5,10 @@ package secretsmanager_test import ( "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "testing" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_public_certificate_configuration_dns_cis_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_public_certificate_configuration_dns_cis_test.go index 60011815e6..1598ef05cd 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_public_certificate_configuration_dns_cis_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_public_certificate_configuration_dns_cis_test.go @@ -5,9 +5,10 @@ package secretsmanager_test import ( "fmt" - acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "testing" + + acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmSmPublicCertificateConfigurationDnsCisDataSourceBasic(t *testing.T) { diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_public_certificate_configuration_dns_classic_infrastructure_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_public_certificate_configuration_dns_classic_infrastructure_test.go index af875656cf..82591fbba9 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_public_certificate_configuration_dns_classic_infrastructure_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_public_certificate_configuration_dns_classic_infrastructure_test.go @@ -5,9 +5,10 @@ package secretsmanager_test import ( "fmt" - acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "testing" + + acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmSmPublicCertificateConfigurationDnsClassicInfrastructureDataSourceBasic(t *testing.T) { diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_public_certificate_metadata_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_public_certificate_metadata_test.go index 09355e9008..b93d08c6db 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_public_certificate_metadata_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_public_certificate_metadata_test.go @@ -5,9 +5,10 @@ package secretsmanager_test import ( "fmt" - acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "testing" + + acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmSmPublicCertificateMetadataDataSourceBasic(t *testing.T) { diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_public_certificate_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_public_certificate_test.go index 0b97d93b51..54a0b5b971 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_public_certificate_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_public_certificate_test.go @@ -5,9 +5,10 @@ package secretsmanager_test import ( "fmt" - acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "testing" + + acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmSmPublicCertificateDataSourceBasic(t *testing.T) { diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_secret_group_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_secret_group_test.go index 95b2072974..efdcda132b 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_secret_group_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_secret_group_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_secret_groups_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_secret_groups_test.go index e0e6990eaf..f91f45d7dc 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_secret_groups_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_secret_groups_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_secrets_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_secrets_test.go index 51307246ca..fe1bb93c46 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_secrets_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_secrets_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_service_credentials_secret_metadata_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_service_credentials_secret_metadata_test.go index 91ad1c0491..27a7f7fce7 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_service_credentials_secret_metadata_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_service_credentials_secret_metadata_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_service_credentials_secret_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_service_credentials_secret_test.go index eadf2f92c8..497a4138c3 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_service_credentials_secret_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_service_credentials_secret_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_username_password_secret_metadata_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_username_password_secret_metadata_test.go index 2cfc9639df..32a18a11b5 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_username_password_secret_metadata_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_username_password_secret_metadata_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/secretsmanager/data_source_ibm_sm_username_password_secret_test.go b/ibm/service/secretsmanager/data_source_ibm_sm_username_password_secret_test.go index 0a59be3abd..37f3996a4c 100644 --- a/ibm/service/secretsmanager/data_source_ibm_sm_username_password_secret_test.go +++ b/ibm/service/secretsmanager/data_source_ibm_sm_username_password_secret_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/secretsmanager/resource_ibm_sm_arbitrary_secret.go b/ibm/service/secretsmanager/resource_ibm_sm_arbitrary_secret.go index a484538f5e..c1ce7df3a9 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_arbitrary_secret.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_arbitrary_secret.go @@ -6,15 +6,16 @@ package secretsmanager import ( "context" "fmt" - "github.com/IBM-Cloud/bluemix-go/bmxerror" - "github.com/go-openapi/strfmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/pkg/errors" "log" "strings" "time" + "github.com/IBM-Cloud/bluemix-go/bmxerror" + "github.com/go-openapi/strfmt" + "github.com/pkg/errors" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -188,7 +189,7 @@ func waitForIbmSmArbitrarySecretCreate(secretsManagerClient *secretsmanagerv2.Se getSecretOptions.SetID(secretId) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pre_activation"}, Target: []string{"active"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/secretsmanager/resource_ibm_sm_arbitrary_secret_test.go b/ibm/service/secretsmanager/resource_ibm_sm_arbitrary_secret_test.go index 104da880ca..814d33028a 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_arbitrary_secret_test.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_arbitrary_secret_test.go @@ -5,12 +5,13 @@ package secretsmanager_test import ( "fmt" - "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "strings" "testing" + "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM/secrets-manager-go-sdk/v2/secretsmanagerv2" ) diff --git a/ibm/service/secretsmanager/resource_ibm_sm_en_registration_test.go b/ibm/service/secretsmanager/resource_ibm_sm_en_registration_test.go index 931e7dd8b5..7cee382c14 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_en_registration_test.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_en_registration_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/secretsmanager/resource_ibm_sm_iam_credentials_configuration_test.go b/ibm/service/secretsmanager/resource_ibm_sm_iam_credentials_configuration_test.go index 5f18e46bf2..dfbff4f862 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_iam_credentials_configuration_test.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_iam_credentials_configuration_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/secretsmanager/resource_ibm_sm_iam_credentials_secret.go b/ibm/service/secretsmanager/resource_ibm_sm_iam_credentials_secret.go index f455d2ce51..da23649714 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_iam_credentials_secret.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_iam_credentials_secret.go @@ -6,13 +6,14 @@ package secretsmanager import ( "context" "fmt" - "github.com/IBM-Cloud/bluemix-go/bmxerror" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "log" "strings" "time" + "github.com/IBM-Cloud/bluemix-go/bmxerror" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -268,7 +269,7 @@ func waitForIbmSmIamCredentialsSecretCreate(secretsManagerClient *secretsmanager getSecretOptions.SetID(secretId) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pre_activation"}, Target: []string{"active"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/secretsmanager/resource_ibm_sm_iam_credentials_secret_test.go b/ibm/service/secretsmanager/resource_ibm_sm_iam_credentials_secret_test.go index 5c1d447669..e2a328b326 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_iam_credentials_secret_test.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_iam_credentials_secret_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/secretsmanager/resource_ibm_sm_imported_certificate.go b/ibm/service/secretsmanager/resource_ibm_sm_imported_certificate.go index c124568a14..915d06bbb2 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_imported_certificate.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_imported_certificate.go @@ -6,14 +6,15 @@ package secretsmanager import ( "context" "fmt" - "github.com/IBM-Cloud/bluemix-go/bmxerror" - "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "log" "strings" "time" + "github.com/IBM-Cloud/bluemix-go/bmxerror" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/go-sdk-core/v5/core" @@ -268,7 +269,7 @@ func waitForIbmSmImportedCertificateCreate(secretsManagerClient *secretsmanagerv getSecretOptions.SetID(secretId) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pre_activation"}, Target: []string{"active"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/secretsmanager/resource_ibm_sm_imported_certificate_test.go b/ibm/service/secretsmanager/resource_ibm_sm_imported_certificate_test.go index 15517cc293..1466a54c6d 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_imported_certificate_test.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_imported_certificate_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/secretsmanager/resource_ibm_sm_kv_secret.go b/ibm/service/secretsmanager/resource_ibm_sm_kv_secret.go index f1b26b27aa..4aef727cf2 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_kv_secret.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_kv_secret.go @@ -6,14 +6,15 @@ package secretsmanager import ( "context" "fmt" - "github.com/IBM-Cloud/bluemix-go/bmxerror" - "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "log" "strings" "time" + "github.com/IBM-Cloud/bluemix-go/bmxerror" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/go-sdk-core/v5/core" @@ -180,7 +181,7 @@ func waitForIbmSmKvSecretCreate(secretsManagerClient *secretsmanagerv2.SecretsMa getSecretOptions.SetID(secretId) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pre_activation"}, Target: []string{"active"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/secretsmanager/resource_ibm_sm_kv_secret_test.go b/ibm/service/secretsmanager/resource_ibm_sm_kv_secret_test.go index ba10eb774f..1c05712ac4 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_kv_secret_test.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_kv_secret_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/secretsmanager/resource_ibm_sm_private_certificate.go b/ibm/service/secretsmanager/resource_ibm_sm_private_certificate.go index 0da1229d2b..f597ae1579 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_private_certificate.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_private_certificate.go @@ -6,14 +6,15 @@ package secretsmanager import ( "context" "fmt" - "github.com/IBM-Cloud/bluemix-go/bmxerror" - "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "log" "strings" "time" + "github.com/IBM-Cloud/bluemix-go/bmxerror" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/go-sdk-core/v5/core" @@ -365,7 +366,7 @@ func waitForIbmSmPrivateCertificateCreate(secretsManagerClient *secretsmanagerv2 getSecretOptions.SetID(secretId) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pre_activation"}, Target: []string{"active"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/secretsmanager/resource_ibm_sm_private_certificate_configuration_action_set_signed_test.go b/ibm/service/secretsmanager/resource_ibm_sm_private_certificate_configuration_action_set_signed_test.go index 80ff783e69..249907b92b 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_private_certificate_configuration_action_set_signed_test.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_private_certificate_configuration_action_set_signed_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/secretsmanager/resource_ibm_sm_private_certificate_configuration_action_sign_csr_test.go b/ibm/service/secretsmanager/resource_ibm_sm_private_certificate_configuration_action_sign_csr_test.go index 1e3055140e..65d59bb8e1 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_private_certificate_configuration_action_sign_csr_test.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_private_certificate_configuration_action_sign_csr_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/secretsmanager/resource_ibm_sm_private_certificate_configuration_intermediate_ca_test.go b/ibm/service/secretsmanager/resource_ibm_sm_private_certificate_configuration_intermediate_ca_test.go index 0865e6ec58..fa887bb15e 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_private_certificate_configuration_intermediate_ca_test.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_private_certificate_configuration_intermediate_ca_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/secretsmanager/resource_ibm_sm_private_certificate_configuration_root_ca_test.go b/ibm/service/secretsmanager/resource_ibm_sm_private_certificate_configuration_root_ca_test.go index b9825fd9e5..99468013b2 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_private_certificate_configuration_root_ca_test.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_private_certificate_configuration_root_ca_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/secretsmanager/resource_ibm_sm_private_certificate_configuration_template_test.go b/ibm/service/secretsmanager/resource_ibm_sm_private_certificate_configuration_template_test.go index d41b4c01e7..bf54c1b8df 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_private_certificate_configuration_template_test.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_private_certificate_configuration_template_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/secretsmanager/resource_ibm_sm_private_certificate_test.go b/ibm/service/secretsmanager/resource_ibm_sm_private_certificate_test.go index 3f87b63d86..2cf6219af0 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_private_certificate_test.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_private_certificate_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/secretsmanager/resource_ibm_sm_public_certificate.go b/ibm/service/secretsmanager/resource_ibm_sm_public_certificate.go index 0f8172c81e..1a03a57fed 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_public_certificate.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_public_certificate.go @@ -8,11 +8,6 @@ import ( "context" "encoding/json" "fmt" - "github.com/IBM-Cloud/bluemix-go/bmxerror" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/client-v1" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/edgegrid" - "github.com/akamai/AkamaiOPEN-edgegrid-golang/v5/pkg/dns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "io/ioutil" "log" "reflect" @@ -20,7 +15,13 @@ import ( "strings" "time" + "github.com/IBM-Cloud/bluemix-go/bmxerror" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/client-v1" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/edgegrid" + "github.com/akamai/AkamaiOPEN-edgegrid-golang/v5/pkg/dns" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -458,7 +459,7 @@ func waitForIbmSmPublicCertificateCreate(secretsManagerClient *secretsmanagerv2. secretId := id[2] getSecretOptions.SetID(secretId) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{pendingStatus}, Target: []string{targetStatus}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/secretsmanager/resource_ibm_sm_public_certificate_action_validate_manual_dns_test.go b/ibm/service/secretsmanager/resource_ibm_sm_public_certificate_action_validate_manual_dns_test.go index 435fe8367d..2bc012e718 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_public_certificate_action_validate_manual_dns_test.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_public_certificate_action_validate_manual_dns_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/secretsmanager/resource_ibm_sm_public_certificate_configuration_ca_lets_encrypt_test.go b/ibm/service/secretsmanager/resource_ibm_sm_public_certificate_configuration_ca_lets_encrypt_test.go index 16a471670c..0f8d4f3849 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_public_certificate_configuration_ca_lets_encrypt_test.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_public_certificate_configuration_ca_lets_encrypt_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/secretsmanager/resource_ibm_sm_public_certificate_configuration_dns_cis_test.go b/ibm/service/secretsmanager/resource_ibm_sm_public_certificate_configuration_dns_cis_test.go index 057dd00d7f..f0d21a3100 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_public_certificate_configuration_dns_cis_test.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_public_certificate_configuration_dns_cis_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/secretsmanager/resource_ibm_sm_public_certificate_configuration_dns_classic_infrastructure_test.go b/ibm/service/secretsmanager/resource_ibm_sm_public_certificate_configuration_dns_classic_infrastructure_test.go index dd1dbbcca3..df82febb59 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_public_certificate_configuration_dns_classic_infrastructure_test.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_public_certificate_configuration_dns_classic_infrastructure_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/secretsmanager/resource_ibm_sm_public_certificate_test.go b/ibm/service/secretsmanager/resource_ibm_sm_public_certificate_test.go index 805eef83af..c731b6d120 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_public_certificate_test.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_public_certificate_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/secretsmanager/resource_ibm_sm_secret_group_test.go b/ibm/service/secretsmanager/resource_ibm_sm_secret_group_test.go index ffeb54fda6..05c846adc4 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_secret_group_test.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_secret_group_test.go @@ -8,9 +8,9 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/secretsmanager/resource_ibm_sm_service_credentials_secret_test.go b/ibm/service/secretsmanager/resource_ibm_sm_service_credentials_secret_test.go index f5995d79aa..1b5b8ce0c4 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_service_credentials_secret_test.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_service_credentials_secret_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/secretsmanager/resource_ibm_sm_username_password_secret.go b/ibm/service/secretsmanager/resource_ibm_sm_username_password_secret.go index 4a9562e3d3..2a2daae101 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_username_password_secret.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_username_password_secret.go @@ -6,14 +6,15 @@ package secretsmanager import ( "context" "fmt" - "github.com/IBM-Cloud/bluemix-go/bmxerror" - "github.com/go-openapi/strfmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "log" "strings" "time" + "github.com/IBM-Cloud/bluemix-go/bmxerror" + "github.com/go-openapi/strfmt" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -260,7 +261,7 @@ func waitForIbmSmUsernamePasswordSecretCreate(secretsManagerClient *secretsmanag secretId := id[2] getSecretOptions.SetID(secretId) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pre_activation"}, Target: []string{"active"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/secretsmanager/resource_ibm_sm_username_password_secret_test.go b/ibm/service/secretsmanager/resource_ibm_sm_username_password_secret_test.go index 2a3a9de876..9ebbb032ef 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_username_password_secret_test.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_username_password_secret_test.go @@ -9,8 +9,8 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/secretsmanager/utils_for_test.go b/ibm/service/secretsmanager/utils_for_test.go index 55685f6545..8d52fb6bb5 100644 --- a/ibm/service/secretsmanager/utils_for_test.go +++ b/ibm/service/secretsmanager/utils_for_test.go @@ -6,15 +6,16 @@ package secretsmanager_test import ( "encoding/json" "fmt" - "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/go-openapi/strfmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "os" "strconv" "strings" "time" + "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" + "github.com/go-openapi/strfmt" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/terraform" + acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM/secrets-manager-go-sdk/v2/secretsmanagerv2" ) diff --git a/ibm/service/transitgateway/data_source_ibm_tg_connection_prefix_filter_test.go b/ibm/service/transitgateway/data_source_ibm_tg_connection_prefix_filter_test.go index 339db4ce81..813771395d 100644 --- a/ibm/service/transitgateway/data_source_ibm_tg_connection_prefix_filter_test.go +++ b/ibm/service/transitgateway/data_source_ibm_tg_connection_prefix_filter_test.go @@ -5,10 +5,11 @@ package transitgateway_test import ( "fmt" - acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "testing" + + acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMTransitGatewayConnectionPrefixFilterDataSource_basic(t *testing.T) { diff --git a/ibm/service/transitgateway/data_source_ibm_tg_connection_prefix_filters_test.go b/ibm/service/transitgateway/data_source_ibm_tg_connection_prefix_filters_test.go index a3a7235a35..363d8e8d04 100644 --- a/ibm/service/transitgateway/data_source_ibm_tg_connection_prefix_filters_test.go +++ b/ibm/service/transitgateway/data_source_ibm_tg_connection_prefix_filters_test.go @@ -5,10 +5,11 @@ package transitgateway_test import ( "fmt" - acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "testing" + + acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMTransitGatewayConnectionPrefixFiltersDataSource_basic(t *testing.T) { diff --git a/ibm/service/transitgateway/data_source_ibm_tg_gateway_test.go b/ibm/service/transitgateway/data_source_ibm_tg_gateway_test.go index 42efd70f38..284cbf3e6f 100644 --- a/ibm/service/transitgateway/data_source_ibm_tg_gateway_test.go +++ b/ibm/service/transitgateway/data_source_ibm_tg_gateway_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMTransitGatewayDataSource_basic(t *testing.T) { diff --git a/ibm/service/transitgateway/data_source_ibm_tg_gateways_test.go b/ibm/service/transitgateway/data_source_ibm_tg_gateways_test.go index 21b167303e..298549ba12 100644 --- a/ibm/service/transitgateway/data_source_ibm_tg_gateways_test.go +++ b/ibm/service/transitgateway/data_source_ibm_tg_gateways_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMTransitGatewaysDataSource_basic(t *testing.T) { diff --git a/ibm/service/transitgateway/data_source_ibm_tg_location_test.go b/ibm/service/transitgateway/data_source_ibm_tg_location_test.go index 00707be1d1..5076376bce 100644 --- a/ibm/service/transitgateway/data_source_ibm_tg_location_test.go +++ b/ibm/service/transitgateway/data_source_ibm_tg_location_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMTransitGatewaysLocationDataSource_basic(t *testing.T) { diff --git a/ibm/service/transitgateway/data_source_ibm_tg_locations_test.go b/ibm/service/transitgateway/data_source_ibm_tg_locations_test.go index 43319097b7..95a30b1228 100644 --- a/ibm/service/transitgateway/data_source_ibm_tg_locations_test.go +++ b/ibm/service/transitgateway/data_source_ibm_tg_locations_test.go @@ -8,7 +8,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMTransitGatewaysLocationsDataSource_basic(t *testing.T) { diff --git a/ibm/service/transitgateway/data_source_ibm_tg_route_report_test.go b/ibm/service/transitgateway/data_source_ibm_tg_route_report_test.go index 9ef2d89952..e5d83693f4 100644 --- a/ibm/service/transitgateway/data_source_ibm_tg_route_report_test.go +++ b/ibm/service/transitgateway/data_source_ibm_tg_route_report_test.go @@ -5,10 +5,11 @@ package transitgateway_test import ( "fmt" - acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "testing" + + acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMTransitGatewayRouteReportDataSource_basic(t *testing.T) { diff --git a/ibm/service/transitgateway/data_source_ibm_tg_route_reports_test.go b/ibm/service/transitgateway/data_source_ibm_tg_route_reports_test.go index 6fc3f82f86..9a40fcf83c 100644 --- a/ibm/service/transitgateway/data_source_ibm_tg_route_reports_test.go +++ b/ibm/service/transitgateway/data_source_ibm_tg_route_reports_test.go @@ -8,9 +8,9 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMTransitGatewayRouteReportsDataSource_basic(t *testing.T) { diff --git a/ibm/service/transitgateway/resource_ibm_tg_gateway.go b/ibm/service/transitgateway/resource_ibm_tg_gateway.go index 926ba43efe..4160fd37bf 100644 --- a/ibm/service/transitgateway/resource_ibm_tg_gateway.go +++ b/ibm/service/transitgateway/resource_ibm_tg_gateway.go @@ -12,7 +12,7 @@ import ( "github.com/IBM/networking-go-sdk/transitgatewayapisv1" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -236,7 +236,7 @@ func resourceIBMTransitGatewayCreate(d *schema.ResourceData, meta interface{}) e func isWaitForTransitGatewayAvailable(client *transitgatewayapisv1.TransitGatewayApisV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for transit gateway (%s) to be available.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isTransitGatewayProvisioning}, Target: []string{isTransitGatewayProvisioningDone, ""}, Refresh: isTransitGatewayRefreshFunc(client, id), @@ -248,7 +248,7 @@ func isWaitForTransitGatewayAvailable(client *transitgatewayapisv1.TransitGatewa return stateConf.WaitForState() } -func isTransitGatewayRefreshFunc(client *transitgatewayapisv1.TransitGatewayApisV1, id string) resource.StateRefreshFunc { +func isTransitGatewayRefreshFunc(client *transitgatewayapisv1.TransitGatewayApisV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { gettgwoptions := &transitgatewayapisv1.GetTransitGatewayOptions{ ID: &id, @@ -400,7 +400,7 @@ func resourceIBMTransitGatewayDelete(d *schema.ResourceData, meta interface{}) e func isWaitForTransitGatewayDeleted(client *transitgatewayapisv1.TransitGatewayApisV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for transit gateway (%s) to be deleted.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isTransitGatewayDeleting}, Target: []string{"", isTransitGatewayDeleted}, Refresh: isTransitGatewayDeleteRefreshFunc(client, id), @@ -412,7 +412,7 @@ func isWaitForTransitGatewayDeleted(client *transitgatewayapisv1.TransitGatewayA return stateConf.WaitForState() } -func isTransitGatewayDeleteRefreshFunc(client *transitgatewayapisv1.TransitGatewayApisV1, id string) resource.StateRefreshFunc { +func isTransitGatewayDeleteRefreshFunc(client *transitgatewayapisv1.TransitGatewayApisV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { log.Printf("[DEBUG] tg gateway delete function here") gettgwoptions := &transitgatewayapisv1.GetTransitGatewayOptions{ diff --git a/ibm/service/transitgateway/resource_ibm_tg_gateway_connection.go b/ibm/service/transitgateway/resource_ibm_tg_gateway_connection.go index 5e0eb8cc51..b4223ddfb0 100644 --- a/ibm/service/transitgateway/resource_ibm_tg_gateway_connection.go +++ b/ibm/service/transitgateway/resource_ibm_tg_gateway_connection.go @@ -9,7 +9,7 @@ import ( "time" "github.com/IBM/networking-go-sdk/transitgatewayapisv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" @@ -434,7 +434,7 @@ func resourceIBMTransitGatewayConnectionCreate(d *schema.ResourceData, meta inte func isWaitForTransitGatewayConnectionAvailable(client *transitgatewayapisv1.TransitGatewayApisV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for transit gateway connection (%s) to be available.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isTransitGatewayConnectionPending}, Target: []string{isTransitGatewayConnectionAttached, ""}, Refresh: isTransitGatewayConnectionRefreshFunc(client, id), @@ -445,7 +445,7 @@ func isWaitForTransitGatewayConnectionAvailable(client *transitgatewayapisv1.Tra return stateConf.WaitForState() } -func isTransitGatewayConnectionRefreshFunc(client *transitgatewayapisv1.TransitGatewayApisV1, id string) resource.StateRefreshFunc { +func isTransitGatewayConnectionRefreshFunc(client *transitgatewayapisv1.TransitGatewayApisV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { parts, err := flex.IdParts(id) @@ -671,7 +671,7 @@ func resourceIBMTransitGatewayConnectionDelete(d *schema.ResourceData, meta inte func isWaitForTransitGatewayConnectionDeleted(client *transitgatewayapisv1.TransitGatewayApisV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for transit gateway Connection(%s) to be deleted.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isTransitGatewayConnectionDeleting, isTransitGatewayConnectionDetaching}, Target: []string{"", isTransitGatewayConnectionDeleted}, Refresh: isTransitGatewayConnectionDeleteRefreshFunc(client, id), @@ -683,7 +683,7 @@ func isWaitForTransitGatewayConnectionDeleted(client *transitgatewayapisv1.Trans return stateConf.WaitForState() } -func isTransitGatewayConnectionDeleteRefreshFunc(client *transitgatewayapisv1.TransitGatewayApisV1, id string) resource.StateRefreshFunc { +func isTransitGatewayConnectionDeleteRefreshFunc(client *transitgatewayapisv1.TransitGatewayApisV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { log.Printf("[DEBUG] tg gateway connection delete function here") parts, err := flex.IdParts(id) diff --git a/ibm/service/transitgateway/resource_ibm_tg_gateway_connection_action_test.go b/ibm/service/transitgateway/resource_ibm_tg_gateway_connection_action_test.go index 0ae03612a1..144d8faf1f 100644 --- a/ibm/service/transitgateway/resource_ibm_tg_gateway_connection_action_test.go +++ b/ibm/service/transitgateway/resource_ibm_tg_gateway_connection_action_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMTransitGatewayConnectionAction_basic(t *testing.T) { diff --git a/ibm/service/transitgateway/resource_ibm_tg_gateway_connection_prefix_filter_test.go b/ibm/service/transitgateway/resource_ibm_tg_gateway_connection_prefix_filter_test.go index 9c1e9249fa..ebe36c6ebd 100644 --- a/ibm/service/transitgateway/resource_ibm_tg_gateway_connection_prefix_filter_test.go +++ b/ibm/service/transitgateway/resource_ibm_tg_gateway_connection_prefix_filter_test.go @@ -8,9 +8,9 @@ import ( "testing" "github.com/IBM/networking-go-sdk/transitgatewayapisv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" diff --git a/ibm/service/transitgateway/resource_ibm_tg_gateway_connection_rgre_tunnel_test.go b/ibm/service/transitgateway/resource_ibm_tg_gateway_connection_rgre_tunnel_test.go index 02e97dfaff..2a211c4a13 100644 --- a/ibm/service/transitgateway/resource_ibm_tg_gateway_connection_rgre_tunnel_test.go +++ b/ibm/service/transitgateway/resource_ibm_tg_gateway_connection_rgre_tunnel_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/transitgateway/resource_ibm_tg_gateway_connection_test.go b/ibm/service/transitgateway/resource_ibm_tg_gateway_connection_test.go index 1d2b58bfce..7226d1410f 100644 --- a/ibm/service/transitgateway/resource_ibm_tg_gateway_connection_test.go +++ b/ibm/service/transitgateway/resource_ibm_tg_gateway_connection_test.go @@ -9,9 +9,9 @@ import ( "testing" "github.com/IBM/networking-go-sdk/transitgatewayapisv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/transitgateway/resource_ibm_tg_gateway_connection_tunnel.go b/ibm/service/transitgateway/resource_ibm_tg_gateway_connection_tunnel.go index 8cf8f9a66a..a371d3cec1 100644 --- a/ibm/service/transitgateway/resource_ibm_tg_gateway_connection_tunnel.go +++ b/ibm/service/transitgateway/resource_ibm_tg_gateway_connection_tunnel.go @@ -9,7 +9,7 @@ import ( "time" "github.com/IBM/networking-go-sdk/transitgatewayapisv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" @@ -229,7 +229,7 @@ func isWaitForTransitGatewayConnectionRgreTunnelAvailable(client *transitgateway log.Printf("Waiting for transit gateway connection tunnel (%s) to be available.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isTransitGatewayConnectionPending}, Target: []string{isTransitGatewayConnectionTunnelAttached, ""}, Refresh: isTransitGatewayConnectionRgreTunnelRefreshFunc(client, id), @@ -240,7 +240,7 @@ func isWaitForTransitGatewayConnectionRgreTunnelAvailable(client *transitgateway return stateConf.WaitForState() } -func isTransitGatewayConnectionRgreTunnelRefreshFunc(client *transitgatewayapisv1.TransitGatewayApisV1, id string) resource.StateRefreshFunc { +func isTransitGatewayConnectionRgreTunnelRefreshFunc(client *transitgatewayapisv1.TransitGatewayApisV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { parts, err := flex.IdParts(id) @@ -422,7 +422,7 @@ func resourceIBMTransitGatewayConnectionRgreTunnelDelete(d *schema.ResourceData, func isWaitForTransitGatewayConnectionRgreTunnelDeleted(client *transitgatewayapisv1.TransitGatewayApisV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for transit gateway Connection Tunnel (%s) to be deleted.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isTransitGatewayConnectionTunnelDeleting, isTransitGatewayConnectionDetaching}, Target: []string{"", isTransitGatewayConnectionTunnelDeleted}, Refresh: isTransitGatewayConnectionRgreTunnelDeleteRefreshFunc(client, id), @@ -434,7 +434,7 @@ func isWaitForTransitGatewayConnectionRgreTunnelDeleted(client *transitgatewayap return stateConf.WaitForState() } -func isTransitGatewayConnectionRgreTunnelDeleteRefreshFunc(client *transitgatewayapisv1.TransitGatewayApisV1, id string) resource.StateRefreshFunc { +func isTransitGatewayConnectionRgreTunnelDeleteRefreshFunc(client *transitgatewayapisv1.TransitGatewayApisV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { log.Printf("[DEBUG] tg gateway connection Tunnel delete function here") parts, err := flex.IdParts(id) diff --git a/ibm/service/transitgateway/resource_ibm_tg_gateway_route_report.go b/ibm/service/transitgateway/resource_ibm_tg_gateway_route_report.go index 83326f5b61..48c75ad78a 100644 --- a/ibm/service/transitgateway/resource_ibm_tg_gateway_route_report.go +++ b/ibm/service/transitgateway/resource_ibm_tg_gateway_route_report.go @@ -9,7 +9,7 @@ import ( "time" "github.com/IBM/networking-go-sdk/transitgatewayapisv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" @@ -177,7 +177,7 @@ func resourceIBMTransitGatewayRouteReportCreate(d *schema.ResourceData, meta int func isWaitForTransitGatewayRouteReportAvailable(client *transitgatewayapisv1.TransitGatewayApisV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for transit gateway route report (%s) to be available.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isTransitGatewayRouteReportPending}, Target: []string{isTransitGatewayRouteReportDone, ""}, Refresh: isTransitGatewayRouteReportRefreshFunc(client, id), @@ -189,7 +189,7 @@ func isWaitForTransitGatewayRouteReportAvailable(client *transitgatewayapisv1.Tr return stateConf.WaitForState() } -func isTransitGatewayRouteReportRefreshFunc(client *transitgatewayapisv1.TransitGatewayApisV1, id string) resource.StateRefreshFunc { +func isTransitGatewayRouteReportRefreshFunc(client *transitgatewayapisv1.TransitGatewayApisV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { parts, err := flex.IdParts(id) if err != nil { diff --git a/ibm/service/transitgateway/resource_ibm_tg_gateway_route_report_test.go b/ibm/service/transitgateway/resource_ibm_tg_gateway_route_report_test.go index 8f355f9b81..3674f29187 100644 --- a/ibm/service/transitgateway/resource_ibm_tg_gateway_route_report_test.go +++ b/ibm/service/transitgateway/resource_ibm_tg_gateway_route_report_test.go @@ -6,14 +6,15 @@ package transitgateway_test import ( "fmt" + "log" + "testing" + acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/networking-go-sdk/transitgatewayapisv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "log" - "testing" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMTransitGatewayRouteReport_basic(t *testing.T) { diff --git a/ibm/service/transitgateway/resource_ibm_tg_gateway_test.go b/ibm/service/transitgateway/resource_ibm_tg_gateway_test.go index 88398a4aab..bd0bf311e4 100644 --- a/ibm/service/transitgateway/resource_ibm_tg_gateway_test.go +++ b/ibm/service/transitgateway/resource_ibm_tg_gateway_test.go @@ -12,9 +12,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM/networking-go-sdk/transitgatewayapisv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMTransitGateway_basic(t *testing.T) { diff --git a/ibm/service/usagereports/data_source_ibm_billing_snapshot_list_test.go b/ibm/service/usagereports/data_source_ibm_billing_snapshot_list_test.go index 20f818a0de..adcc3a95dd 100644 --- a/ibm/service/usagereports/data_source_ibm_billing_snapshot_list_test.go +++ b/ibm/service/usagereports/data_source_ibm_billing_snapshot_list_test.go @@ -8,7 +8,7 @@ import ( "strconv" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/usagereports/resource_ibm_billing_report_snapshot_test.go b/ibm/service/usagereports/resource_ibm_billing_report_snapshot_test.go index 3ae55443bc..67ce874856 100644 --- a/ibm/service/usagereports/resource_ibm_billing_report_snapshot_test.go +++ b/ibm/service/usagereports/resource_ibm_billing_report_snapshot_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/vmware/data_source_ibm_vmaas_vdc_test.go b/ibm/service/vmware/data_source_ibm_vmaas_vdc_test.go index 2977ebc942..3d3266debb 100644 --- a/ibm/service/vmware/data_source_ibm_vmaas_vdc_test.go +++ b/ibm/service/vmware/data_source_ibm_vmaas_vdc_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vmware/resource_ibm_vmaas_vdc_test.go b/ibm/service/vmware/resource_ibm_vmaas_vdc_test.go index 52bec2cf4c..c006e03b80 100644 --- a/ibm/service/vmware/resource_ibm_vmaas_vdc_test.go +++ b/ibm/service/vmware/resource_ibm_vmaas_vdc_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/vmware/utils.go b/ibm/service/vmware/utils.go index e4e8d9361f..684ca5af3a 100644 --- a/ibm/service/vmware/utils.go +++ b/ibm/service/vmware/utils.go @@ -11,9 +11,9 @@ import ( "time" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/IBM/vmware-go-sdk/vmwarev1" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -36,7 +36,7 @@ func waitForVdcStatusUpdate(context context.Context, d *schema.ResourceData, met return "", err } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{VdcCreatingState}, Target: []string{VdcFinalState}, Refresh: func() (interface{}, string, error) { @@ -78,7 +78,7 @@ func waitForVdcToDelete(context context.Context, d *schema.ResourceData, meta in return false, err } - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isVdcDeleting}, Target: []string{isVdcDeleteDone}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/vpc/data_source_ibm_is_backup_policies_test.go b/ibm/service/vpc/data_source_ibm_is_backup_policies_test.go index ed135ca3b9..df6097456d 100644 --- a/ibm/service/vpc/data_source_ibm_is_backup_policies_test.go +++ b/ibm/service/vpc/data_source_ibm_is_backup_policies_test.go @@ -11,8 +11,8 @@ import ( "time" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsBackupPoliciesDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_backup_policy_job_test.go b/ibm/service/vpc/data_source_ibm_is_backup_policy_job_test.go index bc17a2ec99..68b26dbab0 100644 --- a/ibm/service/vpc/data_source_ibm_is_backup_policy_job_test.go +++ b/ibm/service/vpc/data_source_ibm_is_backup_policy_job_test.go @@ -8,7 +8,7 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsBackupPolicyJobDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_backup_policy_jobs_test.go b/ibm/service/vpc/data_source_ibm_is_backup_policy_jobs_test.go index b5596e52eb..e2e66a6efc 100644 --- a/ibm/service/vpc/data_source_ibm_is_backup_policy_jobs_test.go +++ b/ibm/service/vpc/data_source_ibm_is_backup_policy_jobs_test.go @@ -8,7 +8,7 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsBackupPolicyJobsDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_backup_policy_plan_test.go b/ibm/service/vpc/data_source_ibm_is_backup_policy_plan_test.go index 1511bf76d7..7f64320049 100644 --- a/ibm/service/vpc/data_source_ibm_is_backup_policy_plan_test.go +++ b/ibm/service/vpc/data_source_ibm_is_backup_policy_plan_test.go @@ -11,8 +11,8 @@ import ( "time" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsBackupPolicyPlanDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_backup_policy_plans_test.go b/ibm/service/vpc/data_source_ibm_is_backup_policy_plans_test.go index 588661078e..63928e5542 100644 --- a/ibm/service/vpc/data_source_ibm_is_backup_policy_plans_test.go +++ b/ibm/service/vpc/data_source_ibm_is_backup_policy_plans_test.go @@ -11,8 +11,8 @@ import ( "time" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsBackupPolicyPlansDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_backup_policy_test.go b/ibm/service/vpc/data_source_ibm_is_backup_policy_test.go index 56b7cee36a..6cd51d2cbc 100644 --- a/ibm/service/vpc/data_source_ibm_is_backup_policy_test.go +++ b/ibm/service/vpc/data_source_ibm_is_backup_policy_test.go @@ -11,8 +11,8 @@ import ( "time" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsBackupPolicyDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_disk_test.go b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_disk_test.go index ea1096c5cd..ae0f4c53b6 100644 --- a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_disk_test.go +++ b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_disk_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISBareMetalServerDiskDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_disks_test.go b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_disks_test.go index 46c5aae6ed..a6c78712aa 100644 --- a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_disks_test.go +++ b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_disks_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISBareMetalServerDisksDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_initialization_test.go b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_initialization_test.go index c6a32f1d0c..bb245a13bd 100644 --- a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_initialization_test.go +++ b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_initialization_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISBareMetalServerInitializationDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_attachment_test.go b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_attachment_test.go index 03eff15ffe..3616c0a922 100644 --- a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_attachment_test.go +++ b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_attachment_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_attachments_test.go b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_attachments_test.go index 53a5d01853..0de2b1c18e 100644 --- a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_attachments_test.go +++ b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_attachments_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_interface_floating_ip_test.go b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_interface_floating_ip_test.go index 4d8ab16a02..32271af85b 100644 --- a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_interface_floating_ip_test.go +++ b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_interface_floating_ip_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISBareMetalServerNetworkInterfaceFloatingIPDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_interface_floating_ips_test.go b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_interface_floating_ips_test.go index d0ad49d5a4..a9736e905a 100644 --- a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_interface_floating_ips_test.go +++ b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_interface_floating_ips_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISBareMetalServerNetworkInterfaceFloatingIPsDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_interface_reserved_ip_test.go b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_interface_reserved_ip_test.go index 11bb1cfbf4..3f74b432b4 100644 --- a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_interface_reserved_ip_test.go +++ b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_interface_reserved_ip_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISBareMetalServerNICReservedIP_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_interface_reserved_ips_test.go b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_interface_reserved_ips_test.go index af48412980..4fb6f44d0a 100644 --- a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_interface_reserved_ips_test.go +++ b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_interface_reserved_ips_test.go @@ -9,8 +9,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISBareMetalServerNICReservedIPs_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_interface_test.go b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_interface_test.go index d55d1f0bbd..50a5f46cf8 100644 --- a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_interface_test.go +++ b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_interface_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISBareMetalServerNetworkInterfaceDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_interfaces_test.go b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_interfaces_test.go index b904b145b2..8b1d05cfd2 100644 --- a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_interfaces_test.go +++ b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_network_interfaces_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISBareMetalServerNetworkInterfacesDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_profile_test.go b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_profile_test.go index 70f3030a3c..4cfc1921c8 100644 --- a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_profile_test.go +++ b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_profile_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISBMSProfileDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_profiles_test.go b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_profiles_test.go index ca86c37584..907014f87a 100644 --- a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_profiles_test.go +++ b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_profiles_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISBMSProfilesDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_test.go b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_test.go index 469bbf108f..ce646b4049 100644 --- a/ibm/service/vpc/data_source_ibm_is_bare_metal_server_test.go +++ b/ibm/service/vpc/data_source_ibm_is_bare_metal_server_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISBMSDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_bare_metal_servers_test.go b/ibm/service/vpc/data_source_ibm_is_bare_metal_servers_test.go index 6a72db102d..b9420f7af3 100644 --- a/ibm/service/vpc/data_source_ibm_is_bare_metal_servers_test.go +++ b/ibm/service/vpc/data_source_ibm_is_bare_metal_servers_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISBMSsDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_cluster_network_interface_test.go b/ibm/service/vpc/data_source_ibm_is_cluster_network_interface_test.go index 097cc19df8..a37c5dd23e 100644 --- a/ibm/service/vpc/data_source_ibm_is_cluster_network_interface_test.go +++ b/ibm/service/vpc/data_source_ibm_is_cluster_network_interface_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/vpc" diff --git a/ibm/service/vpc/data_source_ibm_is_cluster_network_interfaces_test.go b/ibm/service/vpc/data_source_ibm_is_cluster_network_interfaces_test.go index d421399715..1d78704da5 100644 --- a/ibm/service/vpc/data_source_ibm_is_cluster_network_interfaces_test.go +++ b/ibm/service/vpc/data_source_ibm_is_cluster_network_interfaces_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/vpc" diff --git a/ibm/service/vpc/data_source_ibm_is_cluster_network_profile_test.go b/ibm/service/vpc/data_source_ibm_is_cluster_network_profile_test.go index b3c887ab8e..c179a9c317 100644 --- a/ibm/service/vpc/data_source_ibm_is_cluster_network_profile_test.go +++ b/ibm/service/vpc/data_source_ibm_is_cluster_network_profile_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/vpc" diff --git a/ibm/service/vpc/data_source_ibm_is_cluster_network_profiles_test.go b/ibm/service/vpc/data_source_ibm_is_cluster_network_profiles_test.go index d7edf24b50..4fccba5b01 100644 --- a/ibm/service/vpc/data_source_ibm_is_cluster_network_profiles_test.go +++ b/ibm/service/vpc/data_source_ibm_is_cluster_network_profiles_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_cluster_network_subnet_reserved_ip_test.go b/ibm/service/vpc/data_source_ibm_is_cluster_network_subnet_reserved_ip_test.go index bbeb647db1..f51548274c 100644 --- a/ibm/service/vpc/data_source_ibm_is_cluster_network_subnet_reserved_ip_test.go +++ b/ibm/service/vpc/data_source_ibm_is_cluster_network_subnet_reserved_ip_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/vpc" diff --git a/ibm/service/vpc/data_source_ibm_is_cluster_network_subnet_reserved_ips_test.go b/ibm/service/vpc/data_source_ibm_is_cluster_network_subnet_reserved_ips_test.go index b41667ff5e..28929316b8 100644 --- a/ibm/service/vpc/data_source_ibm_is_cluster_network_subnet_reserved_ips_test.go +++ b/ibm/service/vpc/data_source_ibm_is_cluster_network_subnet_reserved_ips_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/vpc" diff --git a/ibm/service/vpc/data_source_ibm_is_cluster_network_subnet_test.go b/ibm/service/vpc/data_source_ibm_is_cluster_network_subnet_test.go index 471f984d7d..b562990e5d 100644 --- a/ibm/service/vpc/data_source_ibm_is_cluster_network_subnet_test.go +++ b/ibm/service/vpc/data_source_ibm_is_cluster_network_subnet_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/vpc" diff --git a/ibm/service/vpc/data_source_ibm_is_cluster_network_subnets_test.go b/ibm/service/vpc/data_source_ibm_is_cluster_network_subnets_test.go index d58a0917bb..338d9b798e 100644 --- a/ibm/service/vpc/data_source_ibm_is_cluster_network_subnets_test.go +++ b/ibm/service/vpc/data_source_ibm_is_cluster_network_subnets_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/vpc" diff --git a/ibm/service/vpc/data_source_ibm_is_cluster_network_test.go b/ibm/service/vpc/data_source_ibm_is_cluster_network_test.go index ed53d12cb3..acced138fd 100644 --- a/ibm/service/vpc/data_source_ibm_is_cluster_network_test.go +++ b/ibm/service/vpc/data_source_ibm_is_cluster_network_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/vpc" diff --git a/ibm/service/vpc/data_source_ibm_is_cluster_networks_test.go b/ibm/service/vpc/data_source_ibm_is_cluster_networks_test.go index 0c673f98bf..fa6ad9c5b5 100644 --- a/ibm/service/vpc/data_source_ibm_is_cluster_networks_test.go +++ b/ibm/service/vpc/data_source_ibm_is_cluster_networks_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/vpc" diff --git a/ibm/service/vpc/data_source_ibm_is_dedicated_host_disk_test.go b/ibm/service/vpc/data_source_ibm_is_dedicated_host_disk_test.go index 75d13cd8f3..996726ca0e 100644 --- a/ibm/service/vpc/data_source_ibm_is_dedicated_host_disk_test.go +++ b/ibm/service/vpc/data_source_ibm_is_dedicated_host_disk_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISDedicatedHostDiskDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_dedicated_host_disks_test.go b/ibm/service/vpc/data_source_ibm_is_dedicated_host_disks_test.go index 3bd71128b7..60ff39862b 100644 --- a/ibm/service/vpc/data_source_ibm_is_dedicated_host_disks_test.go +++ b/ibm/service/vpc/data_source_ibm_is_dedicated_host_disks_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISDedicatedHostDisksDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_dedicated_host_group_test.go b/ibm/service/vpc/data_source_ibm_is_dedicated_host_group_test.go index 1330270cd4..75034c44f0 100644 --- a/ibm/service/vpc/data_source_ibm_is_dedicated_host_group_test.go +++ b/ibm/service/vpc/data_source_ibm_is_dedicated_host_group_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmIsDedicatedHostGroupDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_dedicated_host_groups_test.go b/ibm/service/vpc/data_source_ibm_is_dedicated_host_groups_test.go index 5ed8cb72ea..ee25aa89b5 100644 --- a/ibm/service/vpc/data_source_ibm_is_dedicated_host_groups_test.go +++ b/ibm/service/vpc/data_source_ibm_is_dedicated_host_groups_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmIsDedicatedHostGroupsDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_dedicated_host_profile_test.go b/ibm/service/vpc/data_source_ibm_is_dedicated_host_profile_test.go index fe617d6d7b..33538d7c99 100644 --- a/ibm/service/vpc/data_source_ibm_is_dedicated_host_profile_test.go +++ b/ibm/service/vpc/data_source_ibm_is_dedicated_host_profile_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmIsDedicatedHostProfileDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_dedicated_host_profiles_test.go b/ibm/service/vpc/data_source_ibm_is_dedicated_host_profiles_test.go index 34f58c9f72..3ce266ce29 100644 --- a/ibm/service/vpc/data_source_ibm_is_dedicated_host_profiles_test.go +++ b/ibm/service/vpc/data_source_ibm_is_dedicated_host_profiles_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmIsDedicatedHostProfilesDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_dedicated_host_test.go b/ibm/service/vpc/data_source_ibm_is_dedicated_host_test.go index 160d361e43..82864fd2c0 100644 --- a/ibm/service/vpc/data_source_ibm_is_dedicated_host_test.go +++ b/ibm/service/vpc/data_source_ibm_is_dedicated_host_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmIsDedicatedHostDSBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_dedicated_hosts_test.go b/ibm/service/vpc/data_source_ibm_is_dedicated_hosts_test.go index 164f272725..6655ec6900 100644 --- a/ibm/service/vpc/data_source_ibm_is_dedicated_hosts_test.go +++ b/ibm/service/vpc/data_source_ibm_is_dedicated_hosts_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/IBM/vpc-go-sdk/vpcv1" ) diff --git a/ibm/service/vpc/data_source_ibm_is_endpoint_gateway_targets_test.go b/ibm/service/vpc/data_source_ibm_is_endpoint_gateway_targets_test.go index 28e9a3b0b9..a7cdbbb3b7 100644 --- a/ibm/service/vpc/data_source_ibm_is_endpoint_gateway_targets_test.go +++ b/ibm/service/vpc/data_source_ibm_is_endpoint_gateway_targets_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISEndpointGatewayTargetsDataSource_basics(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_floating_ip_test.go b/ibm/service/vpc/data_source_ibm_is_floating_ip_test.go index 03f3720454..09f4809ac5 100644 --- a/ibm/service/vpc/data_source_ibm_is_floating_ip_test.go +++ b/ibm/service/vpc/data_source_ibm_is_floating_ip_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISFloatingIPDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_floating_ips_test.go b/ibm/service/vpc/data_source_ibm_is_floating_ips_test.go index c6be008628..1ad45ba96c 100644 --- a/ibm/service/vpc/data_source_ibm_is_floating_ips_test.go +++ b/ibm/service/vpc/data_source_ibm_is_floating_ips_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsFloatingIpsDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_flow_log_test.go b/ibm/service/vpc/data_source_ibm_is_flow_log_test.go index fc1651742e..802f542626 100644 --- a/ibm/service/vpc/data_source_ibm_is_flow_log_test.go +++ b/ibm/service/vpc/data_source_ibm_is_flow_log_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsFlowLogDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_flow_logs_test.go b/ibm/service/vpc/data_source_ibm_is_flow_logs_test.go index e7afcc8d19..74e0317f9f 100644 --- a/ibm/service/vpc/data_source_ibm_is_flow_logs_test.go +++ b/ibm/service/vpc/data_source_ibm_is_flow_logs_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISFlowLogsDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_ike_policies_test.go b/ibm/service/vpc/data_source_ibm_is_ike_policies_test.go index d7f2b998d4..673092d23f 100644 --- a/ibm/service/vpc/data_source_ibm_is_ike_policies_test.go +++ b/ibm/service/vpc/data_source_ibm_is_ike_policies_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsIkePoliciesDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_ike_policy_test.go b/ibm/service/vpc/data_source_ibm_is_ike_policy_test.go index c40ea3b8cf..5adc749038 100644 --- a/ibm/service/vpc/data_source_ibm_is_ike_policy_test.go +++ b/ibm/service/vpc/data_source_ibm_is_ike_policy_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsIkePolicyDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_image_export_job_test.go b/ibm/service/vpc/data_source_ibm_is_image_export_job_test.go index 9c51359c4c..52c911fc25 100644 --- a/ibm/service/vpc/data_source_ibm_is_image_export_job_test.go +++ b/ibm/service/vpc/data_source_ibm_is_image_export_job_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_image_export_jobs_test.go b/ibm/service/vpc/data_source_ibm_is_image_export_jobs_test.go index f8e25ab164..ad37c0dffd 100644 --- a/ibm/service/vpc/data_source_ibm_is_image_export_jobs_test.go +++ b/ibm/service/vpc/data_source_ibm_is_image_export_jobs_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_image_test.go b/ibm/service/vpc/data_source_ibm_is_image_test.go index 552d7f0e81..6a53dca31b 100644 --- a/ibm/service/vpc/data_source_ibm_is_image_test.go +++ b/ibm/service/vpc/data_source_ibm_is_image_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISImageDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_images_test.go b/ibm/service/vpc/data_source_ibm_is_images_test.go index 08c30998de..0ebb559db7 100644 --- a/ibm/service/vpc/data_source_ibm_is_images_test.go +++ b/ibm/service/vpc/data_source_ibm_is_images_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISImagesDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_instance_cluster_network_attachment_test.go b/ibm/service/vpc/data_source_ibm_is_instance_cluster_network_attachment_test.go index d832370b86..125ae4a1bf 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_cluster_network_attachment_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_cluster_network_attachment_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_instance_cluster_network_attachments_test.go b/ibm/service/vpc/data_source_ibm_is_instance_cluster_network_attachments_test.go index 7928e038ce..347f8065a7 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_cluster_network_attachments_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_cluster_network_attachments_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_instance_disk_test.go b/ibm/service/vpc/data_source_ibm_is_instance_disk_test.go index 50d4f7a81a..f848756f7e 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_disk_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_disk_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISInstanceDiskDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_instance_disks_test.go b/ibm/service/vpc/data_source_ibm_is_instance_disks_test.go index 5660b7de81..f4e35742da 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_disks_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_disks_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISInstanceDisksDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_instance_group_manager_action_test.go b/ibm/service/vpc/data_source_ibm_is_instance_group_manager_action_test.go index 27995593a4..73361f5970 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_group_manager_action_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_group_manager_action_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISInstanceGroupManagerAction_dataBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_instance_group_manager_actions_test.go b/ibm/service/vpc/data_source_ibm_is_instance_group_manager_actions_test.go index b8aa4f6d79..94440afa1a 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_group_manager_actions_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_group_manager_actions_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISInstanceGroupManagerActions_dataBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_instance_group_manager_policies_test.go b/ibm/service/vpc/data_source_ibm_is_instance_group_manager_policies_test.go index 2ea459f068..cc4ec215cc 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_group_manager_policies_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_group_manager_policies_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISInstanceGroupManagerPolicies_dataBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_instance_group_manager_policy_test.go b/ibm/service/vpc/data_source_ibm_is_instance_group_manager_policy_test.go index 5be4f8bf13..4af9da8c7c 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_group_manager_policy_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_group_manager_policy_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISInstanceGroupManagerPolicy_dataBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_instance_group_manager_test.go b/ibm/service/vpc/data_source_ibm_is_instance_group_manager_test.go index cbfa84836f..9e3e22c267 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_group_manager_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_group_manager_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISInstanceGroupManager_dataBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_instance_group_managers_test.go b/ibm/service/vpc/data_source_ibm_is_instance_group_managers_test.go index b7bb66b536..18b050821f 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_group_managers_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_group_managers_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISInstanceGroupManagers_dataBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_instance_group_membership_test.go b/ibm/service/vpc/data_source_ibm_is_instance_group_membership_test.go index 842f85ad6d..0049699919 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_group_membership_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_group_membership_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmIsInstanceGroupMembershipDataSource_Basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_instance_group_memberships_test.go b/ibm/service/vpc/data_source_ibm_is_instance_group_memberships_test.go index f9d0395da3..adc80eb349 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_group_memberships_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_group_memberships_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmIsInstanceGroupMembershipsDataSource_Basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_instance_group_test.go b/ibm/service/vpc/data_source_ibm_is_instance_group_test.go index 8b8f1abc69..89569bb2fc 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_group_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_group_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISInstanceGroup_dataBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_instance_groups_test.go b/ibm/service/vpc/data_source_ibm_is_instance_groups_test.go index 95084384ba..ef4f93a64a 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_groups_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_groups_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_instance_network_attachment_test.go b/ibm/service/vpc/data_source_ibm_is_instance_network_attachment_test.go index 73848b93bb..8cf03ad089 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_network_attachment_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_network_attachment_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_instance_network_attachments_test.go b/ibm/service/vpc/data_source_ibm_is_instance_network_attachments_test.go index 11b77a288f..8d4f4d229f 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_network_attachments_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_network_attachments_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_instance_network_interface_reserved_ip_test.go b/ibm/service/vpc/data_source_ibm_is_instance_network_interface_reserved_ip_test.go index 371baa7963..474e1e17d6 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_network_interface_reserved_ip_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_network_interface_reserved_ip_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISInstanceNICReservedIP_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_instance_network_interface_reserved_ips_test.go b/ibm/service/vpc/data_source_ibm_is_instance_network_interface_reserved_ips_test.go index 82fff4d747..fdd6ad0b65 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_network_interface_reserved_ips_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_network_interface_reserved_ips_test.go @@ -9,8 +9,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISInstanceNICReservedIPs_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_instance_network_interface_test.go b/ibm/service/vpc/data_source_ibm_is_instance_network_interface_test.go index eca890cb95..c43b01f384 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_network_interface_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_network_interface_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsInstanceNetworkInterfaceDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_instance_network_interfaces_test.go b/ibm/service/vpc/data_source_ibm_is_instance_network_interfaces_test.go index 7cb51eaed1..ee0228b809 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_network_interfaces_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_network_interfaces_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsInstanceNetworkInterfacesDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_instance_profile_test.go b/ibm/service/vpc/data_source_ibm_is_instance_profile_test.go index a43c45e14b..e1cbb62bdc 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_profile_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_profile_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISInstanceProfileDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_instance_profiles_test.go b/ibm/service/vpc/data_source_ibm_is_instance_profiles_test.go index 0bea56e11e..93698e7687 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_profiles_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_profiles_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISInstanceProfilesDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_instance_template_test.go b/ibm/service/vpc/data_source_ibm_is_instance_template_test.go index 4846a776d0..4c11bba75d 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_template_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_template_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISInstanceTemplate_dataBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_instance_templates_test.go b/ibm/service/vpc/data_source_ibm_is_instance_templates_test.go index 567e44a7c9..10e3dcd3fb 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_templates_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_templates_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISInstanceTemplates_dataBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_instance_test.go b/ibm/service/vpc/data_source_ibm_is_instance_test.go index 0355b59432..4ed21e1a5a 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISInstanceDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_instance_volume_attachment_test.go b/ibm/service/vpc/data_source_ibm_is_instance_volume_attachment_test.go index c3365400f7..376aa12722 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_volume_attachment_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_volume_attachment_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISInstanceVolumeAttDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_instance_volume_attachments_test.go b/ibm/service/vpc/data_source_ibm_is_instance_volume_attachments_test.go index 95cfcf1257..e9b46c835e 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_volume_attachments_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_volume_attachments_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISInstanceVolumeAttsDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_instances_test.go b/ibm/service/vpc/data_source_ibm_is_instances_test.go index b9cbbfe570..f267e9c8d5 100644 --- a/ibm/service/vpc/data_source_ibm_is_instances_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instances_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISInstancesDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_ipsec_policies_test.go b/ibm/service/vpc/data_source_ibm_is_ipsec_policies_test.go index fc88810cb3..04076ea9ad 100644 --- a/ibm/service/vpc/data_source_ibm_is_ipsec_policies_test.go +++ b/ibm/service/vpc/data_source_ibm_is_ipsec_policies_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsIpsecPoliciesDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_ipsec_policy_test.go b/ibm/service/vpc/data_source_ibm_is_ipsec_policy_test.go index 766d034636..9642824342 100644 --- a/ibm/service/vpc/data_source_ibm_is_ipsec_policy_test.go +++ b/ibm/service/vpc/data_source_ibm_is_ipsec_policy_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsIpsecPolicyDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_lb_listener_policies_test.go b/ibm/service/vpc/data_source_ibm_is_lb_listener_policies_test.go index 6eb585faba..4182546188 100644 --- a/ibm/service/vpc/data_source_ibm_is_lb_listener_policies_test.go +++ b/ibm/service/vpc/data_source_ibm_is_lb_listener_policies_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsLbListenerPoliciesDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_lb_listener_policy_rule_test.go b/ibm/service/vpc/data_source_ibm_is_lb_listener_policy_rule_test.go index 1b3675eb4a..1b50ed0521 100644 --- a/ibm/service/vpc/data_source_ibm_is_lb_listener_policy_rule_test.go +++ b/ibm/service/vpc/data_source_ibm_is_lb_listener_policy_rule_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsLbListenerPolicyRuleDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_lb_listener_policy_rules_test.go b/ibm/service/vpc/data_source_ibm_is_lb_listener_policy_rules_test.go index e9ba9bd52c..18c0c600f3 100644 --- a/ibm/service/vpc/data_source_ibm_is_lb_listener_policy_rules_test.go +++ b/ibm/service/vpc/data_source_ibm_is_lb_listener_policy_rules_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsLbListenerPolicyRulesDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_lb_listener_policy_test.go b/ibm/service/vpc/data_source_ibm_is_lb_listener_policy_test.go index 2f5a79f0f5..57780961d0 100644 --- a/ibm/service/vpc/data_source_ibm_is_lb_listener_policy_test.go +++ b/ibm/service/vpc/data_source_ibm_is_lb_listener_policy_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsLbListenerPolicyDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_lb_listener_test.go b/ibm/service/vpc/data_source_ibm_is_lb_listener_test.go index 0bfa839d70..1ae9557883 100644 --- a/ibm/service/vpc/data_source_ibm_is_lb_listener_test.go +++ b/ibm/service/vpc/data_source_ibm_is_lb_listener_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsLbListenerDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_lb_listeners_test.go b/ibm/service/vpc/data_source_ibm_is_lb_listeners_test.go index 4c4f876890..ba179c44a0 100644 --- a/ibm/service/vpc/data_source_ibm_is_lb_listeners_test.go +++ b/ibm/service/vpc/data_source_ibm_is_lb_listeners_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsLbListenersDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_lb_pool_member_test.go b/ibm/service/vpc/data_source_ibm_is_lb_pool_member_test.go index 4a8ba31aa8..ceb2ab13c3 100644 --- a/ibm/service/vpc/data_source_ibm_is_lb_pool_member_test.go +++ b/ibm/service/vpc/data_source_ibm_is_lb_pool_member_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsLbPoolMemberDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_lb_pool_members_test.go b/ibm/service/vpc/data_source_ibm_is_lb_pool_members_test.go index 1de16b32c9..5843e69752 100644 --- a/ibm/service/vpc/data_source_ibm_is_lb_pool_members_test.go +++ b/ibm/service/vpc/data_source_ibm_is_lb_pool_members_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsLbPoolMembersDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_lb_pool_test.go b/ibm/service/vpc/data_source_ibm_is_lb_pool_test.go index 087ee21cfe..127c2d510d 100644 --- a/ibm/service/vpc/data_source_ibm_is_lb_pool_test.go +++ b/ibm/service/vpc/data_source_ibm_is_lb_pool_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsLbPoolDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_lb_pools_test.go b/ibm/service/vpc/data_source_ibm_is_lb_pools_test.go index f306e5a8a5..6100245001 100644 --- a/ibm/service/vpc/data_source_ibm_is_lb_pools_test.go +++ b/ibm/service/vpc/data_source_ibm_is_lb_pools_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsLbPoolsDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_lb_profile_test.go b/ibm/service/vpc/data_source_ibm_is_lb_profile_test.go index 4fb57d8623..dbb58748f0 100644 --- a/ibm/service/vpc/data_source_ibm_is_lb_profile_test.go +++ b/ibm/service/vpc/data_source_ibm_is_lb_profile_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISLBProfileDatasource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_lb_profiles_test.go b/ibm/service/vpc/data_source_ibm_is_lb_profiles_test.go index ef046e5a79..f0572e6795 100644 --- a/ibm/service/vpc/data_source_ibm_is_lb_profiles_test.go +++ b/ibm/service/vpc/data_source_ibm_is_lb_profiles_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISLBProfilesDatasource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_lb_test.go b/ibm/service/vpc/data_source_ibm_is_lb_test.go index bbea1cadfb..bfa9a69639 100644 --- a/ibm/service/vpc/data_source_ibm_is_lb_test.go +++ b/ibm/service/vpc/data_source_ibm_is_lb_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISLBDatasource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_lbs_test.go b/ibm/service/vpc/data_source_ibm_is_lbs_test.go index 55a001ab4e..c5afd28f6a 100644 --- a/ibm/service/vpc/data_source_ibm_is_lbs_test.go +++ b/ibm/service/vpc/data_source_ibm_is_lbs_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISLBSDatasource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_network_acl_rule_test.go b/ibm/service/vpc/data_source_ibm_is_network_acl_rule_test.go index 2bf7f504e8..cc8626eb3e 100644 --- a/ibm/service/vpc/data_source_ibm_is_network_acl_rule_test.go +++ b/ibm/service/vpc/data_source_ibm_is_network_acl_rule_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISNetworkACLRuleDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_network_acl_rules_test.go b/ibm/service/vpc/data_source_ibm_is_network_acl_rules_test.go index 5d3df2a838..3fa9ff99aa 100644 --- a/ibm/service/vpc/data_source_ibm_is_network_acl_rules_test.go +++ b/ibm/service/vpc/data_source_ibm_is_network_acl_rules_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISNetworkACLRulesDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_network_acl_test.go b/ibm/service/vpc/data_source_ibm_is_network_acl_test.go index d5a1d12e83..f6031723e0 100644 --- a/ibm/service/vpc/data_source_ibm_is_network_acl_test.go +++ b/ibm/service/vpc/data_source_ibm_is_network_acl_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsNetworkACLDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_network_acls_test.go b/ibm/service/vpc/data_source_ibm_is_network_acls_test.go index ff11c9f3f5..4267c279c7 100644 --- a/ibm/service/vpc/data_source_ibm_is_network_acls_test.go +++ b/ibm/service/vpc/data_source_ibm_is_network_acls_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsNetworkAclsDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_operating_system_test.go b/ibm/service/vpc/data_source_ibm_is_operating_system_test.go index 893d731d00..6aa4644b58 100644 --- a/ibm/service/vpc/data_source_ibm_is_operating_system_test.go +++ b/ibm/service/vpc/data_source_ibm_is_operating_system_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISOperatingSystemDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_operating_systems_test.go b/ibm/service/vpc/data_source_ibm_is_operating_systems_test.go index e28015f859..eff0ad1a87 100644 --- a/ibm/service/vpc/data_source_ibm_is_operating_systems_test.go +++ b/ibm/service/vpc/data_source_ibm_is_operating_systems_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISOperatingSystemsDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_placement_group_test.go b/ibm/service/vpc/data_source_ibm_is_placement_group_test.go index 95df6b77c7..dd8be385fa 100644 --- a/ibm/service/vpc/data_source_ibm_is_placement_group_test.go +++ b/ibm/service/vpc/data_source_ibm_is_placement_group_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmIsPlacementGroupDataSourceAllArgs(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_placement_groups_test.go b/ibm/service/vpc/data_source_ibm_is_placement_groups_test.go index 911ed7f550..518388ffb5 100644 --- a/ibm/service/vpc/data_source_ibm_is_placement_groups_test.go +++ b/ibm/service/vpc/data_source_ibm_is_placement_groups_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmIsPlacementGroupsDataSourceAllArgs(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_private_path_service_gateway_account_policies_test.go b/ibm/service/vpc/data_source_ibm_is_private_path_service_gateway_account_policies_test.go index b45cbe54ae..80e53a6b43 100644 --- a/ibm/service/vpc/data_source_ibm_is_private_path_service_gateway_account_policies_test.go +++ b/ibm/service/vpc/data_source_ibm_is_private_path_service_gateway_account_policies_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_private_path_service_gateway_account_policy_test.go b/ibm/service/vpc/data_source_ibm_is_private_path_service_gateway_account_policy_test.go index a4b240092f..965a21022a 100644 --- a/ibm/service/vpc/data_source_ibm_is_private_path_service_gateway_account_policy_test.go +++ b/ibm/service/vpc/data_source_ibm_is_private_path_service_gateway_account_policy_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_private_path_service_gateway_endpoint_gateway_binding_test.go b/ibm/service/vpc/data_source_ibm_is_private_path_service_gateway_endpoint_gateway_binding_test.go index c2f5643e9e..a85b4f5384 100644 --- a/ibm/service/vpc/data_source_ibm_is_private_path_service_gateway_endpoint_gateway_binding_test.go +++ b/ibm/service/vpc/data_source_ibm_is_private_path_service_gateway_endpoint_gateway_binding_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_private_path_service_gateway_endpoint_gateway_bindings_test.go b/ibm/service/vpc/data_source_ibm_is_private_path_service_gateway_endpoint_gateway_bindings_test.go index 166267609b..4e780bd588 100644 --- a/ibm/service/vpc/data_source_ibm_is_private_path_service_gateway_endpoint_gateway_bindings_test.go +++ b/ibm/service/vpc/data_source_ibm_is_private_path_service_gateway_endpoint_gateway_bindings_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_private_path_service_gateway_test.go b/ibm/service/vpc/data_source_ibm_is_private_path_service_gateway_test.go index 5f9ed5f848..f91668cd9f 100644 --- a/ibm/service/vpc/data_source_ibm_is_private_path_service_gateway_test.go +++ b/ibm/service/vpc/data_source_ibm_is_private_path_service_gateway_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_private_path_service_gateways_test.go b/ibm/service/vpc/data_source_ibm_is_private_path_service_gateways_test.go index d360458021..646007d9a7 100644 --- a/ibm/service/vpc/data_source_ibm_is_private_path_service_gateways_test.go +++ b/ibm/service/vpc/data_source_ibm_is_private_path_service_gateways_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_public_gateway_test.go b/ibm/service/vpc/data_source_ibm_is_public_gateway_test.go index 3374f14922..9b43772f3d 100644 --- a/ibm/service/vpc/data_source_ibm_is_public_gateway_test.go +++ b/ibm/service/vpc/data_source_ibm_is_public_gateway_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISPublicGatewayDatasource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_public_gateways_test.go b/ibm/service/vpc/data_source_ibm_is_public_gateways_test.go index ef7bbde43d..886b71b5b7 100644 --- a/ibm/service/vpc/data_source_ibm_is_public_gateways_test.go +++ b/ibm/service/vpc/data_source_ibm_is_public_gateways_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISPublicGatewaysDatasource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_region_test.go b/ibm/service/vpc/data_source_ibm_is_region_test.go index a3889ec670..d1eeb6c8d0 100644 --- a/ibm/service/vpc/data_source_ibm_is_region_test.go +++ b/ibm/service/vpc/data_source_ibm_is_region_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISRegionDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_regions_test.go b/ibm/service/vpc/data_source_ibm_is_regions_test.go index 22fbb835b2..da3e2e4f77 100644 --- a/ibm/service/vpc/data_source_ibm_is_regions_test.go +++ b/ibm/service/vpc/data_source_ibm_is_regions_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISRegionsDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_reservation_test.go b/ibm/service/vpc/data_source_ibm_is_reservation_test.go index b91644ee1b..b62a272f4e 100644 --- a/ibm/service/vpc/data_source_ibm_is_reservation_test.go +++ b/ibm/service/vpc/data_source_ibm_is_reservation_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISReservationDatasource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_reservations_test.go b/ibm/service/vpc/data_source_ibm_is_reservations_test.go index ac7419cebf..dac704e959 100644 --- a/ibm/service/vpc/data_source_ibm_is_reservations_test.go +++ b/ibm/service/vpc/data_source_ibm_is_reservations_test.go @@ -8,7 +8,7 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsReservationsDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_security_group_rule_test.go b/ibm/service/vpc/data_source_ibm_is_security_group_rule_test.go index 556133c76f..dbe6a3d6d0 100644 --- a/ibm/service/vpc/data_source_ibm_is_security_group_rule_test.go +++ b/ibm/service/vpc/data_source_ibm_is_security_group_rule_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsSecurityGroupRuleDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_security_group_rules_test.go b/ibm/service/vpc/data_source_ibm_is_security_group_rules_test.go index e2dc4fe2c2..430575fb0a 100644 --- a/ibm/service/vpc/data_source_ibm_is_security_group_rules_test.go +++ b/ibm/service/vpc/data_source_ibm_is_security_group_rules_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsSecurityGroupRulesDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_security_group_target_test.go b/ibm/service/vpc/data_source_ibm_is_security_group_target_test.go index 5d63eb31a5..4e054e1ba2 100644 --- a/ibm/service/vpc/data_source_ibm_is_security_group_target_test.go +++ b/ibm/service/vpc/data_source_ibm_is_security_group_target_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISSecurityGroupTargetDataSource_vni(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_security_group_targets_test.go b/ibm/service/vpc/data_source_ibm_is_security_group_targets_test.go index c55e429aec..db5919c6e2 100644 --- a/ibm/service/vpc/data_source_ibm_is_security_group_targets_test.go +++ b/ibm/service/vpc/data_source_ibm_is_security_group_targets_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISSecurityGroupTargets_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_security_group_test.go b/ibm/service/vpc/data_source_ibm_is_security_group_test.go index 5b8653a435..6186b14605 100644 --- a/ibm/service/vpc/data_source_ibm_is_security_group_test.go +++ b/ibm/service/vpc/data_source_ibm_is_security_group_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISSecurityGroupDatasource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_security_groups_test.go b/ibm/service/vpc/data_source_ibm_is_security_groups_test.go index 3732ec0bf3..017f861457 100644 --- a/ibm/service/vpc/data_source_ibm_is_security_groups_test.go +++ b/ibm/service/vpc/data_source_ibm_is_security_groups_test.go @@ -8,7 +8,7 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsSecurityGroupsDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_share_accessor_binding_test.go b/ibm/service/vpc/data_source_ibm_is_share_accessor_binding_test.go index 70ffb32cbf..c10d011c8e 100644 --- a/ibm/service/vpc/data_source_ibm_is_share_accessor_binding_test.go +++ b/ibm/service/vpc/data_source_ibm_is_share_accessor_binding_test.go @@ -11,8 +11,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/vpc" diff --git a/ibm/service/vpc/data_source_ibm_is_share_accessor_bindings_test.go b/ibm/service/vpc/data_source_ibm_is_share_accessor_bindings_test.go index 6af1a6f07d..99c3ae3ef8 100644 --- a/ibm/service/vpc/data_source_ibm_is_share_accessor_bindings_test.go +++ b/ibm/service/vpc/data_source_ibm_is_share_accessor_bindings_test.go @@ -11,8 +11,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/vpc" diff --git a/ibm/service/vpc/data_source_ibm_is_share_mount_target_test.go b/ibm/service/vpc/data_source_ibm_is_share_mount_target_test.go index 1ae63c7508..6d1e763f25 100644 --- a/ibm/service/vpc/data_source_ibm_is_share_mount_target_test.go +++ b/ibm/service/vpc/data_source_ibm_is_share_mount_target_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsShareTargetDataSourceAllArgs(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_share_mount_targets_test.go b/ibm/service/vpc/data_source_ibm_is_share_mount_targets_test.go index b1e2b38082..b93c622cf8 100644 --- a/ibm/service/vpc/data_source_ibm_is_share_mount_targets_test.go +++ b/ibm/service/vpc/data_source_ibm_is_share_mount_targets_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsShareTargetsDataSource(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_share_profile_test.go b/ibm/service/vpc/data_source_ibm_is_share_profile_test.go index 7ca59f97c9..171a8151d9 100644 --- a/ibm/service/vpc/data_source_ibm_is_share_profile_test.go +++ b/ibm/service/vpc/data_source_ibm_is_share_profile_test.go @@ -8,7 +8,7 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmIsShareProfileDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_share_profiles_test.go b/ibm/service/vpc/data_source_ibm_is_share_profiles_test.go index 873770965c..d2d568f809 100644 --- a/ibm/service/vpc/data_source_ibm_is_share_profiles_test.go +++ b/ibm/service/vpc/data_source_ibm_is_share_profiles_test.go @@ -8,7 +8,7 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmIsShareProfilesDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_share_test.go b/ibm/service/vpc/data_source_ibm_is_share_test.go index afdcf8a495..6e1aa233e9 100644 --- a/ibm/service/vpc/data_source_ibm_is_share_test.go +++ b/ibm/service/vpc/data_source_ibm_is_share_test.go @@ -9,8 +9,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmIsShareDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_shares_test.go b/ibm/service/vpc/data_source_ibm_is_shares_test.go index 34fd6f9c78..6c8f644b29 100644 --- a/ibm/service/vpc/data_source_ibm_is_shares_test.go +++ b/ibm/service/vpc/data_source_ibm_is_shares_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmIsSharesDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_snapshot_clone_test.go b/ibm/service/vpc/data_source_ibm_is_snapshot_clone_test.go index 949e6a4f75..2f442a58b9 100644 --- a/ibm/service/vpc/data_source_ibm_is_snapshot_clone_test.go +++ b/ibm/service/vpc/data_source_ibm_is_snapshot_clone_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISSnapshotCloneDatasource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_snapshot_clones_test.go b/ibm/service/vpc/data_source_ibm_is_snapshot_clones_test.go index 547f622900..600d8fb2a0 100644 --- a/ibm/service/vpc/data_source_ibm_is_snapshot_clones_test.go +++ b/ibm/service/vpc/data_source_ibm_is_snapshot_clones_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISSnapshotClonesDatasource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_snapshot_consistency_group_test.go b/ibm/service/vpc/data_source_ibm_is_snapshot_consistency_group_test.go index 37a2c4c9b0..4e30b4f9da 100644 --- a/ibm/service/vpc/data_source_ibm_is_snapshot_consistency_group_test.go +++ b/ibm/service/vpc/data_source_ibm_is_snapshot_consistency_group_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_snapshot_consistency_groups_test.go b/ibm/service/vpc/data_source_ibm_is_snapshot_consistency_groups_test.go index ee04481c60..c643815f42 100644 --- a/ibm/service/vpc/data_source_ibm_is_snapshot_consistency_groups_test.go +++ b/ibm/service/vpc/data_source_ibm_is_snapshot_consistency_groups_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_snapshot_test.go b/ibm/service/vpc/data_source_ibm_is_snapshot_test.go index 7d3febec0e..3e152330d4 100644 --- a/ibm/service/vpc/data_source_ibm_is_snapshot_test.go +++ b/ibm/service/vpc/data_source_ibm_is_snapshot_test.go @@ -11,8 +11,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISSnapshotDatasource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_snapshots_test.go b/ibm/service/vpc/data_source_ibm_is_snapshots_test.go index 59e7dc95a6..d999dc08c1 100644 --- a/ibm/service/vpc/data_source_ibm_is_snapshots_test.go +++ b/ibm/service/vpc/data_source_ibm_is_snapshots_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISSnapshotsDatasource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_source_share_test.go b/ibm/service/vpc/data_source_ibm_is_source_share_test.go index 5b6f850be8..e424ccdb5c 100644 --- a/ibm/service/vpc/data_source_ibm_is_source_share_test.go +++ b/ibm/service/vpc/data_source_ibm_is_source_share_test.go @@ -9,8 +9,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmIsSourceShareDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_ssh_key_new.go b/ibm/service/vpc/data_source_ibm_is_ssh_key_new.go new file mode 100644 index 0000000000..47f3572e65 --- /dev/null +++ b/ibm/service/vpc/data_source_ibm_is_ssh_key_new.go @@ -0,0 +1,198 @@ +// Copyright IBM Corp. 2017, 2021 All Rights Reserved. +// Licensed under the Mozilla Public License v2.0 + +package vpc + +import ( + "context" + "fmt" + + "github.com/IBM/vpc-go-sdk/vpcv1" + + "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" + "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" +) + +type DataSourceIsSshKey struct { + client interface{} +} + +type DataSourceIsSshKeyModel struct { + ResourceGroup types.String `tfsdk:"resource_group"` + Tags types.List `tfsdk:"tags"` + Name types.String `tfsdk:"name"` + Type types.String `tfsdk:"type"` + Fingerprint types.String `tfsdk:"fingerprint"` + PublicKey types.String `tfsdk:"public_key"` + Length types.Int64 `tfsdk:"length"` + ResourceControllerUrl types.String `tfsdk:"resource_controller_url"` + ResourceName types.String `tfsdk:"resource_name"` + ResourceCrn types.String `tfsdk:"resource_crn"` + Crn types.String `tfsdk:"crn"` + ResourceGroupName types.String `tfsdk:"resource_group_name"` + AccessTags types.List `tfsdk:"access_tags"` +} + +func NewIsSshKeyDataSource(client interface{}) datasource.DataSource { + return &DataSourceIsSshKey{ + client: client, + } +} + +func (d *DataSourceIsSshKey) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { + resp.TypeName = req.ProviderTypeName + "_is_ssh_key_new" +} + +func (d *DataSourceIsSshKey) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { + resp.Schema = schema.Schema{ + MarkdownDescription: "The ssh key data source retrieves the given ssh key.", + Attributes: map[string]schema.Attribute{ + "resource_group": schema.StringAttribute{ + Description: "Resource group ID", + Computed: true, + }, + "tags": schema.ListAttribute{ + Description: "User Tags for the ssh", + Computed: true, + ElementType: types.StringType, + }, + "name": schema.StringAttribute{ + Required: true, + Description: "The name of the ssh key", + }, + "type": schema.StringAttribute{ + Description: "The ssh key type", + Computed: true, + }, + "fingerprint": schema.StringAttribute{ + Description: "The ssh key Fingerprint", + Computed: true, + }, + "public_key": schema.StringAttribute{ + Description: "SSH Public key data", + Computed: true, + }, + "length": schema.Int64Attribute{ + Description: "The ssh key length", + Computed: true, + }, + "resource_controller_url": schema.StringAttribute{ + Description: "The URL of the IBM Cloud dashboard that can be used to explore and view details about this instance", + Computed: true, + }, + "resource_name": schema.StringAttribute{ + Description: "The name of the resource", + Computed: true, + }, + "resource_crn": schema.StringAttribute{ + Description: "The crn of the resource", + Computed: true, + }, + "crn": schema.StringAttribute{ + Description: "The crn of the resource", + Computed: true, + }, + "resource_group_name": schema.StringAttribute{ + Description: "The resource group name in which resource is provisioned", + Computed: true, + }, + "access_tags": schema.ListAttribute{ + Description: "List of access tags", + ElementType: types.StringType, + Computed: true, + }, + }, + } +} + +func (d *DataSourceIsSshKey) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { + if req.ProviderData == nil { + return + } + client, err := d.client.(conns.ClientSession).VpcV1API() + if err != nil { + resp.Diagnostics.AddError( + "Unexpected Data Source Configure Type", + fmt.Sprintf("Expected *clients.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + ) + return + } + d.client = client +} + +func (d *DataSourceIsSshKey) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + var data DataSourceIsSshKeyModel + resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) + name := data.Name.ValueString() + client, err := d.client.(conns.ClientSession).VpcV1API() + if err != nil { + resp.Diagnostics.AddError( + "Error creating session", + err.Error(), + ) + } + options := &vpcv1.ListKeysOptions{} + + pager, err := client.NewKeysPager(options) + if err != nil { + resp.Diagnostics.AddError( + "Error fetching keys", + err.Error(), + ) + return + } + keys, err := pager.GetAll() + if err != nil { + resp.Diagnostics.AddError( + "Error fetching keys", + err.Error(), + ) + return + } + var keyfound *vpcv1.Key + for _, key := range keys { + if *key.Name == name { + keyfound = &key + } + } + if keyfound != nil { + data.Name = types.StringValue(*keyfound.Name) + data.ResourceName = types.StringValue(*keyfound.Name) + data.ResourceCrn = types.StringValue(*keyfound.CRN) + data.Crn = types.StringValue(*keyfound.CRN) + data.ResourceGroup = types.StringValue(*keyfound.ResourceGroup.ID) + data.ResourceGroupName = types.StringValue(*keyfound.ResourceGroup.Name) + data.Fingerprint = types.StringValue(*keyfound.Fingerprint) + data.Length = types.Int64Value(*keyfound.Length) + data.PublicKey = types.StringValue(*keyfound.PublicKey) + data.Type = types.StringValue(*keyfound.Type) + controller, err := flex.GetBaseController(d.client) + if err != nil { + resp.Diagnostics.AddError( + fmt.Sprintf("RC error %s", name), + err.Error(), + ) + } + data.ResourceControllerUrl = types.StringValue(controller + "/vpc/compute/sshKeys") + tags, _ := flex.GetGlobalTagsElementsUsingCRN(d.client, *keyfound.CRN, "", isKeyUserTagType) + access, _ := flex.GetGlobalTagsElementsUsingCRN(d.client, *keyfound.CRN, "", isKeyAccessTagType) + if len(tags) > 0 { + data.Tags, _ = basetypes.NewListValue(convertStringSliceToListValue(tags)) + } + if len(access) > 0 { + data.AccessTags, _ = basetypes.NewListValue(convertStringSliceToListValue(access)) + } + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) + } else { + resp.Diagnostics.AddError( + fmt.Sprintf("No key found with the name %s", name), + fmt.Errorf("No key found with the name %s", name).Error(), + ) + return + } +} diff --git a/ibm/service/vpc/data_source_ibm_is_ssh_key_new_test.go b/ibm/service/vpc/data_source_ibm_is_ssh_key_new_test.go new file mode 100644 index 0000000000..17938c1059 --- /dev/null +++ b/ibm/service/vpc/data_source_ibm_is_ssh_key_new_test.go @@ -0,0 +1,54 @@ +package vpc_test + +import ( + "fmt" + "log" + "testing" + + acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" +) + +// Test SSH Key data +const ( + rsaPublicKey = `ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVERRN7/9484SOBJ3HSKxxNG5JN8owAjy5f9yYwcUg+JaUVuytn5Pv3aeYROHGGg+5G346xaq3DAwX6Y5ykr2fvjObgncQBnuU5KHWCECO/4h8uWuwh/kfniXPVjFToc+gnkqA+3RKpAecZhFXwfalQ9mMuYGFxn+fwn8cYEApsJbsEmb0iJwPiZ5hjFC8wREuiTlhPHDgkBLOiycd20op2nXzDbHfCHInquEe/gYxEitALONxm0swBOwJZwlTDOB7C6y2dzlrtxr1L59m7pCkWI4EtTRLvleehBoj3u7jB4usR \n` + ed25519PublicKey = `ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILw6jUMh6BHClr2dUV1LHHKBQQKyTDZvY/0BSPDQmzWo \n` +) + +func TestAccVPCIsSshKeyNewDatasource(t *testing.T) { + log.Printf("[INFO] UJJK Inside test file") + dataSourceAddress := "data.ibm_is_ssh_key_new.this" + name1 := fmt.Sprintf("tfssh-name-%d", 10) + // publicKey := strings.TrimSpace(` + // ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVERRN7/9484SOBJ3HSKxxNG5JN8owAjy5f9yYwcUg+JaUVuytn5Pv3aeYROHGGg+5G346xaq3DAwX6Y5ykr2fvjObgncQBnuU5KHWCECO/4h8uWuwh/kfniXPVjFToc+gnkqA+3RKpAecZhFXwfalQ9mMuYGFxn+fwn8cYEApsJbsEmb0iJwPiZ5hjFC8wREuiTlhPHDgkBLOiycd20op2nXzDbHfCHInquEe/gYxEitALONxm0swBOwJZwlTDOB7C6y2dzlrtxr1L59m7pCkWI4EtTRLvleehBoj3u7jB4usR + // `) + keytype := "ed25519" + resource.Test(t, resource.TestCase{ + ProtoV6ProviderFactories: acc.ProtoV6ProviderFactories, + // PreCheck: func() { acc.TestAccPreCheck(t) }, + // CheckDestroy: testAccCheckGroupDestroy(t, groupName), + Steps: []resource.TestStep{ + { + Config: testAccVPCIsSshKeyDatasourceConfig(name1, ed25519PublicKey, keytype), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(dataSourceAddress, "id"), + resource.TestCheckResourceAttrSet(dataSourceAddress, "href"), + resource.TestCheckResourceAttrSet(dataSourceAddress, "crn"), + ), + }, + }, + }) +} + +func testAccVPCIsSshKeyDatasourceConfig(name, publickey, keytype string) string { + return fmt.Sprintf(` + resource ibm_is_ssh_key_new ed25519 { + name = "%s" + public_key = "%s" + type = "%s" + } + data ibm_is_ssh_key_new this { + name = ibm_is_ssh_key_new.ed25519.name + } +`, name, publickey, keytype) +} diff --git a/ibm/service/vpc/data_source_ibm_is_ssh_key_test.go b/ibm/service/vpc/data_source_ibm_is_ssh_key_test.go index a45e71325f..58d63ff16b 100644 --- a/ibm/service/vpc/data_source_ibm_is_ssh_key_test.go +++ b/ibm/service/vpc/data_source_ibm_is_ssh_key_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISSSHKeyDatasource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_ssh_keys_test.go b/ibm/service/vpc/data_source_ibm_is_ssh_keys_test.go index ae037c363f..5653618691 100644 --- a/ibm/service/vpc/data_source_ibm_is_ssh_keys_test.go +++ b/ibm/service/vpc/data_source_ibm_is_ssh_keys_test.go @@ -9,8 +9,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsSshKeysDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_subnet_reserved_ip_test.go b/ibm/service/vpc/data_source_ibm_is_subnet_reserved_ip_test.go index 7ec18f8d23..e5e69d0fa7 100644 --- a/ibm/service/vpc/data_source_ibm_is_subnet_reserved_ip_test.go +++ b/ibm/service/vpc/data_source_ibm_is_subnet_reserved_ip_test.go @@ -8,8 +8,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISSubnetReservedIP_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_subnet_reserved_ips_test.go b/ibm/service/vpc/data_source_ibm_is_subnet_reserved_ips_test.go index dcdb136056..2a5caec6f0 100644 --- a/ibm/service/vpc/data_source_ibm_is_subnet_reserved_ips_test.go +++ b/ibm/service/vpc/data_source_ibm_is_subnet_reserved_ips_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISSubnetReservedIPs_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_subnet_test.go b/ibm/service/vpc/data_source_ibm_is_subnet_test.go index 1ac7869be7..c3812a0950 100644 --- a/ibm/service/vpc/data_source_ibm_is_subnet_test.go +++ b/ibm/service/vpc/data_source_ibm_is_subnet_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISSubnetDatasource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_subnets_test.go b/ibm/service/vpc/data_source_ibm_is_subnets_test.go index 92ec7a24cc..9c260217a4 100644 --- a/ibm/service/vpc/data_source_ibm_is_subnets_test.go +++ b/ibm/service/vpc/data_source_ibm_is_subnets_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISSubnetsDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_virtual_endpoint_gateway_test.go b/ibm/service/vpc/data_source_ibm_is_virtual_endpoint_gateway_test.go index 2a37efe704..97b70b20ec 100644 --- a/ibm/service/vpc/data_source_ibm_is_virtual_endpoint_gateway_test.go +++ b/ibm/service/vpc/data_source_ibm_is_virtual_endpoint_gateway_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISVirtualEndpointGatewayDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_virtual_endpoint_gateways_test.go b/ibm/service/vpc/data_source_ibm_is_virtual_endpoint_gateways_test.go index 6bf123de9d..916cb018b6 100644 --- a/ibm/service/vpc/data_source_ibm_is_virtual_endpoint_gateways_test.go +++ b/ibm/service/vpc/data_source_ibm_is_virtual_endpoint_gateways_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISVirtualEndpointGatewaysDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_virtual_network_interface_floating_ip_test.go b/ibm/service/vpc/data_source_ibm_is_virtual_network_interface_floating_ip_test.go index c89e8a9005..3d142a529a 100644 --- a/ibm/service/vpc/data_source_ibm_is_virtual_network_interface_floating_ip_test.go +++ b/ibm/service/vpc/data_source_ibm_is_virtual_network_interface_floating_ip_test.go @@ -8,8 +8,8 @@ import ( "regexp" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_virtual_network_interface_floating_ips_test.go b/ibm/service/vpc/data_source_ibm_is_virtual_network_interface_floating_ips_test.go index bf360f604d..5c28044628 100644 --- a/ibm/service/vpc/data_source_ibm_is_virtual_network_interface_floating_ips_test.go +++ b/ibm/service/vpc/data_source_ibm_is_virtual_network_interface_floating_ips_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_virtual_network_interface_ip_test.go b/ibm/service/vpc/data_source_ibm_is_virtual_network_interface_ip_test.go index 99239c2bbc..3d4d13aaf7 100644 --- a/ibm/service/vpc/data_source_ibm_is_virtual_network_interface_ip_test.go +++ b/ibm/service/vpc/data_source_ibm_is_virtual_network_interface_ip_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_virtual_network_interface_ips_test.go b/ibm/service/vpc/data_source_ibm_is_virtual_network_interface_ips_test.go index 48eb37b3d1..c9d0320001 100644 --- a/ibm/service/vpc/data_source_ibm_is_virtual_network_interface_ips_test.go +++ b/ibm/service/vpc/data_source_ibm_is_virtual_network_interface_ips_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_virtual_network_interface_test.go b/ibm/service/vpc/data_source_ibm_is_virtual_network_interface_test.go index cb62f06806..5d007f83ea 100644 --- a/ibm/service/vpc/data_source_ibm_is_virtual_network_interface_test.go +++ b/ibm/service/vpc/data_source_ibm_is_virtual_network_interface_test.go @@ -8,8 +8,8 @@ import ( "testing" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_virtual_network_interfaces_test.go b/ibm/service/vpc/data_source_ibm_is_virtual_network_interfaces_test.go index f3491a1e7e..1b782e528d 100644 --- a/ibm/service/vpc/data_source_ibm_is_virtual_network_interfaces_test.go +++ b/ibm/service/vpc/data_source_ibm_is_virtual_network_interfaces_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_volume_profile_test.go b/ibm/service/vpc/data_source_ibm_is_volume_profile_test.go index baf5de3b26..f0efa40850 100644 --- a/ibm/service/vpc/data_source_ibm_is_volume_profile_test.go +++ b/ibm/service/vpc/data_source_ibm_is_volume_profile_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISVolumeProfileDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_volume_profiles_test.go b/ibm/service/vpc/data_source_ibm_is_volume_profiles_test.go index 5cee03d018..a17aa767cf 100644 --- a/ibm/service/vpc/data_source_ibm_is_volume_profiles_test.go +++ b/ibm/service/vpc/data_source_ibm_is_volume_profiles_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISVolumeProfilesDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_volume_test.go b/ibm/service/vpc/data_source_ibm_is_volume_test.go index ffbf25c412..3cbc5410d7 100644 --- a/ibm/service/vpc/data_source_ibm_is_volume_test.go +++ b/ibm/service/vpc/data_source_ibm_is_volume_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISVolumeDatasource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_volumes_test.go b/ibm/service/vpc/data_source_ibm_is_volumes_test.go index 82b1339725..58e7908878 100644 --- a/ibm/service/vpc/data_source_ibm_is_volumes_test.go +++ b/ibm/service/vpc/data_source_ibm_is_volumes_test.go @@ -9,8 +9,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsVolumesDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_vpc_address_prefix_test.go b/ibm/service/vpc/data_source_ibm_is_vpc_address_prefix_test.go index b3a96fb7e3..750bbb8454 100644 --- a/ibm/service/vpc/data_source_ibm_is_vpc_address_prefix_test.go +++ b/ibm/service/vpc/data_source_ibm_is_vpc_address_prefix_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsVPCAddressPrefixDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_vpc_address_prefixes_test.go b/ibm/service/vpc/data_source_ibm_is_vpc_address_prefixes_test.go index 230c040ff5..f5079c5ddd 100644 --- a/ibm/service/vpc/data_source_ibm_is_vpc_address_prefixes_test.go +++ b/ibm/service/vpc/data_source_ibm_is_vpc_address_prefixes_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmIsVpcAddressPrefixesDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_vpc_default_routing_table_test.go b/ibm/service/vpc/data_source_ibm_is_vpc_default_routing_table_test.go index 07fa8ad963..49ebe53799 100644 --- a/ibm/service/vpc/data_source_ibm_is_vpc_default_routing_table_test.go +++ b/ibm/service/vpc/data_source_ibm_is_vpc_default_routing_table_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISVPCDefaultRoutingTableDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_vpc_dns_resolution_binding_test.go b/ibm/service/vpc/data_source_ibm_is_vpc_dns_resolution_binding_test.go index 7b1ea7884b..4296c83380 100644 --- a/ibm/service/vpc/data_source_ibm_is_vpc_dns_resolution_binding_test.go +++ b/ibm/service/vpc/data_source_ibm_is_vpc_dns_resolution_binding_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_vpc_dns_resolution_bindings_test.go b/ibm/service/vpc/data_source_ibm_is_vpc_dns_resolution_bindings_test.go index da4dff088b..73ced6d1cd 100644 --- a/ibm/service/vpc/data_source_ibm_is_vpc_dns_resolution_bindings_test.go +++ b/ibm/service/vpc/data_source_ibm_is_vpc_dns_resolution_bindings_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_vpc_routing_table_route_test.go b/ibm/service/vpc/data_source_ibm_is_vpc_routing_table_route_test.go index 5721bc90b6..6ff6fdbb8a 100644 --- a/ibm/service/vpc/data_source_ibm_is_vpc_routing_table_route_test.go +++ b/ibm/service/vpc/data_source_ibm_is_vpc_routing_table_route_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIBMIsVPCRoutingTableRouteDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_vpc_routing_table_routes_test.go b/ibm/service/vpc/data_source_ibm_is_vpc_routing_table_routes_test.go index a1ce02a8eb..760ae48441 100644 --- a/ibm/service/vpc/data_source_ibm_is_vpc_routing_table_routes_test.go +++ b/ibm/service/vpc/data_source_ibm_is_vpc_routing_table_routes_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISVPCRoutingTableRoutesDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_vpc_routing_table_test.go b/ibm/service/vpc/data_source_ibm_is_vpc_routing_table_test.go index bb063d72c3..edbecd66f2 100644 --- a/ibm/service/vpc/data_source_ibm_is_vpc_routing_table_test.go +++ b/ibm/service/vpc/data_source_ibm_is_vpc_routing_table_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIBMIsVPCRoutingTableDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_vpc_routing_tables_test.go b/ibm/service/vpc/data_source_ibm_is_vpc_routing_tables_test.go index f673df8665..b63f56abf0 100644 --- a/ibm/service/vpc/data_source_ibm_is_vpc_routing_tables_test.go +++ b/ibm/service/vpc/data_source_ibm_is_vpc_routing_tables_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISVPCRoutingTablesDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_vpc_test.go b/ibm/service/vpc/data_source_ibm_is_vpc_test.go index 99ba4eaf97..0c7f0e6d76 100644 --- a/ibm/service/vpc/data_source_ibm_is_vpc_test.go +++ b/ibm/service/vpc/data_source_ibm_is_vpc_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISVPCDatasource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_vpcs_test.go b/ibm/service/vpc/data_source_ibm_is_vpcs_test.go index 78005f9c45..9b6580dc97 100644 --- a/ibm/service/vpc/data_source_ibm_is_vpcs_test.go +++ b/ibm/service/vpc/data_source_ibm_is_vpcs_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISVPCsDatasource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_vpn_gateway_connection_local_cidrs_test.go b/ibm/service/vpc/data_source_ibm_is_vpn_gateway_connection_local_cidrs_test.go index 6d211336f5..92e2807d61 100644 --- a/ibm/service/vpc/data_source_ibm_is_vpn_gateway_connection_local_cidrs_test.go +++ b/ibm/service/vpc/data_source_ibm_is_vpn_gateway_connection_local_cidrs_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_vpn_gateway_connection_peer_cidrs_test.go b/ibm/service/vpc/data_source_ibm_is_vpn_gateway_connection_peer_cidrs_test.go index 867c31fe73..7da3e8228a 100644 --- a/ibm/service/vpc/data_source_ibm_is_vpn_gateway_connection_peer_cidrs_test.go +++ b/ibm/service/vpc/data_source_ibm_is_vpn_gateway_connection_peer_cidrs_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/data_source_ibm_is_vpn_gateway_connection_test.go b/ibm/service/vpc/data_source_ibm_is_vpn_gateway_connection_test.go index 6f2b7c9ee6..84176d5483 100644 --- a/ibm/service/vpc/data_source_ibm_is_vpn_gateway_connection_test.go +++ b/ibm/service/vpc/data_source_ibm_is_vpn_gateway_connection_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsVPNGatewayConnectionDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_vpn_gateway_connections_test.go b/ibm/service/vpc/data_source_ibm_is_vpn_gateway_connections_test.go index 7d44133e77..9ee8535b4e 100644 --- a/ibm/service/vpc/data_source_ibm_is_vpn_gateway_connections_test.go +++ b/ibm/service/vpc/data_source_ibm_is_vpn_gateway_connections_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISVpnGatewayConnectionsDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_vpn_gateway_test.go b/ibm/service/vpc/data_source_ibm_is_vpn_gateway_test.go index fe4ae5b454..d1c2caf02f 100644 --- a/ibm/service/vpc/data_source_ibm_is_vpn_gateway_test.go +++ b/ibm/service/vpc/data_source_ibm_is_vpn_gateway_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsVPNGatewayDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_vpn_gateways_test.go b/ibm/service/vpc/data_source_ibm_is_vpn_gateways_test.go index a973338165..15d44632a3 100644 --- a/ibm/service/vpc/data_source_ibm_is_vpn_gateways_test.go +++ b/ibm/service/vpc/data_source_ibm_is_vpn_gateways_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISVpnGatewaysDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_vpn_server_client_config_test.go b/ibm/service/vpc/data_source_ibm_is_vpn_server_client_config_test.go index e8ac14c210..a523ff6689 100644 --- a/ibm/service/vpc/data_source_ibm_is_vpn_server_client_config_test.go +++ b/ibm/service/vpc/data_source_ibm_is_vpn_server_client_config_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsVPNServerClientConfigDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_vpn_server_route_test.go b/ibm/service/vpc/data_source_ibm_is_vpn_server_route_test.go index ebd4361d27..31045c6eb7 100644 --- a/ibm/service/vpc/data_source_ibm_is_vpn_server_route_test.go +++ b/ibm/service/vpc/data_source_ibm_is_vpn_server_route_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsVPNServerRouteDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_vpn_server_routes_test.go b/ibm/service/vpc/data_source_ibm_is_vpn_server_routes_test.go index 57c52d6116..a074ec966e 100644 --- a/ibm/service/vpc/data_source_ibm_is_vpn_server_routes_test.go +++ b/ibm/service/vpc/data_source_ibm_is_vpn_server_routes_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsVPNServerRoutesDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_vpn_server_test.go b/ibm/service/vpc/data_source_ibm_is_vpn_server_test.go index 6059d925f6..c230ff50ff 100644 --- a/ibm/service/vpc/data_source_ibm_is_vpn_server_test.go +++ b/ibm/service/vpc/data_source_ibm_is_vpn_server_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsVPNServerDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_vpn_servers_test.go b/ibm/service/vpc/data_source_ibm_is_vpn_servers_test.go index 64e5802927..659117ac7f 100644 --- a/ibm/service/vpc/data_source_ibm_is_vpn_servers_test.go +++ b/ibm/service/vpc/data_source_ibm_is_vpn_servers_test.go @@ -8,8 +8,8 @@ import ( "testing" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMIsVPNServersDataSourceBasic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_zone_test.go b/ibm/service/vpc/data_source_ibm_is_zone_test.go index 6c064551fc..b42ce9c817 100644 --- a/ibm/service/vpc/data_source_ibm_is_zone_test.go +++ b/ibm/service/vpc/data_source_ibm_is_zone_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISZoneDataSource_basic(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_zones_test.go b/ibm/service/vpc/data_source_ibm_is_zones_test.go index b2ece41480..df91ec7016 100644 --- a/ibm/service/vpc/data_source_ibm_is_zones_test.go +++ b/ibm/service/vpc/data_source_ibm_is_zones_test.go @@ -9,7 +9,7 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISZonesDataSource_1(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_backup_policy_plan_test.go b/ibm/service/vpc/resource_ibm_is_backup_policy_plan_test.go index 54d2e8212c..0cb1398855 100644 --- a/ibm/service/vpc/resource_ibm_is_backup_policy_plan_test.go +++ b/ibm/service/vpc/resource_ibm_is_backup_policy_plan_test.go @@ -13,9 +13,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/vpc-go-sdk/vpcv1" ) diff --git a/ibm/service/vpc/resource_ibm_is_backup_policy_test.go b/ibm/service/vpc/resource_ibm_is_backup_policy_test.go index d6a0426b4f..55456a425b 100644 --- a/ibm/service/vpc/resource_ibm_is_backup_policy_test.go +++ b/ibm/service/vpc/resource_ibm_is_backup_policy_test.go @@ -9,9 +9,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/vpc-go-sdk/vpcv1" ) diff --git a/ibm/service/vpc/resource_ibm_is_bare_metal_server.go b/ibm/service/vpc/resource_ibm_is_bare_metal_server.go index 11f794bbbc..264139bdea 100644 --- a/ibm/service/vpc/resource_ibm_is_bare_metal_server.go +++ b/ibm/service/vpc/resource_ibm_is_bare_metal_server.go @@ -22,7 +22,7 @@ import ( "github.com/IBM/vpc-go-sdk/vpcv1" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -4020,7 +4020,7 @@ func bareMetalServerDelete(context context.Context, d *schema.ResourceData, meta func isWaitForBareMetalServerDeleted(bmsC *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for (%s) to be deleted.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isBareMetalServerActionDeleting}, Target: []string{"done", "", isBareMetalServerActionDeleted, isBareMetalServerStatusFailed}, Refresh: isBareMetalServerDeleteRefreshFunc(bmsC, id), @@ -4032,7 +4032,7 @@ func isWaitForBareMetalServerDeleted(bmsC *vpcv1.VpcV1, id string, timeout time. return stateConf.WaitForState() } -func isBareMetalServerDeleteRefreshFunc(bmsC *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isBareMetalServerDeleteRefreshFunc(bmsC *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { bmsgetoptions := &vpcv1.GetBareMetalServerOptions{ ID: &id, @@ -4054,7 +4054,7 @@ func isBareMetalServerDeleteRefreshFunc(bmsC *vpcv1.VpcV1, id string) resource.S func isWaitForBareMetalServerAvailable(client *vpcv1.VpcV1, id string, timeout time.Duration, d *schema.ResourceData) (interface{}, error) { log.Printf("Waiting for Bare Metal Server (%s) to be available.", id) communicator := make(chan interface{}) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isBareMetalServerStatusPending, isBareMetalServerActionStatusStarting}, Target: []string{isBareMetalServerStatusRunning, isBareMetalServerStatusFailed}, Refresh: isBareMetalServerRefreshFunc(client, id, d, communicator), @@ -4065,7 +4065,7 @@ func isWaitForBareMetalServerAvailable(client *vpcv1.VpcV1, id string, timeout t return stateConf.WaitForState() } -func isBareMetalServerRefreshFunc(client *vpcv1.VpcV1, id string, d *schema.ResourceData, communicator chan interface{}) resource.StateRefreshFunc { +func isBareMetalServerRefreshFunc(client *vpcv1.VpcV1, id string, d *schema.ResourceData, communicator chan interface{}) retry.StateRefreshFunc { return func() (interface{}, string, error) { bmsgetoptions := &vpcv1.GetBareMetalServerOptions{ ID: &id, @@ -4121,7 +4121,7 @@ func isBareMetalServerRefreshFunc(client *vpcv1.VpcV1, id string, d *schema.Reso func isWaitForBareMetalServerStoppedOnReload(client *vpcv1.VpcV1, id string, timeout time.Duration, d *schema.ResourceData) (interface{}, error) { log.Printf("Waiting for Bare Metal Server (%s) to be stopped for reload success.", id) communicator := make(chan interface{}) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isBareMetalServerStatusPending, isBareMetalServerActionStatusStarting, "reinitializing"}, Target: []string{isBareMetalServerStatusRunning, isBareMetalServerStatusFailed, "stopped"}, Refresh: isBareMetalServerRefreshFuncForReload(client, id, d, communicator), @@ -4132,7 +4132,7 @@ func isWaitForBareMetalServerStoppedOnReload(client *vpcv1.VpcV1, id string, tim return stateConf.WaitForState() } -func isBareMetalServerRefreshFuncForReload(client *vpcv1.VpcV1, id string, d *schema.ResourceData, communicator chan interface{}) resource.StateRefreshFunc { +func isBareMetalServerRefreshFuncForReload(client *vpcv1.VpcV1, id string, d *schema.ResourceData, communicator chan interface{}) retry.StateRefreshFunc { return func() (interface{}, string, error) { bmsgetoptions := &vpcv1.GetBareMetalServerOptions{ ID: &id, @@ -4188,7 +4188,7 @@ func isBareMetalServerRefreshFuncForReload(client *vpcv1.VpcV1, id string, d *sc func isWaitForBareMetalServerActionStop(bmsC *vpcv1.VpcV1, timeout time.Duration, id string, d *schema.ResourceData) (interface{}, error) { communicator := make(chan interface{}) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isBareMetalServerStatusRunning, isBareMetalServerStatusPending, isBareMetalServerActionStatusStopping}, Target: []string{isBareMetalServerActionStatusStopped, isBareMetalServerStatusFailed, ""}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/vpc/resource_ibm_is_bare_metal_server_action.go b/ibm/service/vpc/resource_ibm_is_bare_metal_server_action.go index 1331dce08e..7578c4877f 100644 --- a/ibm/service/vpc/resource_ibm_is_bare_metal_server_action.go +++ b/ibm/service/vpc/resource_ibm_is_bare_metal_server_action.go @@ -12,7 +12,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/IBM/vpc-go-sdk/vpcv1" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -306,7 +306,7 @@ func resourceIBMISBareMetalServerActionDelete(context context.Context, d *schema func isWaitForBareMetalServerActionAvailable(client *vpcv1.VpcV1, id string, timeout time.Duration, d *schema.ResourceData) (interface{}, error) { log.Printf("Waiting for Bare Metal Server (%s) to be running.", id) communicator := make(chan interface{}) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isBareMetalServerStatusPending, isBareMetalServerActionStatusStarting}, Target: []string{isBareMetalServerStatusRunning, isBareMetalServerStatusFailed}, Refresh: isBareMetalServerActionRefreshFunc(client, id, d, communicator), @@ -317,7 +317,7 @@ func isWaitForBareMetalServerActionAvailable(client *vpcv1.VpcV1, id string, tim return stateConf.WaitForState() } -func isBareMetalServerActionRefreshFunc(client *vpcv1.VpcV1, id string, d *schema.ResourceData, communicator chan interface{}) resource.StateRefreshFunc { +func isBareMetalServerActionRefreshFunc(client *vpcv1.VpcV1, id string, d *schema.ResourceData, communicator chan interface{}) retry.StateRefreshFunc { return func() (interface{}, string, error) { bmsgetoptions := &vpcv1.GetBareMetalServerOptions{ ID: &id, diff --git a/ibm/service/vpc/resource_ibm_is_bare_metal_server_action_test.go b/ibm/service/vpc/resource_ibm_is_bare_metal_server_action_test.go index 9cafa33682..7f77e453e6 100644 --- a/ibm/service/vpc/resource_ibm_is_bare_metal_server_action_test.go +++ b/ibm/service/vpc/resource_ibm_is_bare_metal_server_action_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISBareMetalServerAction_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_bare_metal_server_disk_test.go b/ibm/service/vpc/resource_ibm_is_bare_metal_server_disk_test.go index 4fb10dc934..62196c557e 100644 --- a/ibm/service/vpc/resource_ibm_is_bare_metal_server_disk_test.go +++ b/ibm/service/vpc/resource_ibm_is_bare_metal_server_disk_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISBareMetalServerDisk_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_bare_metal_server_initialization.go b/ibm/service/vpc/resource_ibm_is_bare_metal_server_initialization.go index 5619823a8d..73f6f67ddf 100644 --- a/ibm/service/vpc/resource_ibm_is_bare_metal_server_initialization.go +++ b/ibm/service/vpc/resource_ibm_is_bare_metal_server_initialization.go @@ -12,7 +12,7 @@ import ( "github.com/IBM/vpc-go-sdk/vpcv1" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -174,7 +174,7 @@ func resourceIBMISBareMetalServerInitializationDelete(context context.Context, d func isWaitForBareMetalServerInitializationStopped(client *vpcv1.VpcV1, id string, timeout time.Duration, d *schema.ResourceData) (interface{}, error) { log.Printf("Waiting for Bare Metal Server (%s) to be stopped for reload success.", id) communicator := make(chan interface{}) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isBareMetalServerStatusPending, isBareMetalServerActionStatusStarting, "reinitializing"}, Target: []string{isBareMetalServerStatusRunning, isBareMetalServerStatusFailed, "stopped"}, Refresh: isBareMetalServerInitializationRefreshFunc(client, id, d, communicator), @@ -185,7 +185,7 @@ func isWaitForBareMetalServerInitializationStopped(client *vpcv1.VpcV1, id strin return stateConf.WaitForState() } -func isBareMetalServerInitializationRefreshFunc(client *vpcv1.VpcV1, id string, d *schema.ResourceData, communicator chan interface{}) resource.StateRefreshFunc { +func isBareMetalServerInitializationRefreshFunc(client *vpcv1.VpcV1, id string, d *schema.ResourceData, communicator chan interface{}) retry.StateRefreshFunc { return func() (interface{}, string, error) { bmsgetoptions := &vpcv1.GetBareMetalServerOptions{ ID: &id, diff --git a/ibm/service/vpc/resource_ibm_is_bare_metal_server_initialization_test.go b/ibm/service/vpc/resource_ibm_is_bare_metal_server_initialization_test.go index 8adca3301e..2471b5fcd6 100644 --- a/ibm/service/vpc/resource_ibm_is_bare_metal_server_initialization_test.go +++ b/ibm/service/vpc/resource_ibm_is_bare_metal_server_initialization_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccReinitIBMISBareMetalServerreinitbasic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_attachment_test.go b/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_attachment_test.go index 05c523eb8a..645ca38222 100644 --- a/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_attachment_test.go +++ b/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_attachment_test.go @@ -8,9 +8,9 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" diff --git a/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_interface.go b/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_interface.go index 05f633f9c2..a1445e9f18 100644 --- a/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_interface.go +++ b/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_interface.go @@ -15,7 +15,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/IBM/vpc-go-sdk/vpcv1" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -1199,7 +1199,7 @@ func bareMetalServerNetworkInterfaceDelete(context context.Context, d *schema.Re func isWaitForBareMetalServerNetworkInterfaceDeleted(bmsC *vpcv1.VpcV1, bareMetalServerId, nicId, nicType string, nicIntf vpcv1.BareMetalServerNetworkInterfaceIntf, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for (%s) / (%s) to be deleted.", bareMetalServerId, nicId) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isBareMetalServerNetworkInterfaceAvailable, isBareMetalServerNetworkInterfaceDeleting, isBareMetalServerNetworkInterfacePending}, Target: []string{isBareMetalServerNetworkInterfaceDeleted, isBareMetalServerNetworkInterfaceVlanPending, isBareMetalServerNetworkInterfaceFailed, isBareMetalServerNetworkInterfacePCIPending, ""}, Refresh: isBareMetalServerNetworkInterfaceDeleteRefreshFunc(bmsC, bareMetalServerId, nicId, nicType, nicIntf), @@ -1211,7 +1211,7 @@ func isWaitForBareMetalServerNetworkInterfaceDeleted(bmsC *vpcv1.VpcV1, bareMeta return stateConf.WaitForState() } -func isBareMetalServerNetworkInterfaceDeleteRefreshFunc(bmsC *vpcv1.VpcV1, bareMetalServerId, nicId, nicType string, nicIntf vpcv1.BareMetalServerNetworkInterfaceIntf) resource.StateRefreshFunc { +func isBareMetalServerNetworkInterfaceDeleteRefreshFunc(bmsC *vpcv1.VpcV1, bareMetalServerId, nicId, nicType string, nicIntf vpcv1.BareMetalServerNetworkInterfaceIntf) retry.StateRefreshFunc { return func() (interface{}, string, error) { getBmsNicOptions := &vpcv1.GetBareMetalServerNetworkInterfaceOptions{ BareMetalServerID: &bareMetalServerId, @@ -1254,7 +1254,7 @@ func isBareMetalServerNetworkInterfaceDeleteRefreshFunc(bmsC *vpcv1.VpcV1, bareM func isWaitForBareMetalServerNetworkInterfaceAvailable(client *vpcv1.VpcV1, bareMetalServerId, nicId string, timeout time.Duration, d *schema.ResourceData) (interface{}, error) { log.Printf("Waiting for Bare Metal Server (%s) Network Interface (%s) to be available.", bareMetalServerId, nicId) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isBareMetalServerNetworkInterfacePending}, Target: []string{isBareMetalServerNetworkInterfaceAvailable, isBareMetalServerNetworkInterfacePCIPending, isBareMetalServerNetworkInterfaceFailed}, Refresh: isBareMetalServerNetworkInterfaceRefreshFunc(client, bareMetalServerId, nicId, d), @@ -1265,7 +1265,7 @@ func isWaitForBareMetalServerNetworkInterfaceAvailable(client *vpcv1.VpcV1, bare return stateConf.WaitForState() } -func isBareMetalServerNetworkInterfaceRefreshFunc(client *vpcv1.VpcV1, bareMetalServerId, nicId string, d *schema.ResourceData) resource.StateRefreshFunc { +func isBareMetalServerNetworkInterfaceRefreshFunc(client *vpcv1.VpcV1, bareMetalServerId, nicId string, d *schema.ResourceData) retry.StateRefreshFunc { return func() (interface{}, string, error) { getBmsNicOptions := &vpcv1.GetBareMetalServerNetworkInterfaceOptions{ BareMetalServerID: &bareMetalServerId, @@ -1335,7 +1335,7 @@ func ParseNICTerraformID(s string) (string, string, error) { func isWaitForBareMetalServerAvailableForNIC(client *vpcv1.VpcV1, id string, timeout time.Duration, d *schema.ResourceData) (interface{}, error) { log.Printf("Waiting for Bare Metal Server (%s) to be available.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isBareMetalServerStatusPending, isBareMetalServerActionStatusStarting, "running"}, Target: []string{isBareMetalServerStatusRunning, isBareMetalServerStatusFailed}, Refresh: isBareMetalServerForNICRefreshFunc(client, id, d), @@ -1346,7 +1346,7 @@ func isWaitForBareMetalServerAvailableForNIC(client *vpcv1.VpcV1, id string, tim return stateConf.WaitForState() } -func isBareMetalServerForNICRefreshFunc(client *vpcv1.VpcV1, id string, d *schema.ResourceData) resource.StateRefreshFunc { +func isBareMetalServerForNICRefreshFunc(client *vpcv1.VpcV1, id string, d *schema.ResourceData) retry.StateRefreshFunc { return func() (interface{}, string, error) { bmsgetoptions := &vpcv1.GetBareMetalServerOptions{ ID: &id, @@ -1365,7 +1365,7 @@ func isBareMetalServerForNICRefreshFunc(client *vpcv1.VpcV1, id string, d *schem func isWaitForBareMetalServerStoppedForNIC(client *vpcv1.VpcV1, id string, timeout time.Duration, d *schema.ResourceData) (interface{}, error) { log.Printf("Waiting for Bare Metal Server (%s) to be stopped.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isBareMetalServerStatusPending, isBareMetalServerActionStatusStarting}, Target: []string{isBareMetalServerActionStatusStopped}, Refresh: isBareMetalServerForNICStoppedRefreshFunc(client, id, d), @@ -1376,7 +1376,7 @@ func isWaitForBareMetalServerStoppedForNIC(client *vpcv1.VpcV1, id string, timeo return stateConf.WaitForState() } -func isBareMetalServerForNICStoppedRefreshFunc(client *vpcv1.VpcV1, id string, d *schema.ResourceData) resource.StateRefreshFunc { +func isBareMetalServerForNICStoppedRefreshFunc(client *vpcv1.VpcV1, id string, d *schema.ResourceData) retry.StateRefreshFunc { return func() (interface{}, string, error) { bmsgetoptions := &vpcv1.GetBareMetalServerOptions{ ID: &id, diff --git a/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_interface_allow_float_test.go b/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_interface_allow_float_test.go index 269165e7ef..98247e3de6 100644 --- a/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_interface_allow_float_test.go +++ b/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_interface_allow_float_test.go @@ -14,9 +14,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/vpc" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISBareMetalServerNetworkInterfaceAllowFloat_rip_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_interface_floating_ip.go b/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_interface_floating_ip.go index 68838fd8db..c4023d13df 100644 --- a/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_interface_floating_ip.go +++ b/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_interface_floating_ip.go @@ -12,7 +12,7 @@ import ( "github.com/IBM/vpc-go-sdk/vpcv1" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -276,7 +276,7 @@ func bareMetalServerNetworkInterfaceFipDelete(context context.Context, d *schema func isWaitForBareMetalServerNetworkInterfaceFloatingIpDeleted(bmsC *vpcv1.VpcV1, bareMetalServerId, nicId, fipId string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for (%s) / (%s) / (%s) to be deleted.", bareMetalServerId, nicId, fipId) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isBareMetalServerNetworkInterfaceFloatingIpAvailable, isBareMetalServerNetworkInterfaceFloatingIpDeleting, isBareMetalServerNetworkInterfaceFloatingIpPending}, Target: []string{isBareMetalServerNetworkInterfaceFloatingIpDeleted, isBareMetalServerNetworkInterfaceFailed, ""}, Refresh: isBareMetalServerNetworkInterfaceFloatingIpDeleteRefreshFunc(bmsC, bareMetalServerId, nicId, fipId), @@ -288,7 +288,7 @@ func isWaitForBareMetalServerNetworkInterfaceFloatingIpDeleted(bmsC *vpcv1.VpcV1 return stateConf.WaitForState() } -func isBareMetalServerNetworkInterfaceFloatingIpDeleteRefreshFunc(bmsC *vpcv1.VpcV1, bareMetalServerId, nicId, fipId string) resource.StateRefreshFunc { +func isBareMetalServerNetworkInterfaceFloatingIpDeleteRefreshFunc(bmsC *vpcv1.VpcV1, bareMetalServerId, nicId, fipId string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getBmsNicFloatingIpOptions := &vpcv1.GetBareMetalServerNetworkInterfaceFloatingIPOptions{ @@ -311,7 +311,7 @@ func isBareMetalServerNetworkInterfaceFloatingIpDeleteRefreshFunc(bmsC *vpcv1.Vp func isWaitForBareMetalServerNetworkInterfaceFloatingIpAvailable(client *vpcv1.VpcV1, bareMetalServerId, nicId, fipId string, timeout time.Duration, d *schema.ResourceData) (interface{}, error) { log.Printf("Waiting for Bare Metal Server (%s) Network Interface (%s) to be available.", bareMetalServerId, nicId) communicator := make(chan interface{}) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isBareMetalServerNetworkInterfaceFloatingIpPending}, Target: []string{isBareMetalServerNetworkInterfaceFloatingIpAvailable, isBareMetalServerNetworkInterfaceFloatingIpFailed}, Refresh: isBareMetalServerNetworkInterfaceFloatingIpRefreshFunc(client, bareMetalServerId, nicId, fipId, d, communicator), @@ -322,7 +322,7 @@ func isWaitForBareMetalServerNetworkInterfaceFloatingIpAvailable(client *vpcv1.V return stateConf.WaitForState() } -func isBareMetalServerNetworkInterfaceFloatingIpRefreshFunc(client *vpcv1.VpcV1, bareMetalServerId, nicId, fipId string, d *schema.ResourceData, communicator chan interface{}) resource.StateRefreshFunc { +func isBareMetalServerNetworkInterfaceFloatingIpRefreshFunc(client *vpcv1.VpcV1, bareMetalServerId, nicId, fipId string, d *schema.ResourceData, communicator chan interface{}) retry.StateRefreshFunc { return func() (interface{}, string, error) { getBmsNicFloatingIpOptions := &vpcv1.GetBareMetalServerNetworkInterfaceFloatingIPOptions{ BareMetalServerID: &bareMetalServerId, diff --git a/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_interface_floating_ip_test.go b/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_interface_floating_ip_test.go index 76054b89ad..43934be672 100644 --- a/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_interface_floating_ip_test.go +++ b/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_interface_floating_ip_test.go @@ -14,9 +14,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/vpc" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISBareMetalServerNetworkInterfaceFloatingIp_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_interface_test.go b/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_interface_test.go index d542a86ba2..9626d2d65f 100644 --- a/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_interface_test.go +++ b/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_interface_test.go @@ -14,9 +14,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/vpc" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISBareMetalServerNetworkInterface_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_bare_metal_server_test.go b/ibm/service/vpc/resource_ibm_is_bare_metal_server_test.go index 3a5fbadad1..45e444e17f 100644 --- a/ibm/service/vpc/resource_ibm_is_bare_metal_server_test.go +++ b/ibm/service/vpc/resource_ibm_is_bare_metal_server_test.go @@ -13,9 +13,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISBareMetalServer_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_cluster_network_interface_test.go b/ibm/service/vpc/resource_ibm_is_cluster_network_interface_test.go index 5f2f712661..c22b8c6046 100644 --- a/ibm/service/vpc/resource_ibm_is_cluster_network_interface_test.go +++ b/ibm/service/vpc/resource_ibm_is_cluster_network_interface_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/vpc/resource_ibm_is_cluster_network_subnet_reserved_ip_test.go b/ibm/service/vpc/resource_ibm_is_cluster_network_subnet_reserved_ip_test.go index b5a58b1640..3809522883 100644 --- a/ibm/service/vpc/resource_ibm_is_cluster_network_subnet_reserved_ip_test.go +++ b/ibm/service/vpc/resource_ibm_is_cluster_network_subnet_reserved_ip_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/vpc/resource_ibm_is_cluster_network_subnet_test.go b/ibm/service/vpc/resource_ibm_is_cluster_network_subnet_test.go index aca9b5b5b3..398ab8cfb3 100644 --- a/ibm/service/vpc/resource_ibm_is_cluster_network_subnet_test.go +++ b/ibm/service/vpc/resource_ibm_is_cluster_network_subnet_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/vpc/resource_ibm_is_cluster_network_test.go b/ibm/service/vpc/resource_ibm_is_cluster_network_test.go index 9828fa4470..de572676e7 100644 --- a/ibm/service/vpc/resource_ibm_is_cluster_network_test.go +++ b/ibm/service/vpc/resource_ibm_is_cluster_network_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/vpc/resource_ibm_is_dedicated_host.go b/ibm/service/vpc/resource_ibm_is_dedicated_host.go index 5a94188c04..4b9f5e74ec 100644 --- a/ibm/service/vpc/resource_ibm_is_dedicated_host.go +++ b/ibm/service/vpc/resource_ibm_is_dedicated_host.go @@ -14,7 +14,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM/go-sdk-core/v5/core" @@ -761,7 +761,7 @@ func resourceIbmIsDedicatedHostDelete(context context.Context, d *schema.Resourc func isWaitForDedicatedHostDelete(instanceC *vpcv1.VpcV1, d *schema.ResourceData, id string) (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isDedicatedHostDeleting, isDedicatedHostStable}, Target: []string{isDedicatedHostDeleteDone, ""}, Refresh: func() (interface{}, string, error) { @@ -791,7 +791,7 @@ func isWaitForDedicatedHostDelete(instanceC *vpcv1.VpcV1, d *schema.ResourceData func isWaitForDedicatedHostAvailable(instanceC *vpcv1.VpcV1, id string, timeout time.Duration, d *schema.ResourceData) (interface{}, error) { log.Printf("Waiting for dedicated host (%s) to be available.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isDedicatedHostStatusPending, isDedicatedHostUpdating, isDedicatedHostWaiting}, Target: []string{isDedicatedHostFailed, isDedicatedHostStable, isDedicatedHostSuspended}, Refresh: isDedicatedHostRefreshFunc(instanceC, id, d), @@ -803,7 +803,7 @@ func isWaitForDedicatedHostAvailable(instanceC *vpcv1.VpcV1, id string, timeout return stateConf.WaitForState() } -func isDedicatedHostRefreshFunc(instanceC *vpcv1.VpcV1, id string, d *schema.ResourceData) resource.StateRefreshFunc { +func isDedicatedHostRefreshFunc(instanceC *vpcv1.VpcV1, id string, d *schema.ResourceData) retry.StateRefreshFunc { return func() (interface{}, string, error) { getinsOptions := &vpcv1.GetDedicatedHostOptions{ ID: &id, diff --git a/ibm/service/vpc/resource_ibm_is_dedicated_host_disk_management_test.go b/ibm/service/vpc/resource_ibm_is_dedicated_host_disk_management_test.go index c1bd66f7a3..82979f27e8 100644 --- a/ibm/service/vpc/resource_ibm_is_dedicated_host_disk_management_test.go +++ b/ibm/service/vpc/resource_ibm_is_dedicated_host_disk_management_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISDedicatedHostDiskManagement_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_dedicated_host_group_test.go b/ibm/service/vpc/resource_ibm_is_dedicated_host_group_test.go index c1916b2984..719c4029f0 100644 --- a/ibm/service/vpc/resource_ibm_is_dedicated_host_group_test.go +++ b/ibm/service/vpc/resource_ibm_is_dedicated_host_group_test.go @@ -10,9 +10,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/vpc-go-sdk/vpcv1" ) diff --git a/ibm/service/vpc/resource_ibm_is_dedicated_host_test.go b/ibm/service/vpc/resource_ibm_is_dedicated_host_test.go index f07d05376a..912d48b5b6 100644 --- a/ibm/service/vpc/resource_ibm_is_dedicated_host_test.go +++ b/ibm/service/vpc/resource_ibm_is_dedicated_host_test.go @@ -10,9 +10,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/vpc-go-sdk/vpcv1" ) diff --git a/ibm/service/vpc/resource_ibm_is_floating_ip.go b/ibm/service/vpc/resource_ibm_is_floating_ip.go index b4adf1f0d2..1d29838126 100644 --- a/ibm/service/vpc/resource_ibm_is_floating_ip.go +++ b/ibm/service/vpc/resource_ibm_is_floating_ip.go @@ -16,7 +16,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/IBM/vpc-go-sdk/vpcv1" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -620,7 +620,7 @@ func fipExists(d *schema.ResourceData, meta interface{}, id string) (bool, error func isWaitForFloatingIPDeleted(fip *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for FloatingIP (%s) to be deleted.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isFloatingIPPending, isFloatingIPDeleting}, Target: []string{"", isFloatingIPDeleted}, Refresh: isFloatingIPDeleteRefreshFunc(fip, id), @@ -632,7 +632,7 @@ func isWaitForFloatingIPDeleted(fip *vpcv1.VpcV1, id string, timeout time.Durati return stateConf.WaitForState() } -func isFloatingIPDeleteRefreshFunc(fip *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isFloatingIPDeleteRefreshFunc(fip *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { log.Printf("[DEBUG] floating ip delete function here") getfipoptions := &vpcv1.GetFloatingIPOptions{ @@ -652,7 +652,7 @@ func isFloatingIPDeleteRefreshFunc(fip *vpcv1.VpcV1, id string) resource.StateRe func isWaitForInstanceFloatingIP(floatingipC *vpcv1.VpcV1, id string, d *schema.ResourceData) (interface{}, error) { log.Printf("Waiting for floating IP (%s) to be available.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isFloatingIPPending}, Target: []string{isFloatingIPAvailable, ""}, Refresh: isInstanceFloatingIPRefreshFunc(floatingipC, id), @@ -664,7 +664,7 @@ func isWaitForInstanceFloatingIP(floatingipC *vpcv1.VpcV1, id string, d *schema. return stateConf.WaitForState() } -func isInstanceFloatingIPRefreshFunc(floatingipC *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isInstanceFloatingIPRefreshFunc(floatingipC *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getfipoptions := &vpcv1.GetFloatingIPOptions{ ID: &id, diff --git a/ibm/service/vpc/resource_ibm_is_floating_ip_test.go b/ibm/service/vpc/resource_ibm_is_floating_ip_test.go index 7e3fca9fc0..7efe037442 100644 --- a/ibm/service/vpc/resource_ibm_is_floating_ip_test.go +++ b/ibm/service/vpc/resource_ibm_is_floating_ip_test.go @@ -13,9 +13,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISFloatingIP_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_flow_log_test.go b/ibm/service/vpc/resource_ibm_is_flow_log_test.go index 2ae5a35881..bab7219718 100644 --- a/ibm/service/vpc/resource_ibm_is_flow_log_test.go +++ b/ibm/service/vpc/resource_ibm_is_flow_log_test.go @@ -14,9 +14,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISFlowLog_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_ike_policy_test.go b/ibm/service/vpc/resource_ibm_is_ike_policy_test.go index b18563f081..3a3ddccdf2 100644 --- a/ibm/service/vpc/resource_ibm_is_ike_policy_test.go +++ b/ibm/service/vpc/resource_ibm_is_ike_policy_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISIKEPolicy_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_image.go b/ibm/service/vpc/resource_ibm_is_image.go index 04cbfaa6d2..5de25b89a7 100644 --- a/ibm/service/vpc/resource_ibm_is_image.go +++ b/ibm/service/vpc/resource_ibm_is_image.go @@ -15,7 +15,7 @@ import ( "github.com/IBM/vpc-go-sdk/vpcv1" "github.com/go-openapi/strfmt" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -512,7 +512,7 @@ func imgCreateByVolume(d *schema.ResourceData, meta interface{}, name, volume st func isWaitForImageAvailable(imageC *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for image (%s) to be available.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isImageProvisioning}, Target: []string{isImageProvisioningDone, ""}, Refresh: isImageRefreshFunc(imageC, id), @@ -523,7 +523,7 @@ func isWaitForImageAvailable(imageC *vpcv1.VpcV1, id string, timeout time.Durati return stateConf.WaitForState() } -func isImageRefreshFunc(imageC *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isImageRefreshFunc(imageC *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getimgoptions := &vpcv1.GetImageOptions{ ID: &id, @@ -822,7 +822,7 @@ func imgDelete(d *schema.ResourceData, meta interface{}, id string) error { func isWaitForImageDeleted(imageC *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for image (%s) to be deleted.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isImageDeleting}, Target: []string{"", isImageDeleted}, Refresh: isImageDeleteRefreshFunc(imageC, id), @@ -834,7 +834,7 @@ func isWaitForImageDeleted(imageC *vpcv1.VpcV1, id string, timeout time.Duration return stateConf.WaitForState() } -func isImageDeleteRefreshFunc(imageC *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isImageDeleteRefreshFunc(imageC *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { log.Printf("[DEBUG] is image delete function here") getimgoptions := &vpcv1.GetImageOptions{ diff --git a/ibm/service/vpc/resource_ibm_is_image_deprecate.go b/ibm/service/vpc/resource_ibm_is_image_deprecate.go index a6f39624b4..da2ed0fd53 100644 --- a/ibm/service/vpc/resource_ibm_is_image_deprecate.go +++ b/ibm/service/vpc/resource_ibm_is_image_deprecate.go @@ -13,7 +13,7 @@ import ( "github.com/IBM/vpc-go-sdk/vpcv1" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -217,7 +217,7 @@ func imgDeprecateCreate(context context.Context, d *schema.ResourceData, meta in func isWaitForImageDeprecate(imageC *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for image (%s) to be deprecate.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isImageProvisioning}, Target: []string{isImageProvisioningDone, ""}, Refresh: isImageDeprecateRefreshFunc(imageC, id), @@ -229,7 +229,7 @@ func isWaitForImageDeprecate(imageC *vpcv1.VpcV1, id string, timeout time.Durati return stateConf.WaitForState() } -func isImageDeprecateRefreshFunc(imageC *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isImageDeprecateRefreshFunc(imageC *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getimgoptions := &vpcv1.GetImageOptions{ ID: &id, diff --git a/ibm/service/vpc/resource_ibm_is_image_deprecate_test.go b/ibm/service/vpc/resource_ibm_is_image_deprecate_test.go index 9a7e14df5a..93b0cad97b 100644 --- a/ibm/service/vpc/resource_ibm_is_image_deprecate_test.go +++ b/ibm/service/vpc/resource_ibm_is_image_deprecate_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISImageDeprecate_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_image_export_job.go b/ibm/service/vpc/resource_ibm_is_image_export_job.go index 9c5af81bab..0e6734d209 100644 --- a/ibm/service/vpc/resource_ibm_is_image_export_job.go +++ b/ibm/service/vpc/resource_ibm_is_image_export_job.go @@ -10,7 +10,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -462,7 +462,7 @@ func ResourceIBMIsImageExportCloudObjectStorageObjectReferenceToMap(model *vpcv1 func isWaitForImageExportJobDeleted(context context.Context, d *schema.ResourceData, meta interface{}, vpcClient *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for image export job (%s) to be deleted.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", "deleting"}, Target: []string{"", "done"}, Refresh: isImageExportJobDeleteRefreshFunc(context, d, meta, vpcClient, id), @@ -474,7 +474,7 @@ func isWaitForImageExportJobDeleted(context context.Context, d *schema.ResourceD return stateConf.WaitForState() } -func isImageExportJobDeleteRefreshFunc(context context.Context, d *schema.ResourceData, meta interface{}, vpcClient *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isImageExportJobDeleteRefreshFunc(context context.Context, d *schema.ResourceData, meta interface{}, vpcClient *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { log.Printf("[DEBUG] is image export job delete refresh here") parts, err := flex.SepIdParts(d.Id(), "/") diff --git a/ibm/service/vpc/resource_ibm_is_image_export_job_test.go b/ibm/service/vpc/resource_ibm_is_image_export_job_test.go index 18eafbc1e0..e2a85576b6 100644 --- a/ibm/service/vpc/resource_ibm_is_image_export_job_test.go +++ b/ibm/service/vpc/resource_ibm_is_image_export_job_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/vpc/resource_ibm_is_image_obsolete.go b/ibm/service/vpc/resource_ibm_is_image_obsolete.go index 0145aeb6e4..66006716c8 100644 --- a/ibm/service/vpc/resource_ibm_is_image_obsolete.go +++ b/ibm/service/vpc/resource_ibm_is_image_obsolete.go @@ -13,7 +13,7 @@ import ( "github.com/IBM/vpc-go-sdk/vpcv1" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -211,7 +211,7 @@ func imgObsoleteCreate(context context.Context, d *schema.ResourceData, meta int func isWaitForImageObsolete(imageC *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for image (%s) to be obsolete.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isImageProvisioning}, Target: []string{isImageProvisioningDone, ""}, Refresh: isImageObsoleteRefreshFunc(imageC, id), @@ -222,7 +222,8 @@ func isWaitForImageObsolete(imageC *vpcv1.VpcV1, id string, timeout time.Duratio return stateConf.WaitForState() } -func isImageObsoleteRefreshFunc(imageC *vpcv1.VpcV1, id string) resource.StateRefreshFunc { + +func isImageObsoleteRefreshFunc(imageC *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getimgoptions := &vpcv1.GetImageOptions{ ID: &id, diff --git a/ibm/service/vpc/resource_ibm_is_image_obsolete_test.go b/ibm/service/vpc/resource_ibm_is_image_obsolete_test.go index 2fefae1cf0..1b116a74ab 100644 --- a/ibm/service/vpc/resource_ibm_is_image_obsolete_test.go +++ b/ibm/service/vpc/resource_ibm_is_image_obsolete_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISImageObsolete_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_image_test.go b/ibm/service/vpc/resource_ibm_is_image_test.go index d2e3fb6e41..5464c7babf 100644 --- a/ibm/service/vpc/resource_ibm_is_image_test.go +++ b/ibm/service/vpc/resource_ibm_is_image_test.go @@ -14,9 +14,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISImage_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_instance.go b/ibm/service/vpc/resource_ibm_is_instance.go index f55de548b6..45f5562d5e 100644 --- a/ibm/service/vpc/resource_ibm_is_instance.go +++ b/ibm/service/vpc/resource_ibm_is_instance.go @@ -18,7 +18,7 @@ import ( "github.com/IBM/go-sdk-core/v5/core" "github.com/IBM/vpc-go-sdk/vpcv1" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -4857,7 +4857,7 @@ func isWaitForInstanceAvailable(instanceC *vpcv1.VpcV1, id string, timeout time. communicator := make(chan interface{}) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isInstanceProvisioning}, Target: []string{isInstanceStatusRunning, "available", "failed", ""}, Refresh: isInstanceRefreshFunc(instanceC, id, d, communicator), @@ -4874,7 +4874,7 @@ func isWaitForInstanceAvailable(instanceC *vpcv1.VpcV1, id string, timeout time. return stateConf.WaitForState() } -func isInstanceRefreshFunc(instanceC *vpcv1.VpcV1, id string, d *schema.ResourceData, communicator chan interface{}) resource.StateRefreshFunc { +func isInstanceRefreshFunc(instanceC *vpcv1.VpcV1, id string, d *schema.ResourceData, communicator chan interface{}) retry.StateRefreshFunc { return func() (interface{}, string, error) { getinsOptions := &vpcv1.GetInstanceOptions{ ID: &id, @@ -7062,7 +7062,7 @@ func resourceIBMisInstanceExists(d *schema.ResourceData, meta interface{}) (bool func isWaitForInstanceDelete(instanceC *vpcv1.VpcV1, d *schema.ResourceData, id string) (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isInstanceDeleting, isInstanceAvailable}, Target: []string{isInstanceDeleteDone, ""}, Refresh: func() (interface{}, string, error) { @@ -7091,7 +7091,7 @@ func isWaitForInstanceDelete(instanceC *vpcv1.VpcV1, d *schema.ResourceData, id func isWaitForInstanceActionStop(instanceC *vpcv1.VpcV1, timeout time.Duration, id string, d *schema.ResourceData) (interface{}, error) { communicator := make(chan interface{}) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isInstanceStatusRunning, isInstanceStatusPending, isInstanceActionStatusStopping}, Target: []string{isInstanceActionStatusStopped, isInstanceStatusFailed, ""}, Refresh: func() (interface{}, string, error) { @@ -7130,7 +7130,7 @@ func isWaitForInstanceActionStop(instanceC *vpcv1.VpcV1, timeout time.Duration, func isWaitForInstanceActionStart(instanceC *vpcv1.VpcV1, timeout time.Duration, id string, d *schema.ResourceData) (interface{}, error) { communicator := make(chan interface{}) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isInstanceActionStatusStopped, isInstanceStatusPending, isInstanceActionStatusStopping, isInstanceStatusStarting, isInstanceStatusRestarting}, Target: []string{isInstanceStatusRunning, isInstanceStatusFailed, ""}, Refresh: func() (interface{}, string, error) { @@ -7197,7 +7197,7 @@ func isRestartStopAction(instanceC *vpcv1.VpcV1, id string, d *schema.ResourceDa func isWaitForInstanceVolumeAttached(instanceC *vpcv1.VpcV1, d *schema.ResourceData, id, volID string) (interface{}, error) { log.Printf("Waiting for instance (%s) volume (%s) to be attached.", id, volID) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isInstanceVolumeAttaching}, Target: []string{isInstanceVolumeAttached, ""}, Refresh: isInstanceVolumeRefreshFunc(instanceC, id, volID), @@ -7208,8 +7208,7 @@ func isWaitForInstanceVolumeAttached(instanceC *vpcv1.VpcV1, d *schema.ResourceD return stateConf.WaitForState() } - -func isInstanceVolumeRefreshFunc(instanceC *vpcv1.VpcV1, id, volID string) resource.StateRefreshFunc { +func isInstanceVolumeRefreshFunc(instanceC *vpcv1.VpcV1, id, volID string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getvolattoptions := &vpcv1.GetInstanceVolumeAttachmentOptions{ InstanceID: &id, @@ -7230,7 +7229,7 @@ func isInstanceVolumeRefreshFunc(instanceC *vpcv1.VpcV1, id, volID string) resou func isWaitForInstanceVolumeDetached(instanceC *vpcv1.VpcV1, d *schema.ResourceData, id, volID string) (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isInstanceVolumeAttached, isInstanceVolumeDetaching}, Target: []string{isInstanceDeleteDone, ""}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/vpc/resource_ibm_is_instance_action_test.go b/ibm/service/vpc/resource_ibm_is_instance_action_test.go index 42b1afc03c..dee1313ccc 100644 --- a/ibm/service/vpc/resource_ibm_is_instance_action_test.go +++ b/ibm/service/vpc/resource_ibm_is_instance_action_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISInstanceAction_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_instance_cluster_network_attachment_test.go b/ibm/service/vpc/resource_ibm_is_instance_cluster_network_attachment_test.go index 289c5e6a9e..07da7108f8 100644 --- a/ibm/service/vpc/resource_ibm_is_instance_cluster_network_attachment_test.go +++ b/ibm/service/vpc/resource_ibm_is_instance_cluster_network_attachment_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/vpc/resource_ibm_is_instance_disk_management_test.go b/ibm/service/vpc/resource_ibm_is_instance_disk_management_test.go index dbaccd4218..e9b3f5c473 100644 --- a/ibm/service/vpc/resource_ibm_is_instance_disk_management_test.go +++ b/ibm/service/vpc/resource_ibm_is_instance_disk_management_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIBMISInstanceDiskManagement_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_instance_group.go b/ibm/service/vpc/resource_ibm_is_instance_group.go index 0b3ca53739..48f21fbf72 100644 --- a/ibm/service/vpc/resource_ibm_is_instance_group.go +++ b/ibm/service/vpc/resource_ibm_is_instance_group.go @@ -15,7 +15,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/IBM/vpc-go-sdk/vpcv1" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -568,7 +568,7 @@ func waitForHealthyInstanceGroup(instanceGroupID string, meta interface{}, timeo getInstanceGroupOptions := vpcv1.GetInstanceGroupOptions{ID: &instanceGroupID} - healthStateConf := &resource.StateChangeConf{ + healthStateConf := &retry.StateChangeConf{ Pending: []string{SCALING}, Target: []string{HEALTHY}, Refresh: func() (interface{}, string, error) { @@ -594,7 +594,7 @@ func waitForHealthyInstanceGroup(instanceGroupID string, meta interface{}, timeo } func waitForInstanceGroupDelete(d *schema.ResourceData, meta interface{}) (interface{}, error) { - healthStateConf := &resource.StateChangeConf{ + healthStateConf := &retry.StateChangeConf{ Pending: []string{HEALTHY}, Target: []string{DELETING}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/vpc/resource_ibm_is_instance_group_manager_action_test.go b/ibm/service/vpc/resource_ibm_is_instance_group_manager_action_test.go index 699f2d584f..192bcb0b36 100644 --- a/ibm/service/vpc/resource_ibm_is_instance_group_manager_action_test.go +++ b/ibm/service/vpc/resource_ibm_is_instance_group_manager_action_test.go @@ -13,9 +13,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISInstanceGroupManagerAction_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_instance_group_manager_policy_test.go b/ibm/service/vpc/resource_ibm_is_instance_group_manager_policy_test.go index 16d3405db0..40b5b7500d 100644 --- a/ibm/service/vpc/resource_ibm_is_instance_group_manager_policy_test.go +++ b/ibm/service/vpc/resource_ibm_is_instance_group_manager_policy_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISInstanceGroupManagerPolicy_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_instance_group_manager_test.go b/ibm/service/vpc/resource_ibm_is_instance_group_manager_test.go index 3600faeff8..35bdf66d61 100644 --- a/ibm/service/vpc/resource_ibm_is_instance_group_manager_test.go +++ b/ibm/service/vpc/resource_ibm_is_instance_group_manager_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISInstanceGroupManager_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_instance_group_membership_test.go b/ibm/service/vpc/resource_ibm_is_instance_group_membership_test.go index a9f5b09950..0bf6539d03 100644 --- a/ibm/service/vpc/resource_ibm_is_instance_group_membership_test.go +++ b/ibm/service/vpc/resource_ibm_is_instance_group_membership_test.go @@ -10,8 +10,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmIsInstanceGroupMembershipResource_Basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_instance_group_test.go b/ibm/service/vpc/resource_ibm_is_instance_group_test.go index 85e863bfb6..cb3ab41694 100644 --- a/ibm/service/vpc/resource_ibm_is_instance_group_test.go +++ b/ibm/service/vpc/resource_ibm_is_instance_group_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISInstanceGroup_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_instance_network_attachment.go b/ibm/service/vpc/resource_ibm_is_instance_network_attachment.go index a0f76e2833..0c1571de75 100644 --- a/ibm/service/vpc/resource_ibm_is_instance_network_attachment.go +++ b/ibm/service/vpc/resource_ibm_is_instance_network_attachment.go @@ -10,7 +10,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" @@ -1014,7 +1014,7 @@ func resourceIBMIsInstanceNetworkAttachmentSubnetReferenceDeletedToMap(model *vp func isWaitForInstanceNetworkAttachmentStable(instanceC *vpcv1.VpcV1, instanceId, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for instance network attachment (%s) to be stable.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"deleting", "waiting", "updating", "pending"}, Target: []string{"stable", "failed", "suspended", ""}, Refresh: isInstanceNetworkAttachmentRefreshFunc(instanceC, instanceId, id), @@ -1025,7 +1025,7 @@ func isWaitForInstanceNetworkAttachmentStable(instanceC *vpcv1.VpcV1, instanceId return stateConf.WaitForState() } -func isInstanceNetworkAttachmentRefreshFunc(instanceC *vpcv1.VpcV1, instanceId, id string) resource.StateRefreshFunc { +func isInstanceNetworkAttachmentRefreshFunc(instanceC *vpcv1.VpcV1, instanceId, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getInstanceNetworkAttachmentOptions := &vpcv1.GetInstanceNetworkAttachmentOptions{ InstanceID: &instanceId, @@ -1046,7 +1046,7 @@ func isInstanceNetworkAttachmentRefreshFunc(instanceC *vpcv1.VpcV1, instanceId, func isWaitForInstanceNetworkAttachmentDeleted(instanceC *vpcv1.VpcV1, instanceId, id string, ina *vpcv1.InstanceNetworkAttachment, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for instance network attachment (%s) to be deleted.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"deleting", "waiting", "updating", "pending"}, Target: []string{"deleted", "failed", "suspended", ""}, Refresh: isInstanceNetworkAttachmentDeleteRefreshFunc(instanceC, instanceId, id, ina), @@ -1057,7 +1057,7 @@ func isWaitForInstanceNetworkAttachmentDeleted(instanceC *vpcv1.VpcV1, instanceI return stateConf.WaitForState() } -func isInstanceNetworkAttachmentDeleteRefreshFunc(instanceC *vpcv1.VpcV1, instanceId, id string, ina *vpcv1.InstanceNetworkAttachment) resource.StateRefreshFunc { +func isInstanceNetworkAttachmentDeleteRefreshFunc(instanceC *vpcv1.VpcV1, instanceId, id string, ina *vpcv1.InstanceNetworkAttachment) retry.StateRefreshFunc { return func() (interface{}, string, error) { getInstanceNetworkAttachmentOptions := &vpcv1.GetInstanceNetworkAttachmentOptions{ InstanceID: &instanceId, diff --git a/ibm/service/vpc/resource_ibm_is_instance_network_attachment_test.go b/ibm/service/vpc/resource_ibm_is_instance_network_attachment_test.go index 75436514b7..fff92e8a1c 100644 --- a/ibm/service/vpc/resource_ibm_is_instance_network_attachment_test.go +++ b/ibm/service/vpc/resource_ibm_is_instance_network_attachment_test.go @@ -8,9 +8,9 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" diff --git a/ibm/service/vpc/resource_ibm_is_instance_network_interface.go b/ibm/service/vpc/resource_ibm_is_instance_network_interface.go index a6fc8256af..ff2f083483 100644 --- a/ibm/service/vpc/resource_ibm_is_instance_network_interface.go +++ b/ibm/service/vpc/resource_ibm_is_instance_network_interface.go @@ -13,7 +13,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM/go-sdk-core/v5/core" @@ -741,7 +741,7 @@ func resourceIBMIsInstanceNetworkInterfaceDelete(context context.Context, d *sch func isWaitForNetworkInterfaceAvailable(vpcClient *vpcv1.VpcV1, id string, timeout time.Duration, d *schema.ResourceData) (interface{}, error) { log.Printf("Waiting for dedicated host (%s) to be available.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isNetworkInterfacePending}, Target: []string{isNetworkInterfaceAvailable, isNetworkInterfaceFailed}, Refresh: isNetworkInterfaceRefreshFunc(vpcClient, id, d), @@ -753,7 +753,7 @@ func isWaitForNetworkInterfaceAvailable(vpcClient *vpcv1.VpcV1, id string, timeo return stateConf.WaitForState() } -func isNetworkInterfaceRefreshFunc(vpcClient *vpcv1.VpcV1, id string, d *schema.ResourceData) resource.StateRefreshFunc { +func isNetworkInterfaceRefreshFunc(vpcClient *vpcv1.VpcV1, id string, d *schema.ResourceData) retry.StateRefreshFunc { return func() (interface{}, string, error) { getInstanceNetworkInterfaceOptions := &vpcv1.GetInstanceNetworkInterfaceOptions{} @@ -781,7 +781,7 @@ func isNetworkInterfaceRefreshFunc(vpcClient *vpcv1.VpcV1, id string, d *schema. func isWaitForNetworkInterfaceDelete(vpcClient *vpcv1.VpcV1, id string, timeout time.Duration, d *schema.ResourceData) (interface{}, error) { log.Printf("Waiting for dedicated host (%s) to be available.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isNetworkInterfacePending, isNetworkInterfaceDeleting, isNetworkInterfaceAvailable}, Target: []string{isNetworkInterfaceDeleted}, Refresh: isNetworkInterfaceRefreshDeleteFunc(vpcClient, id, d), @@ -793,7 +793,7 @@ func isWaitForNetworkInterfaceDelete(vpcClient *vpcv1.VpcV1, id string, timeout return stateConf.WaitForState() } -func isNetworkInterfaceRefreshDeleteFunc(vpcClient *vpcv1.VpcV1, id string, d *schema.ResourceData) resource.StateRefreshFunc { +func isNetworkInterfaceRefreshDeleteFunc(vpcClient *vpcv1.VpcV1, id string, d *schema.ResourceData) retry.StateRefreshFunc { return func() (interface{}, string, error) { getInstanceNetworkInterfaceOptions := &vpcv1.GetInstanceNetworkInterfaceOptions{} diff --git a/ibm/service/vpc/resource_ibm_is_instance_network_interface_floating_ip.go b/ibm/service/vpc/resource_ibm_is_instance_network_interface_floating_ip.go index e5062a98eb..94d0984e1c 100644 --- a/ibm/service/vpc/resource_ibm_is_instance_network_interface_floating_ip.go +++ b/ibm/service/vpc/resource_ibm_is_instance_network_interface_floating_ip.go @@ -12,7 +12,7 @@ import ( "github.com/IBM/vpc-go-sdk/vpcv1" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -271,7 +271,7 @@ func instanceNetworkInterfaceFipDelete(context context.Context, d *schema.Resour func isWaitForInstanceNetworkInterfaceFloatingIpDeleted(instanceC *vpcv1.VpcV1, instanceId, nicId, fipId string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for (%s) / (%s) / (%s) to be deleted.", instanceId, nicId, fipId) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isInstanceNetworkInterfaceFloatingIpAvailable, isInstanceNetworkInterfaceFloatingIpDeleting, isInstanceNetworkInterfaceFloatingIpPending}, Target: []string{isInstanceNetworkInterfaceFloatingIpDeleted, isInstanceNetworkInterfaceFloatingIpFailed, ""}, Refresh: isInstanceNetworkInterfaceFloatingIpDeleteRefreshFunc(instanceC, instanceId, nicId, fipId), @@ -283,7 +283,7 @@ func isWaitForInstanceNetworkInterfaceFloatingIpDeleted(instanceC *vpcv1.VpcV1, return stateConf.WaitForState() } -func isInstanceNetworkInterfaceFloatingIpDeleteRefreshFunc(instanceC *vpcv1.VpcV1, instanceId, nicId, fipId string) resource.StateRefreshFunc { +func isInstanceNetworkInterfaceFloatingIpDeleteRefreshFunc(instanceC *vpcv1.VpcV1, instanceId, nicId, fipId string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getBmsNicFloatingIpOptions := &vpcv1.GetInstanceNetworkInterfaceFloatingIPOptions{ @@ -306,7 +306,7 @@ func isInstanceNetworkInterfaceFloatingIpDeleteRefreshFunc(instanceC *vpcv1.VpcV func isWaitForInstanceNetworkInterfaceFloatingIpAvailable(client *vpcv1.VpcV1, instanceId, nicId, fipId string, timeout time.Duration, d *schema.ResourceData) (interface{}, error) { log.Printf("Waiting for Instance (%s) Network Interface (%s) to be available.", instanceId, nicId) communicator := make(chan interface{}) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isInstanceNetworkInterfaceFloatingIpPending}, Target: []string{isInstanceNetworkInterfaceFloatingIpAvailable, isInstanceNetworkInterfaceFloatingIpFailed}, Refresh: isInstanceNetworkInterfaceFloatingIpRefreshFunc(client, instanceId, nicId, fipId, d, communicator), @@ -317,7 +317,7 @@ func isWaitForInstanceNetworkInterfaceFloatingIpAvailable(client *vpcv1.VpcV1, i return stateConf.WaitForState() } -func isInstanceNetworkInterfaceFloatingIpRefreshFunc(client *vpcv1.VpcV1, instanceId, nicId, fipId string, d *schema.ResourceData, communicator chan interface{}) resource.StateRefreshFunc { +func isInstanceNetworkInterfaceFloatingIpRefreshFunc(client *vpcv1.VpcV1, instanceId, nicId, fipId string, d *schema.ResourceData, communicator chan interface{}) retry.StateRefreshFunc { return func() (interface{}, string, error) { getBmsNicFloatingIpOptions := &vpcv1.GetInstanceNetworkInterfaceFloatingIPOptions{ InstanceID: &instanceId, diff --git a/ibm/service/vpc/resource_ibm_is_instance_network_interface_floating_ip_test.go b/ibm/service/vpc/resource_ibm_is_instance_network_interface_floating_ip_test.go index 8f7108cdfc..7daf5d943a 100644 --- a/ibm/service/vpc/resource_ibm_is_instance_network_interface_floating_ip_test.go +++ b/ibm/service/vpc/resource_ibm_is_instance_network_interface_floating_ip_test.go @@ -14,9 +14,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/vpc" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISInstanceNetworkInterfaceFloatingIp_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_instance_network_interface_test.go b/ibm/service/vpc/resource_ibm_is_instance_network_interface_test.go index b61b3dd53a..88f5a483ca 100644 --- a/ibm/service/vpc/resource_ibm_is_instance_network_interface_test.go +++ b/ibm/service/vpc/resource_ibm_is_instance_network_interface_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/vpc-go-sdk/vpcv1" ) diff --git a/ibm/service/vpc/resource_ibm_is_instance_template_test.go b/ibm/service/vpc/resource_ibm_is_instance_template_test.go index 0bbefa10a2..4eed662a73 100644 --- a/ibm/service/vpc/resource_ibm_is_instance_template_test.go +++ b/ibm/service/vpc/resource_ibm_is_instance_template_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISInstanceTemplate_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_instance_test.go b/ibm/service/vpc/resource_ibm_is_instance_test.go index 88b02f8b85..7b8f47c4ec 100644 --- a/ibm/service/vpc/resource_ibm_is_instance_test.go +++ b/ibm/service/vpc/resource_ibm_is_instance_test.go @@ -14,9 +14,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISInstance_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_instance_volume_attachment_test.go b/ibm/service/vpc/resource_ibm_is_instance_volume_attachment_test.go index 0233ec7c17..ce0c9c17c9 100644 --- a/ibm/service/vpc/resource_ibm_is_instance_volume_attachment_test.go +++ b/ibm/service/vpc/resource_ibm_is_instance_volume_attachment_test.go @@ -13,9 +13,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISInstanceVolumeAttachment_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_ipsec_policy_test.go b/ibm/service/vpc/resource_ibm_is_ipsec_policy_test.go index f3a211da4e..96e029de6c 100644 --- a/ibm/service/vpc/resource_ibm_is_ipsec_policy_test.go +++ b/ibm/service/vpc/resource_ibm_is_ipsec_policy_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISIPSecPolicy_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_lb.go b/ibm/service/vpc/resource_ibm_is_lb.go index 4606741829..ad70b9376e 100644 --- a/ibm/service/vpc/resource_ibm_is_lb.go +++ b/ibm/service/vpc/resource_ibm_is_lb.go @@ -14,7 +14,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/IBM/vpc-go-sdk/vpcv1" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -976,7 +976,7 @@ func lbDelete(d *schema.ResourceData, meta interface{}, id string) error { func isWaitForLBDeleted(lbc *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for (%s) to be deleted.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isLBDeleting}, Target: []string{isLBDeleted, "failed"}, Refresh: isLBDeleteRefreshFunc(lbc, id), @@ -988,7 +988,7 @@ func isWaitForLBDeleted(lbc *vpcv1.VpcV1, id string, timeout time.Duration) (int return stateConf.WaitForState() } -func isLBDeleteRefreshFunc(lbc *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isLBDeleteRefreshFunc(lbc *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { log.Printf("[DEBUG] is lb delete function here") getLoadBalancerOptions := &vpcv1.GetLoadBalancerOptions{ @@ -1034,7 +1034,7 @@ func lbExists(d *schema.ResourceData, meta interface{}, id string) (bool, error) func isWaitForLBAvailable(sess *vpcv1.VpcV1, lbId string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for load balancer (%s) to be available.", lbId) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isLBProvisioning, "update_pending"}, Target: []string{isLBProvisioningDone, ""}, Refresh: isLBRefreshFunc(sess, lbId), @@ -1046,7 +1046,7 @@ func isWaitForLBAvailable(sess *vpcv1.VpcV1, lbId string, timeout time.Duration) return stateConf.WaitForState() } -func isLBRefreshFunc(sess *vpcv1.VpcV1, lbId string) resource.StateRefreshFunc { +func isLBRefreshFunc(sess *vpcv1.VpcV1, lbId string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getlboptions := &vpcv1.GetLoadBalancerOptions{ diff --git a/ibm/service/vpc/resource_ibm_is_lb_listener.go b/ibm/service/vpc/resource_ibm_is_lb_listener.go index 889811dacd..50c533a2ff 100644 --- a/ibm/service/vpc/resource_ibm_is_lb_listener.go +++ b/ibm/service/vpc/resource_ibm_is_lb_listener.go @@ -16,7 +16,7 @@ import ( "github.com/IBM/go-sdk-core/v5/core" "github.com/IBM/vpc-go-sdk/vpcv1" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -449,7 +449,7 @@ func lbListenerCreate(d *schema.ResourceData, meta interface{}, lbID, protocol, func isWaitForLBListenerAvailable(sess *vpcv1.VpcV1, lbID, lbListenerID string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for load balancer Listener(%s) to be available.", lbListenerID) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isLBListenerProvisioning, "create_pending", "update_pending", "maintenance_pending"}, Target: []string{isLBListenerProvisioningDone, ""}, Refresh: isLBListenerRefreshFunc(sess, lbID, lbListenerID), @@ -461,7 +461,7 @@ func isWaitForLBListenerAvailable(sess *vpcv1.VpcV1, lbID, lbListenerID string, return stateConf.WaitForState() } -func isLBListenerRefreshFunc(sess *vpcv1.VpcV1, lbID, lbListenerID string) resource.StateRefreshFunc { +func isLBListenerRefreshFunc(sess *vpcv1.VpcV1, lbID, lbListenerID string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getLoadBalancerListenerOptions := &vpcv1.GetLoadBalancerListenerOptions{ @@ -824,7 +824,7 @@ func lbListenerDelete(d *schema.ResourceData, meta interface{}, lbID, lbListener func isWaitForLBListenerDeleted(lbc *vpcv1.VpcV1, lbID, lbListenerID string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for (%s) to be deleted.", lbListenerID) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isLBListenerDeleting, "delete_pending"}, Target: []string{isLBListenerDeleted, ""}, Refresh: isLBListenerDeleteRefreshFunc(lbc, lbID, lbListenerID), @@ -836,7 +836,7 @@ func isWaitForLBListenerDeleted(lbc *vpcv1.VpcV1, lbID, lbListenerID string, tim return stateConf.WaitForState() } -func isLBListenerDeleteRefreshFunc(lbc *vpcv1.VpcV1, lbID, lbListenerID string) resource.StateRefreshFunc { +func isLBListenerDeleteRefreshFunc(lbc *vpcv1.VpcV1, lbID, lbListenerID string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getLoadBalancerListenerOptions := &vpcv1.GetLoadBalancerListenerOptions{ LoadBalancerID: &lbID, diff --git a/ibm/service/vpc/resource_ibm_is_lb_listener_policy.go b/ibm/service/vpc/resource_ibm_is_lb_listener_policy.go index 8e11b8d777..2534649909 100644 --- a/ibm/service/vpc/resource_ibm_is_lb_listener_policy.go +++ b/ibm/service/vpc/resource_ibm_is_lb_listener_policy.go @@ -16,7 +16,7 @@ import ( "github.com/IBM/go-sdk-core/v5/core" "github.com/IBM/vpc-go-sdk/vpcv1" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -598,7 +598,7 @@ func lbListenerPolicyCreate(d *schema.ResourceData, meta interface{}, lbID, list func isWaitForLbAvailable(vpc *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isLBListenerPolicyPending}, Target: []string{isLBProvisioningDone}, Refresh: isLbRefreshFunc(vpc, id), @@ -610,7 +610,7 @@ func isWaitForLbAvailable(vpc *vpcv1.VpcV1, id string, timeout time.Duration) (i return stateConf.WaitForState() } -func isLbRefreshFunc(vpc *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isLbRefreshFunc(vpc *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getLbOptions := &vpcv1.GetLoadBalancerOptions{ @@ -632,7 +632,7 @@ func isLbRefreshFunc(vpc *vpcv1.VpcV1, id string) resource.StateRefreshFunc { func isWaitForLbListenerPolicyAvailable(vpc *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isLBListenerProvisioning, "create_pending", "update_pending", "maintenance_pending"}, Target: []string{isLBListenerProvisioningDone}, Refresh: isLbListenerPolicyRefreshFunc(vpc, id), @@ -644,7 +644,7 @@ func isWaitForLbListenerPolicyAvailable(vpc *vpcv1.VpcV1, id string, timeout tim return stateConf.WaitForState() } -func isLbListenerPolicyRefreshFunc(vpc *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isLbListenerPolicyRefreshFunc(vpc *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { parts, err := flex.IdParts(id) @@ -978,7 +978,7 @@ func lbListenerPolicyDelete(d *schema.ResourceData, meta interface{}, lbID, list } func isWaitForLbListnerPolicyDeleted(vpc *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isLBListenerPolicyRetry, isLBListenerPolicyDeleting}, Target: []string{isLBListenerPolicyFailed, isLBListenerPolicyDeleted}, Refresh: isLbListenerPolicyDeleteRefreshFunc(vpc, id), @@ -990,7 +990,7 @@ func isWaitForLbListnerPolicyDeleted(vpc *vpcv1.VpcV1, id string, timeout time.D return stateConf.WaitForState() } -func isLbListenerPolicyDeleteRefreshFunc(vpc *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isLbListenerPolicyDeleteRefreshFunc(vpc *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { //Retrieve lbId, listenerId and policyID diff --git a/ibm/service/vpc/resource_ibm_is_lb_listener_policy_rule.go b/ibm/service/vpc/resource_ibm_is_lb_listener_policy_rule.go index 195b8bece3..893e9bb42a 100644 --- a/ibm/service/vpc/resource_ibm_is_lb_listener_policy_rule.go +++ b/ibm/service/vpc/resource_ibm_is_lb_listener_policy_rule.go @@ -11,7 +11,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM/vpc-go-sdk/vpcv1" @@ -288,7 +288,7 @@ func lbListenerPolicyRuleCreate(d *schema.ResourceData, meta interface{}, lbID, func isWaitForLoadbalancerAvailable(vpc *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isLBListenerPolicyRulePending}, Target: []string{isLBProvisioningDone}, Refresh: isLoadbalancerRefreshFunc(vpc, id), @@ -300,7 +300,7 @@ func isWaitForLoadbalancerAvailable(vpc *vpcv1.VpcV1, id string, timeout time.Du return stateConf.WaitForState() } -func isLoadbalancerRefreshFunc(vpc *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isLoadbalancerRefreshFunc(vpc *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getLbOptions := &vpcv1.GetLoadBalancerOptions{ @@ -322,7 +322,7 @@ func isLoadbalancerRefreshFunc(vpc *vpcv1.VpcV1, id string) resource.StateRefres func isWaitForLbListenerPolicyRuleAvailable(vpc *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isLBListenerPolicyRuleProvisioning, "create_pending", "update_pending", "maintenance_pending"}, Target: []string{isLBListenerPolicyRuleProvisioningDone}, Refresh: isLbListenerPolicyRuleRefreshFunc(vpc, id), @@ -334,7 +334,7 @@ func isWaitForLbListenerPolicyRuleAvailable(vpc *vpcv1.VpcV1, id string, timeout return stateConf.WaitForState() } -func isLbListenerPolicyRuleRefreshFunc(vpc *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isLbListenerPolicyRuleRefreshFunc(vpc *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { parts, err := flex.IdParts(id) @@ -591,7 +591,7 @@ func lbListenerPolicyRuleDelete(d *schema.ResourceData, meta interface{}, lbID, } func isWaitForLbListnerPolicyRuleDeleted(vpc *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isLBListenerPolicyRuleRetry, isLBListenerPolicyRuleDeleting}, Target: []string{isLBListenerPolicyRuleDeleted, isLBListenerPolicyRuleFailed}, Refresh: isLbListenerPolicyRuleDeleteRefreshFunc(vpc, id), @@ -603,7 +603,7 @@ func isWaitForLbListnerPolicyRuleDeleted(vpc *vpcv1.VpcV1, id string, timeout ti return stateConf.WaitForState() } -func isLbListenerPolicyRuleDeleteRefreshFunc(vpc *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isLbListenerPolicyRuleDeleteRefreshFunc(vpc *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { //Retrieve lbId, listenerId and policyID diff --git a/ibm/service/vpc/resource_ibm_is_lb_listener_policy_rule_test.go b/ibm/service/vpc/resource_ibm_is_lb_listener_policy_rule_test.go index 95eefaa8c8..2d077e0e39 100644 --- a/ibm/service/vpc/resource_ibm_is_lb_listener_policy_rule_test.go +++ b/ibm/service/vpc/resource_ibm_is_lb_listener_policy_rule_test.go @@ -13,9 +13,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISLBListenerPolicyRule_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_lb_listener_policy_test.go b/ibm/service/vpc/resource_ibm_is_lb_listener_policy_test.go index 89823aa520..4082595ddd 100644 --- a/ibm/service/vpc/resource_ibm_is_lb_listener_policy_test.go +++ b/ibm/service/vpc/resource_ibm_is_lb_listener_policy_test.go @@ -13,9 +13,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISLBListenerPolicy_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_lb_listener_test.go b/ibm/service/vpc/resource_ibm_is_lb_listener_test.go index ed74208173..7f28d7f291 100644 --- a/ibm/service/vpc/resource_ibm_is_lb_listener_test.go +++ b/ibm/service/vpc/resource_ibm_is_lb_listener_test.go @@ -13,9 +13,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISLBListener_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_lb_pool.go b/ibm/service/vpc/resource_ibm_is_lb_pool.go index fa219040ae..617cf5717b 100644 --- a/ibm/service/vpc/resource_ibm_is_lb_pool.go +++ b/ibm/service/vpc/resource_ibm_is_lb_pool.go @@ -14,7 +14,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/IBM/vpc-go-sdk/vpcv1" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -684,7 +684,7 @@ func lbPoolExists(d *schema.ResourceData, meta interface{}, lbID, lbPoolID strin func isWaitForLBPoolActive(sess *vpcv1.VpcV1, lbId, lbPoolId string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for load balancer pool (%s) to be available.", lbPoolId) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isLBPoolCreatePending, isLBPoolUpdatePending, isLBPoolMaintainancePending}, Target: []string{isLBPoolActive, ""}, Refresh: isLBPoolRefreshFunc(sess, lbId, lbPoolId), @@ -696,7 +696,7 @@ func isWaitForLBPoolActive(sess *vpcv1.VpcV1, lbId, lbPoolId string, timeout tim return stateConf.WaitForState() } -func isLBPoolRefreshFunc(sess *vpcv1.VpcV1, lbId, lbPoolId string) resource.StateRefreshFunc { +func isLBPoolRefreshFunc(sess *vpcv1.VpcV1, lbId, lbPoolId string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getlbpOptions := &vpcv1.GetLoadBalancerPoolOptions{ @@ -719,7 +719,7 @@ func isLBPoolRefreshFunc(sess *vpcv1.VpcV1, lbId, lbPoolId string) resource.Stat func isWaitForLBPoolDeleted(lbc *vpcv1.VpcV1, lbId, lbPoolId string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for (%s) to be deleted.", lbPoolId) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isLBPoolUpdatePending, isLBPoolMaintainancePending, isLBPoolDeletePending}, Target: []string{isLBPoolDeleteDone, ""}, Refresh: isLBPoolDeleteRefreshFunc(lbc, lbId, lbPoolId), @@ -731,7 +731,7 @@ func isWaitForLBPoolDeleted(lbc *vpcv1.VpcV1, lbId, lbPoolId string, timeout tim return stateConf.WaitForState() } -func isLBPoolDeleteRefreshFunc(lbc *vpcv1.VpcV1, lbId, lbPoolId string) resource.StateRefreshFunc { +func isLBPoolDeleteRefreshFunc(lbc *vpcv1.VpcV1, lbId, lbPoolId string) retry.StateRefreshFunc { return func() (interface{}, string, error) { log.Printf("[DEBUG] is lb pool delete function here") getlbpOptions := &vpcv1.GetLoadBalancerPoolOptions{ diff --git a/ibm/service/vpc/resource_ibm_is_lb_pool_member.go b/ibm/service/vpc/resource_ibm_is_lb_pool_member.go index cde8f6c29b..43f23c3a22 100644 --- a/ibm/service/vpc/resource_ibm_is_lb_pool_member.go +++ b/ibm/service/vpc/resource_ibm_is_lb_pool_member.go @@ -13,7 +13,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -247,7 +247,7 @@ func lbpMemberCreate(d *schema.ResourceData, meta interface{}, lbID, lbPoolID st func isWaitForLBPoolMemberAvailable(lbc *vpcv1.VpcV1, lbID, lbPoolID, lbPoolMemID string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for load balancer pool member(%s) to be available.", lbPoolMemID) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"create_pending", "update_pending", "maintenance_pending"}, Target: []string{isLBPoolMemberActive, ""}, Refresh: isLBPoolMemberRefreshFunc(lbc, lbID, lbPoolID, lbPoolMemID), @@ -259,7 +259,7 @@ func isWaitForLBPoolMemberAvailable(lbc *vpcv1.VpcV1, lbID, lbPoolID, lbPoolMemI return stateConf.WaitForState() } -func isLBPoolMemberRefreshFunc(lbc *vpcv1.VpcV1, lbID, lbPoolID, lbPoolMemID string) resource.StateRefreshFunc { +func isLBPoolMemberRefreshFunc(lbc *vpcv1.VpcV1, lbID, lbPoolID, lbPoolMemID string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getlbpmoptions := &vpcv1.GetLoadBalancerPoolMemberOptions{ @@ -545,7 +545,7 @@ func lbpmemberDelete(d *schema.ResourceData, meta interface{}, lbID, lbPoolID, l func isWaitForLBPoolMemberDeleted(lbc *vpcv1.VpcV1, lbID, lbPoolID, lbPoolMemID string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for (%s) to be deleted.", lbPoolMemID) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isLBPoolMemberDeletePending}, Target: []string{isLBPoolMemberDeleted, ""}, Refresh: isDeleteLBPoolMemberRefreshFunc(lbc, lbID, lbPoolID, lbPoolMemID), @@ -557,7 +557,7 @@ func isWaitForLBPoolMemberDeleted(lbc *vpcv1.VpcV1, lbID, lbPoolID, lbPoolMemID return stateConf.WaitForState() } -func isDeleteLBPoolMemberRefreshFunc(lbc *vpcv1.VpcV1, lbID, lbPoolID, lbPoolMemID string) resource.StateRefreshFunc { +func isDeleteLBPoolMemberRefreshFunc(lbc *vpcv1.VpcV1, lbID, lbPoolID, lbPoolMemID string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getlbpmoptions := &vpcv1.GetLoadBalancerPoolMemberOptions{ diff --git a/ibm/service/vpc/resource_ibm_is_lb_pool_member_test.go b/ibm/service/vpc/resource_ibm_is_lb_pool_member_test.go index 580062130e..488c9513a8 100644 --- a/ibm/service/vpc/resource_ibm_is_lb_pool_member_test.go +++ b/ibm/service/vpc/resource_ibm_is_lb_pool_member_test.go @@ -14,9 +14,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISLBPoolMember_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_lb_pool_test.go b/ibm/service/vpc/resource_ibm_is_lb_pool_test.go index 952ba9ec3b..c73bc50b05 100644 --- a/ibm/service/vpc/resource_ibm_is_lb_pool_test.go +++ b/ibm/service/vpc/resource_ibm_is_lb_pool_test.go @@ -13,9 +13,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISLBPool_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_lb_test.go b/ibm/service/vpc/resource_ibm_is_lb_test.go index ea0a40aca6..4bffbb1f47 100644 --- a/ibm/service/vpc/resource_ibm_is_lb_test.go +++ b/ibm/service/vpc/resource_ibm_is_lb_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func testAccCheckIBMISLBUdpConfig(vpcname, subnetname, zone, cidr, name string) string { diff --git a/ibm/service/vpc/resource_ibm_is_network_acl_rule_test.go b/ibm/service/vpc/resource_ibm_is_network_acl_rule_test.go index 9c6fd6a00e..4202c1f912 100644 --- a/ibm/service/vpc/resource_ibm_is_network_acl_rule_test.go +++ b/ibm/service/vpc/resource_ibm_is_network_acl_rule_test.go @@ -14,9 +14,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestNetworkACLRule_basicICMP(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_networkacls_test.go b/ibm/service/vpc/resource_ibm_is_networkacls_test.go index aeed55e672..e14c054304 100644 --- a/ibm/service/vpc/resource_ibm_is_networkacls_test.go +++ b/ibm/service/vpc/resource_ibm_is_networkacls_test.go @@ -12,8 +12,8 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestNetworkACLGen1(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_placement_group.go b/ibm/service/vpc/resource_ibm_is_placement_group.go index 443f65edb4..2aa578fe8b 100644 --- a/ibm/service/vpc/resource_ibm_is_placement_group.go +++ b/ibm/service/vpc/resource_ibm_is_placement_group.go @@ -14,7 +14,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM/vpc-go-sdk/vpcv1" @@ -361,7 +361,7 @@ func resourceIbmIsPlacementGroupDelete(context context.Context, d *schema.Resour func isWaitForPlacementGroupDelete(vpcClient *vpcv1.VpcV1, d *schema.ResourceData, id string) (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isPlacementGroupDeleting, isPlacementGroupStable, isPlacementGroupPending, isPlacementGroupWaiting, isPlacementGroupUpdating}, Target: []string{isPlacementGroupDeleteDone, ""}, Refresh: func() (interface{}, string, error) { @@ -393,7 +393,7 @@ func isWaitForPlacementGroupDelete(vpcClient *vpcv1.VpcV1, d *schema.ResourceDat func isWaitForPlacementGroupDeleteRetry(vpcClient *vpcv1.VpcV1, d *schema.ResourceData, id string) (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isPlacementGroupResourcesAttached}, Target: []string{isPlacementGroupDeleting, isPlacementGroupDeleteDone, ""}, Refresh: func() (interface{}, string, error) { @@ -423,7 +423,7 @@ func isWaitForPlacementGroupDeleteRetry(vpcClient *vpcv1.VpcV1, d *schema.Resour func isWaitForPlacementGroupAvailable(vpcClient *vpcv1.VpcV1, id string, timeout time.Duration, d *schema.ResourceData) (interface{}, error) { log.Printf("Waiting for placement group (%s) to be available.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isPlacementGroupPending, isPlacementGroupWaiting, isPlacementGroupUpdating}, Target: []string{isPlacementGroupFailed, isPlacementGroupStable, isPlacementGroupSuspended, ""}, Refresh: isPlacementGroupRefreshFunc(vpcClient, id, d), @@ -435,7 +435,7 @@ func isWaitForPlacementGroupAvailable(vpcClient *vpcv1.VpcV1, id string, timeout return stateConf.WaitForState() } -func isPlacementGroupRefreshFunc(vpcClient *vpcv1.VpcV1, id string, d *schema.ResourceData) resource.StateRefreshFunc { +func isPlacementGroupRefreshFunc(vpcClient *vpcv1.VpcV1, id string, d *schema.ResourceData) retry.StateRefreshFunc { return func() (interface{}, string, error) { getinsOptions := &vpcv1.GetPlacementGroupOptions{ ID: &id, diff --git a/ibm/service/vpc/resource_ibm_is_placement_group_test.go b/ibm/service/vpc/resource_ibm_is_placement_group_test.go index f143e59e48..3f0504cf3d 100644 --- a/ibm/service/vpc/resource_ibm_is_placement_group_test.go +++ b/ibm/service/vpc/resource_ibm_is_placement_group_test.go @@ -10,9 +10,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/vpc-go-sdk/vpcv1" ) diff --git a/ibm/service/vpc/resource_ibm_is_private_path_service_gateway.go b/ibm/service/vpc/resource_ibm_is_private_path_service_gateway.go index 8bc0dcc300..7df41327d6 100644 --- a/ibm/service/vpc/resource_ibm_is_private_path_service_gateway.go +++ b/ibm/service/vpc/resource_ibm_is_private_path_service_gateway.go @@ -10,7 +10,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -410,7 +410,7 @@ func resourceIBMIsPrivatePathServiceGatewayDelete(context context.Context, d *sc func isWaitForPPSGDeleteRetry(vpcClient *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("[DEBUG] Retrying PPSG (%s) delete", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"ppsg_in_use"}, Target: []string{"deleting", "done", ""}, Refresh: func() (interface{}, string, error) { @@ -437,7 +437,7 @@ func isWaitForPPSGDeleteRetry(vpcClient *vpcv1.VpcV1, id string, timeout time.Du func isWaitForPPSGDeleted(vpcClient *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for ppsg (%s) to be deleted.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", "deleting", "stable"}, Target: []string{"deleted", ""}, Refresh: isPPSGDeleteRefreshFunc(vpcClient, id), @@ -449,7 +449,7 @@ func isWaitForPPSGDeleted(vpcClient *vpcv1.VpcV1, id string, timeout time.Durati return stateConf.WaitForState() } -func isPPSGDeleteRefreshFunc(vpcClient *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isPPSGDeleteRefreshFunc(vpcClient *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { log.Printf("[DEBUG] is ppsg delete function here") getPPSGOptions := &vpcv1.GetPrivatePathServiceGatewayOptions{ @@ -468,7 +468,7 @@ func isPPSGDeleteRefreshFunc(vpcClient *vpcv1.VpcV1, id string) resource.StateRe func isWaitForPPSGAvailable(vpcClient *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for ppsg (%s) to be available.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pending", "updating"}, Target: []string{"stable", "failed", "suspended"}, Refresh: isPPSGRefreshFunc(vpcClient, id), @@ -480,7 +480,7 @@ func isWaitForPPSGAvailable(vpcClient *vpcv1.VpcV1, id string, timeout time.Dura return stateConf.WaitForState() } -func isPPSGRefreshFunc(vpcClient *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isPPSGRefreshFunc(vpcClient *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getPPSGOptions := &vpcv1.GetPrivatePathServiceGatewayOptions{ ID: &id, diff --git a/ibm/service/vpc/resource_ibm_is_private_path_service_gateway_account_policy_test.go b/ibm/service/vpc/resource_ibm_is_private_path_service_gateway_account_policy_test.go index a5c018fc6d..4442fbc2a6 100644 --- a/ibm/service/vpc/resource_ibm_is_private_path_service_gateway_account_policy_test.go +++ b/ibm/service/vpc/resource_ibm_is_private_path_service_gateway_account_policy_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/vpc/resource_ibm_is_private_path_service_gateway_test.go b/ibm/service/vpc/resource_ibm_is_private_path_service_gateway_test.go index 24a6e7f2e6..da9e9145e8 100644 --- a/ibm/service/vpc/resource_ibm_is_private_path_service_gateway_test.go +++ b/ibm/service/vpc/resource_ibm_is_private_path_service_gateway_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/vpc/resource_ibm_is_public_gateway.go b/ibm/service/vpc/resource_ibm_is_public_gateway.go index 32204498b6..8a2e9bf2d7 100644 --- a/ibm/service/vpc/resource_ibm_is_public_gateway.go +++ b/ibm/service/vpc/resource_ibm_is_public_gateway.go @@ -15,7 +15,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/IBM/vpc-go-sdk/vpcv1" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -278,7 +278,7 @@ func resourceIBMISPublicGatewayCreate(d *schema.ResourceData, meta interface{}) func isWaitForPublicGatewayAvailable(publicgwC *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for public gateway (%s) to be available.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isPublicGatewayProvisioning}, Target: []string{isPublicGatewayProvisioningDone, ""}, Refresh: isPublicGatewayRefreshFunc(publicgwC, id), @@ -290,7 +290,7 @@ func isWaitForPublicGatewayAvailable(publicgwC *vpcv1.VpcV1, id string, timeout return stateConf.WaitForState() } -func isPublicGatewayRefreshFunc(publicgwC *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isPublicGatewayRefreshFunc(publicgwC *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getPublicGatewayOptions := &vpcv1.GetPublicGatewayOptions{ ID: &id, @@ -496,7 +496,7 @@ func resourceIBMISPublicGatewayDelete(d *schema.ResourceData, meta interface{}) func isWaitForPublicGatewayDeleted(pg *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for public gateway (%s) to be deleted.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isPublicGatewayDeleting}, Target: []string{isPublicGatewayDeleted, ""}, Refresh: isPublicGatewayDeleteRefreshFunc(pg, id), @@ -508,7 +508,7 @@ func isWaitForPublicGatewayDeleted(pg *vpcv1.VpcV1, id string, timeout time.Dura return stateConf.WaitForState() } -func isPublicGatewayDeleteRefreshFunc(pg *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isPublicGatewayDeleteRefreshFunc(pg *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { log.Printf("[DEBUG] is pubic gateway delete function here") getPublicGatewayOptions := &vpcv1.GetPublicGatewayOptions{ @@ -547,7 +547,7 @@ func resourceIBMISPublicGatewayExists(d *schema.ResourceData, meta interface{}) func isWaitForSubnetPublicGatewayUnset(subnetC *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for public gateway (%s) to be unset.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", "wait"}, Target: []string{"done", ""}, Refresh: isSubnetPublicGatewayUnsetRefreshFunc(subnetC, id), @@ -559,7 +559,7 @@ func isWaitForSubnetPublicGatewayUnset(subnetC *vpcv1.VpcV1, id string, timeout return stateConf.WaitForState() } -func isSubnetPublicGatewayUnsetRefreshFunc(subnetC *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isSubnetPublicGatewayUnsetRefreshFunc(subnetC *vpcv1.VpcV1, id string) retry.StateRefreshFunc { log.Printf("Waiting for public gateway (%s) to be unset.", id) return func() (interface{}, string, error) { getSubnetPublicGatewayOptions := &vpcv1.GetSubnetPublicGatewayOptions{ diff --git a/ibm/service/vpc/resource_ibm_is_public_gateway_test.go b/ibm/service/vpc/resource_ibm_is_public_gateway_test.go index 5645f02e31..ccff59d222 100644 --- a/ibm/service/vpc/resource_ibm_is_public_gateway_test.go +++ b/ibm/service/vpc/resource_ibm_is_public_gateway_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISPublicGateway_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_reservation_activate_test.go b/ibm/service/vpc/resource_ibm_is_reservation_activate_test.go index eef1f6127c..18955d87b9 100644 --- a/ibm/service/vpc/resource_ibm_is_reservation_activate_test.go +++ b/ibm/service/vpc/resource_ibm_is_reservation_activate_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISReservationActivate_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_reservation_test.go b/ibm/service/vpc/resource_ibm_is_reservation_test.go index 28a53efddb..eeaeeec213 100644 --- a/ibm/service/vpc/resource_ibm_is_reservation_test.go +++ b/ibm/service/vpc/resource_ibm_is_reservation_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISReservation_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_security_group.go b/ibm/service/vpc/resource_ibm_is_security_group.go index 598837069b..555d426d73 100644 --- a/ibm/service/vpc/resource_ibm_is_security_group.go +++ b/ibm/service/vpc/resource_ibm_is_security_group.go @@ -15,7 +15,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/IBM/vpc-go-sdk/vpcv1" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -614,7 +614,7 @@ func makeIBMISSecurityRuleSchema() map[string]*schema.Schema { func isWaitForTargetDeleted(client *vpcv1.VpcV1, sgId, targetId string, target vpcv1.SecurityGroupTargetReferenceIntf, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for Security group(%s) target(%s) to be deleted.", sgId, targetId) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"deleting"}, Target: []string{"done", ""}, Refresh: isTargetRefreshFunc(client, sgId, targetId, target), @@ -626,7 +626,7 @@ func isWaitForTargetDeleted(client *vpcv1.VpcV1, sgId, targetId string, target v return stateConf.WaitForState() } -func isTargetRefreshFunc(client *vpcv1.VpcV1, sgId, targetId string, target vpcv1.SecurityGroupTargetReferenceIntf) resource.StateRefreshFunc { +func isTargetRefreshFunc(client *vpcv1.VpcV1, sgId, targetId string, target vpcv1.SecurityGroupTargetReferenceIntf) retry.StateRefreshFunc { return func() (interface{}, string, error) { targetgetoptions := &vpcv1.GetSecurityGroupTargetOptions{ SecurityGroupID: &sgId, @@ -645,7 +645,7 @@ func isTargetRefreshFunc(client *vpcv1.VpcV1, sgId, targetId string, target vpcv func isWaitForSgCleanup(client *vpcv1.VpcV1, sgId string, targets []vpcv1.SecurityGroupTargetReferenceIntf, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for Security group(%s) target(%s) to be deleted.", sgId, targets) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"deleting"}, Target: []string{"done", ""}, Refresh: isSgRefreshFunc(client, sgId, targets), @@ -657,7 +657,7 @@ func isWaitForSgCleanup(client *vpcv1.VpcV1, sgId string, targets []vpcv1.Securi return stateConf.WaitForState() } -func isSgRefreshFunc(client *vpcv1.VpcV1, sgId string, groups []vpcv1.SecurityGroupTargetReferenceIntf) resource.StateRefreshFunc { +func isSgRefreshFunc(client *vpcv1.VpcV1, sgId string, groups []vpcv1.SecurityGroupTargetReferenceIntf) retry.StateRefreshFunc { return func() (interface{}, string, error) { start := "" allrecs := []vpcv1.SecurityGroupTargetReferenceIntf{} diff --git a/ibm/service/vpc/resource_ibm_is_security_group_rule_test.go b/ibm/service/vpc/resource_ibm_is_security_group_rule_test.go index abc0ba51a7..ed3cc2f5c4 100644 --- a/ibm/service/vpc/resource_ibm_is_security_group_rule_test.go +++ b/ibm/service/vpc/resource_ibm_is_security_group_rule_test.go @@ -14,9 +14,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISSecurityGroupRule_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_security_group_target.go b/ibm/service/vpc/resource_ibm_is_security_group_target.go index 43f6a5754c..d99ed62a66 100644 --- a/ibm/service/vpc/resource_ibm_is_security_group_target.go +++ b/ibm/service/vpc/resource_ibm_is_security_group_target.go @@ -13,7 +13,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -259,7 +259,7 @@ func resourceIBMISSecurityGroupTargetExists(d *schema.ResourceData, meta interfa func isWaitForLBRemoveAvailable(sess *vpcv1.VpcV1, sgt vpcv1.SecurityGroupTargetReferenceIntf, lbId, securityGroupID, securityGroupTargetID string, timeout time.Duration) (interface{}, error) { log.Printf("[INFO] Waiting for load balancer binding (%s) to be removed.", lbId) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isLBProvisioning}, Target: []string{isLBProvisioningDone}, Refresh: isLBRemoveRefreshFunc(sess, sgt, lbId, securityGroupID, securityGroupTargetID), @@ -272,7 +272,7 @@ func isWaitForLBRemoveAvailable(sess *vpcv1.VpcV1, sgt vpcv1.SecurityGroupTarget return stateConf.WaitForState() } -func isLBRemoveRefreshFunc(sess *vpcv1.VpcV1, sgt vpcv1.SecurityGroupTargetReferenceIntf, lbId, securityGroupID, securityGroupTargetID string) resource.StateRefreshFunc { +func isLBRemoveRefreshFunc(sess *vpcv1.VpcV1, sgt vpcv1.SecurityGroupTargetReferenceIntf, lbId, securityGroupID, securityGroupTargetID string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getSecurityGroupTargetOptions := &vpcv1.GetSecurityGroupTargetOptions{ @@ -306,7 +306,7 @@ func isLBRemoveRefreshFunc(sess *vpcv1.VpcV1, sgt vpcv1.SecurityGroupTargetRefer func isWaitForLbSgTargetCreateAvailable(sess *vpcv1.VpcV1, lbId string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for load balancer (%s) to be available.", lbId) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isLBProvisioning, "update_pending"}, Target: []string{isLBProvisioningDone, ""}, Refresh: isLBSgTargetRefreshFunc(sess, lbId), @@ -318,7 +318,7 @@ func isWaitForLbSgTargetCreateAvailable(sess *vpcv1.VpcV1, lbId string, timeout return stateConf.WaitForState() } -func isLBSgTargetRefreshFunc(sess *vpcv1.VpcV1, lbId string) resource.StateRefreshFunc { +func isLBSgTargetRefreshFunc(sess *vpcv1.VpcV1, lbId string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getlboptions := &vpcv1.GetLoadBalancerOptions{ @@ -340,7 +340,7 @@ func isLBSgTargetRefreshFunc(sess *vpcv1.VpcV1, lbId string) resource.StateRefre func isWaitForVNISgTargetCreateAvailable(sess *vpcv1.VpcV1, vniId string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for virtual network interface (%s) to be available.", vniId) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pending", "updating", "waiting"}, Target: []string{isLBProvisioningDone, ""}, Refresh: isVNISgTargetRefreshFunc(sess, vniId), @@ -352,7 +352,7 @@ func isWaitForVNISgTargetCreateAvailable(sess *vpcv1.VpcV1, vniId string, timeou return stateConf.WaitForState() } -func isVNISgTargetRefreshFunc(vpcClient *vpcv1.VpcV1, vniId string) resource.StateRefreshFunc { +func isVNISgTargetRefreshFunc(vpcClient *vpcv1.VpcV1, vniId string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getVNIOptions := &vpcv1.GetVirtualNetworkInterfaceOptions{ diff --git a/ibm/service/vpc/resource_ibm_is_security_group_target_test.go b/ibm/service/vpc/resource_ibm_is_security_group_target_test.go index 8d71e8b5dd..6744e7be39 100644 --- a/ibm/service/vpc/resource_ibm_is_security_group_target_test.go +++ b/ibm/service/vpc/resource_ibm_is_security_group_target_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISSecurityGroupTarget_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_security_group_test.go b/ibm/service/vpc/resource_ibm_is_security_group_test.go index 45eac4976a..b42dcb6990 100644 --- a/ibm/service/vpc/resource_ibm_is_security_group_test.go +++ b/ibm/service/vpc/resource_ibm_is_security_group_test.go @@ -13,9 +13,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISSecurityGroup_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_share.go b/ibm/service/vpc/resource_ibm_is_share.go index 219185463c..c4892bb134 100644 --- a/ibm/service/vpc/resource_ibm_is_share.go +++ b/ibm/service/vpc/resource_ibm_is_share.go @@ -16,7 +16,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM/go-sdk-core/v5/core" @@ -1664,7 +1664,7 @@ func resourceIbmIsShareDelete(context context.Context, d *schema.ResourceData, m func isWaitForShareAvailable(context context.Context, vpcClient *vpcv1.VpcV1, shareid string, d *schema.ResourceData, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for share (%s) to be available.", shareid) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"updating", "pending", "waiting"}, Target: []string{"stable", "failed"}, Refresh: isShareRefreshFunc(context, vpcClient, shareid, d), @@ -1676,7 +1676,7 @@ func isWaitForShareAvailable(context context.Context, vpcClient *vpcv1.VpcV1, sh return stateConf.WaitForState() } -func isShareRefreshFunc(context context.Context, vpcClient *vpcv1.VpcV1, shareid string, d *schema.ResourceData) resource.StateRefreshFunc { +func isShareRefreshFunc(context context.Context, vpcClient *vpcv1.VpcV1, shareid string, d *schema.ResourceData) retry.StateRefreshFunc { return func() (interface{}, string, error) { shareOptions := &vpcv1.GetShareOptions{} @@ -1698,7 +1698,7 @@ func isShareRefreshFunc(context context.Context, vpcClient *vpcv1.VpcV1, shareid func isWaitForShareDelete(context context.Context, vpcClient *vpcv1.VpcV1, d *schema.ResourceData, shareid string) (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"deleting", "stable", "waiting"}, Target: []string{"done"}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/vpc/resource_ibm_is_share_delete_accessor_binding.go b/ibm/service/vpc/resource_ibm_is_share_delete_accessor_binding.go index e334e57f80..ea866e1d66 100644 --- a/ibm/service/vpc/resource_ibm_is_share_delete_accessor_binding.go +++ b/ibm/service/vpc/resource_ibm_is_share_delete_accessor_binding.go @@ -12,7 +12,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM/vpc-go-sdk/vpcv1" @@ -73,7 +73,7 @@ func resourceIbmIsShareDeleteAccessorBindingCreate(context context.Context, d *s func isWaitForShareAccessorBindingDeleted(context context.Context, vpcClient *vpcv1.VpcV1, shareid, bindingId string, d *schema.ResourceData, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for share accessor binding (%s) to be deleted.", shareid) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pending", "deleting"}, Target: []string{"done"}, Refresh: isShareAccessorBindingRefreshFunc(context, vpcClient, shareid, bindingId, d), @@ -85,7 +85,7 @@ func isWaitForShareAccessorBindingDeleted(context context.Context, vpcClient *vp return stateConf.WaitForState() } -func isShareAccessorBindingRefreshFunc(context context.Context, vpcClient *vpcv1.VpcV1, shareid string, bindingId string, d *schema.ResourceData) resource.StateRefreshFunc { +func isShareAccessorBindingRefreshFunc(context context.Context, vpcClient *vpcv1.VpcV1, shareid string, bindingId string, d *schema.ResourceData) retry.StateRefreshFunc { return func() (interface{}, string, error) { bindingOptions := &vpcv1.GetShareAccessorBindingOptions{ ShareID: &shareid, diff --git a/ibm/service/vpc/resource_ibm_is_share_delete_accessor_binding_test.go b/ibm/service/vpc/resource_ibm_is_share_delete_accessor_binding_test.go index cc581c92df..94f9d716db 100644 --- a/ibm/service/vpc/resource_ibm_is_share_delete_accessor_binding_test.go +++ b/ibm/service/vpc/resource_ibm_is_share_delete_accessor_binding_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmIsShareDeleteAccessorBinding(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_share_mount_target.go b/ibm/service/vpc/resource_ibm_is_share_mount_target.go index ee7397f0e8..feaeb6ba9b 100644 --- a/ibm/service/vpc/resource_ibm_is_share_mount_target.go +++ b/ibm/service/vpc/resource_ibm_is_share_mount_target.go @@ -13,7 +13,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM/go-sdk-core/v5/core" @@ -650,7 +650,7 @@ func resourceIBMIsShareMountTargetDelete(context context.Context, d *schema.Reso func WaitForMountTargetAvailable(context context.Context, vpcClient *vpcv1.VpcV1, shareid, targetid string, d *schema.ResourceData, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for target (%s) to be available.", targetid) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"updating", "pending", "waiting"}, Target: []string{"stable", "failed"}, Refresh: mountTargetRefresh(context, vpcClient, shareid, targetid, d), @@ -662,7 +662,7 @@ func WaitForMountTargetAvailable(context context.Context, vpcClient *vpcv1.VpcV1 return stateConf.WaitForState() } -func mountTargetRefresh(context context.Context, vpcClient *vpcv1.VpcV1, shareid, targetid string, d *schema.ResourceData) resource.StateRefreshFunc { +func mountTargetRefresh(context context.Context, vpcClient *vpcv1.VpcV1, shareid, targetid string, d *schema.ResourceData) retry.StateRefreshFunc { return func() (interface{}, string, error) { shareTargetOptions := &vpcv1.GetShareMountTargetOptions{} @@ -685,7 +685,7 @@ func mountTargetRefresh(context context.Context, vpcClient *vpcv1.VpcV1, shareid func isWaitForMountTargetDelete(context context.Context, vpcClient *vpcv1.VpcV1, d *schema.ResourceData, shareid, targetid string) (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"deleting", "stable"}, Target: []string{"done"}, Refresh: func() (interface{}, string, error) { @@ -878,7 +878,7 @@ func ShareMountTargetMapToShareMountTargetPrototype(d *schema.ResourceData, vniM func isWaitForTargetDelete(context context.Context, vpcClient *vpcv1.VpcV1, d *schema.ResourceData, shareid, targetid string) (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"deleting", "stable"}, Target: []string{"done"}, Refresh: func() (interface{}, string, error) { @@ -910,7 +910,7 @@ func isWaitForTargetDelete(context context.Context, vpcClient *vpcv1.VpcV1, d *s func WaitForVNIAvailable(vpcClient *vpcv1.VpcV1, vniId string, d *schema.ResourceData, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for VNI (%s) to be available.", vniId) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"updating", "pending", "waiting"}, Target: []string{"stable", "failed"}, Refresh: VNIRefreshFunc(vpcClient, vniId, d), @@ -922,7 +922,7 @@ func WaitForVNIAvailable(vpcClient *vpcv1.VpcV1, vniId string, d *schema.Resourc return stateConf.WaitForState() } -func VNIRefreshFunc(vpcClient *vpcv1.VpcV1, vniId string, d *schema.ResourceData) resource.StateRefreshFunc { +func VNIRefreshFunc(vpcClient *vpcv1.VpcV1, vniId string, d *schema.ResourceData) retry.StateRefreshFunc { return func() (interface{}, string, error) { getVNIOptions := &vpcv1.GetVirtualNetworkInterfaceOptions{ ID: &vniId, @@ -942,7 +942,7 @@ func VNIRefreshFunc(vpcClient *vpcv1.VpcV1, vniId string, d *schema.ResourceData func WaitForTargetAvailable(context context.Context, vpcClient *vpcv1.VpcV1, shareid, targetid string, d *schema.ResourceData, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for target (%s) to be available.", targetid) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"updating", "pending", "waiting"}, Target: []string{"stable", "failed"}, Refresh: mountTargetRefreshFunc(context, vpcClient, shareid, targetid, d), @@ -954,7 +954,7 @@ func WaitForTargetAvailable(context context.Context, vpcClient *vpcv1.VpcV1, sha return stateConf.WaitForState() } -func mountTargetRefreshFunc(context context.Context, vpcClient *vpcv1.VpcV1, shareid, targetid string, d *schema.ResourceData) resource.StateRefreshFunc { +func mountTargetRefreshFunc(context context.Context, vpcClient *vpcv1.VpcV1, shareid, targetid string, d *schema.ResourceData) retry.StateRefreshFunc { return func() (interface{}, string, error) { shareTargetOptions := &vpcv1.GetShareMountTargetOptions{} diff --git a/ibm/service/vpc/resource_ibm_is_share_mount_target_test.go b/ibm/service/vpc/resource_ibm_is_share_mount_target_test.go index 833b0a2756..b6be84de2f 100644 --- a/ibm/service/vpc/resource_ibm_is_share_mount_target_test.go +++ b/ibm/service/vpc/resource_ibm_is_share_mount_target_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIbmIsShareMountTarget(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_share_replica_operations.go b/ibm/service/vpc/resource_ibm_is_share_replica_operations.go index e3a1d58273..8c78f981d3 100644 --- a/ibm/service/vpc/resource_ibm_is_share_replica_operations.go +++ b/ibm/service/vpc/resource_ibm_is_share_replica_operations.go @@ -12,7 +12,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM/go-sdk-core/v5/core" @@ -134,7 +134,7 @@ func resourceIbmIsShareReplicaOperationsCreate(context context.Context, d *schem func isWaitForShareReplicationJobDone(context context.Context, vpcClient *vpcv1.VpcV1, shareid string, d *schema.ResourceData, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for share (%s) to be available.", shareid) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pending"}, Target: []string{"active", "none"}, Refresh: isShareReplicationJobRefreshFunc(context, vpcClient, shareid, d), @@ -146,7 +146,7 @@ func isWaitForShareReplicationJobDone(context context.Context, vpcClient *vpcv1. return stateConf.WaitForState() } -func isShareReplicationJobRefreshFunc(context context.Context, vpcClient *vpcv1.VpcV1, shareid string, d *schema.ResourceData) resource.StateRefreshFunc { +func isShareReplicationJobRefreshFunc(context context.Context, vpcClient *vpcv1.VpcV1, shareid string, d *schema.ResourceData) retry.StateRefreshFunc { return func() (interface{}, string, error) { shareOptions := &vpcv1.GetShareOptions{} @@ -182,7 +182,7 @@ func resourceIbmIsShareReplicaOperationsDelete(context context.Context, d *schem func isWaitForShareSplit(context context.Context, vpcClient *vpcv1.VpcV1, shareid string, d *schema.ResourceData, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for share (%s) to be available.", shareid) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"split_pending"}, Target: []string{"none"}, Refresh: isShareSplitRefreshFunc(context, vpcClient, shareid, d), @@ -194,7 +194,7 @@ func isWaitForShareSplit(context context.Context, vpcClient *vpcv1.VpcV1, sharei return stateConf.WaitForState() } -func isShareSplitRefreshFunc(context context.Context, vpcClient *vpcv1.VpcV1, shareid string, d *schema.ResourceData) resource.StateRefreshFunc { +func isShareSplitRefreshFunc(context context.Context, vpcClient *vpcv1.VpcV1, shareid string, d *schema.ResourceData) retry.StateRefreshFunc { return func() (interface{}, string, error) { shareOptions := &vpcv1.GetShareOptions{} diff --git a/ibm/service/vpc/resource_ibm_is_share_replica_operations_test.go b/ibm/service/vpc/resource_ibm_is_share_replica_operations_test.go index af53413d2c..2ce393fabe 100644 --- a/ibm/service/vpc/resource_ibm_is_share_replica_operations_test.go +++ b/ibm/service/vpc/resource_ibm_is_share_replica_operations_test.go @@ -9,8 +9,8 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccIbmIsShareReplicaOperationsFailover(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_share_test.go b/ibm/service/vpc/resource_ibm_is_share_test.go index e3f0b678cf..0998e77821 100644 --- a/ibm/service/vpc/resource_ibm_is_share_test.go +++ b/ibm/service/vpc/resource_ibm_is_share_test.go @@ -11,9 +11,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIbmIsShareBasic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_snapshot.go b/ibm/service/vpc/resource_ibm_is_snapshot.go index 016e1077aa..52052999e7 100644 --- a/ibm/service/vpc/resource_ibm_is_snapshot.go +++ b/ibm/service/vpc/resource_ibm_is_snapshot.go @@ -15,7 +15,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/IBM/vpc-go-sdk/vpcv1" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -644,7 +644,7 @@ func resourceIBMISSnapshotCreate(d *schema.ResourceData, meta interface{}) error func isWaitForSnapshotAvailable(sess *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for Snapshot (%s) to be available.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isSnapshotPending}, Target: []string{isSnapshotAvailable, isSnapshotFailed}, Refresh: isSnapshotRefreshFunc(sess, id), @@ -656,7 +656,7 @@ func isWaitForSnapshotAvailable(sess *vpcv1.VpcV1, id string, timeout time.Durat return stateConf.WaitForState() } -func isSnapshotRefreshFunc(sess *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isSnapshotRefreshFunc(sess *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getSnapshotOptions := &vpcv1.GetSnapshotOptions{ ID: &id, @@ -1004,7 +1004,7 @@ func snapshotUpdate(d *schema.ResourceData, meta interface{}, id, name string, h func isWaitForSnapshotUpdate(sess *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for Snapshot (%s) to be available.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isSnapshotUpdating}, Target: []string{isSnapshotAvailable, isSnapshotFailed}, Refresh: isSnapshotUpdateRefreshFunc(sess, id), @@ -1015,7 +1015,7 @@ func isWaitForSnapshotUpdate(sess *vpcv1.VpcV1, id string, timeout time.Duration return stateConf.WaitForState() } -func isSnapshotUpdateRefreshFunc(sess *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isSnapshotUpdateRefreshFunc(sess *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getSnapshotOptions := &vpcv1.GetSnapshotOptions{ ID: &id, @@ -1037,7 +1037,7 @@ func isSnapshotUpdateRefreshFunc(sess *vpcv1.VpcV1, id string) resource.StateRef func isWaitForCloneAvailable(sess *vpcv1.VpcV1, d *schema.ResourceData, id, zoneName string) (interface{}, error) { log.Printf("Waiting for Snapshot (%s) clone (%s) to be available.", id, zoneName) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"false"}, Target: []string{"true", "deleted"}, Refresh: isSnapshotCloneRefreshFunc(sess, id, zoneName), @@ -1048,7 +1048,7 @@ func isWaitForCloneAvailable(sess *vpcv1.VpcV1, d *schema.ResourceData, id, zone return stateConf.WaitForState() } -func isSnapshotCloneRefreshFunc(sess *vpcv1.VpcV1, id, zoneName string) resource.StateRefreshFunc { +func isSnapshotCloneRefreshFunc(sess *vpcv1.VpcV1, id, zoneName string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getSnapshotCloneOptions := &vpcv1.GetSnapshotCloneOptions{ ID: &id, @@ -1070,7 +1070,7 @@ func isSnapshotCloneRefreshFunc(sess *vpcv1.VpcV1, id, zoneName string) resource } } -func isSnapshotCloneDeleteRefreshFunc(sess *vpcv1.VpcV1, id, zoneName string) resource.StateRefreshFunc { +func isSnapshotCloneDeleteRefreshFunc(sess *vpcv1.VpcV1, id, zoneName string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getSnapshotCloneOptions := &vpcv1.GetSnapshotCloneOptions{ ID: &id, @@ -1091,7 +1091,7 @@ func isSnapshotCloneDeleteRefreshFunc(sess *vpcv1.VpcV1, id, zoneName string) re func isWaitForCloneDeleted(sess *vpcv1.VpcV1, d *schema.ResourceData, id, zoneName string) (interface{}, error) { log.Printf("Waiting for Snapshot (%s) clone (%s) to be deleted.", id, zoneName) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"true"}, Target: []string{"false", "deleted"}, Refresh: isSnapshotCloneDeleteRefreshFunc(sess, id, zoneName), @@ -1148,7 +1148,7 @@ func snapshotDelete(d *schema.ResourceData, meta interface{}, id string) error { func isWaitForSnapshotDeleted(sess *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for Snapshot (%s) to be deleted.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isSnapshotDeleting}, Target: []string{isSnapshotDeleted, isSnapshotFailed}, Refresh: isSnapshotDeleteRefreshFunc(sess, id), @@ -1160,7 +1160,7 @@ func isWaitForSnapshotDeleted(sess *vpcv1.VpcV1, id string, timeout time.Duratio return stateConf.WaitForState() } -func isSnapshotDeleteRefreshFunc(sess *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isSnapshotDeleteRefreshFunc(sess *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { log.Printf("[DEBUG] Refresh function for Snapshot delete.") getSnapshotOptions := &vpcv1.GetSnapshotOptions{ diff --git a/ibm/service/vpc/resource_ibm_is_snapshot_consistency_group.go b/ibm/service/vpc/resource_ibm_is_snapshot_consistency_group.go index 432f3ac224..9b7ab7bf5c 100644 --- a/ibm/service/vpc/resource_ibm_is_snapshot_consistency_group.go +++ b/ibm/service/vpc/resource_ibm_is_snapshot_consistency_group.go @@ -12,7 +12,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -390,7 +390,7 @@ func resourceIBMIsSnapshotConsistencyGroupCreate(context context.Context, d *sch func isWaitForSnapshotConsistencyGroupAvailable(sess *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for Snapshot Consistency Group(%s) to be available.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pending"}, Target: []string{"stable", "failed"}, Refresh: isSnapshotConsistencyGroupRefreshFunc(sess, id), @@ -402,7 +402,7 @@ func isWaitForSnapshotConsistencyGroupAvailable(sess *vpcv1.VpcV1, id string, ti return stateConf.WaitForState() } -func isSnapshotConsistencyGroupRefreshFunc(vpcClient *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isSnapshotConsistencyGroupRefreshFunc(vpcClient *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getSnapshotConsistencyGroupOptions := &vpcv1.GetSnapshotConsistencyGroupOptions{} @@ -428,7 +428,7 @@ func isSnapshotConsistencyGroupRefreshFunc(vpcClient *vpcv1.VpcV1, id string) re func isWaitForSnapshotConsistencyGroupUpdate(sess *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for Snapshot Consistency Group (%s) to be available.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"updating"}, Target: []string{"stable", "failed"}, Refresh: isSnapshotUpdateConsistencyGroupRefreshFunc(sess, id), @@ -439,7 +439,7 @@ func isWaitForSnapshotConsistencyGroupUpdate(sess *vpcv1.VpcV1, id string, timeo return stateConf.WaitForState() } -func isSnapshotUpdateConsistencyGroupRefreshFunc(vpcClient *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isSnapshotUpdateConsistencyGroupRefreshFunc(vpcClient *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getSnapshotConsistencyGroupOptions := &vpcv1.GetSnapshotConsistencyGroupOptions{} getSnapshotConsistencyGroupOptions.SetID(id) @@ -463,7 +463,7 @@ func isSnapshotUpdateConsistencyGroupRefreshFunc(vpcClient *vpcv1.VpcV1, id stri func isWaitForSnapshotConsistencyGroupDeleted(sess *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for Snapshot Consistency Group (%s) to be deleted.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"deleting"}, Target: []string{"deleted", "failed"}, Refresh: isSnapshotDeleteConsistencyGroupRefreshFunc(sess, id), @@ -475,7 +475,7 @@ func isWaitForSnapshotConsistencyGroupDeleted(sess *vpcv1.VpcV1, id string, time return stateConf.WaitForState() } -func isSnapshotDeleteConsistencyGroupRefreshFunc(vpcClient *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isSnapshotDeleteConsistencyGroupRefreshFunc(vpcClient *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { log.Printf("[DEBUG] Refresh function for Snapshot Consistency Group delete.") diff --git a/ibm/service/vpc/resource_ibm_is_snapshot_consistency_group_test.go b/ibm/service/vpc/resource_ibm_is_snapshot_consistency_group_test.go index 08fdd44339..2fac379620 100644 --- a/ibm/service/vpc/resource_ibm_is_snapshot_consistency_group_test.go +++ b/ibm/service/vpc/resource_ibm_is_snapshot_consistency_group_test.go @@ -8,9 +8,9 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" diff --git a/ibm/service/vpc/resource_ibm_is_snapshot_test.go b/ibm/service/vpc/resource_ibm_is_snapshot_test.go index c18d61e340..ba9fd132e2 100644 --- a/ibm/service/vpc/resource_ibm_is_snapshot_test.go +++ b/ibm/service/vpc/resource_ibm_is_snapshot_test.go @@ -13,9 +13,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISSnapshot_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_ssh_key_test.go b/ibm/service/vpc/resource_ibm_is_ssh_key_test.go index a1ee96e49b..55035dbe24 100644 --- a/ibm/service/vpc/resource_ibm_is_ssh_key_test.go +++ b/ibm/service/vpc/resource_ibm_is_ssh_key_test.go @@ -13,9 +13,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISSSHKey_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_ssh_keys_new.go b/ibm/service/vpc/resource_ibm_is_ssh_keys_new.go new file mode 100644 index 0000000000..d526c356a7 --- /dev/null +++ b/ibm/service/vpc/resource_ibm_is_ssh_keys_new.go @@ -0,0 +1,590 @@ +package vpc + +import ( + "context" + "encoding/json" + "fmt" + "log" + "strings" + + "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" + "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" + "github.com/IBM/go-sdk-core/v5/core" + "github.com/IBM/vpc-go-sdk/vpcv1" + "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator" + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/diag" + "github.com/hashicorp/terraform-plugin-framework/path" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/int64planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/listplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" + "github.com/hashicorp/terraform-plugin-go/tftypes" + "golang.org/x/crypto/ssh" +) + +var _ resource.Resource = &SSHKeyResource{} + +type SSHKeyResource struct { + client interface{} +} + +func NewSSHKeyResource(client interface{}) resource.Resource { + return &SSHKeyResource{ + client: client, + } +} + +func (r *SSHKeyResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { + resp.TypeName = req.ProviderTypeName + "_is_ssh_key_new" +} + +func (r *SSHKeyResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { + resp.Schema = schema.Schema{ + // This description is used by the documentation generator and the language server. + MarkdownDescription: "ssh key resource", + + Attributes: map[string]schema.Attribute{ + "name": schema.StringAttribute{ + MarkdownDescription: "The name for this key. The name must not be used by another key in the region. If unspecified, the name will be a hyphenated list of randomly-selected words", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + }, + "public_key": schema.StringAttribute{ + MarkdownDescription: "A unique public SSH key to import, in OpenSSH format (consisting of three space-separated fields: the algorithm name, base64-encoded key, and a comment). The algorithm and comment fields may be omitted, as only the key field is imported. Keys of type rsa may be 2048 or 4096 bits in length, however 4096 is recommended. Keys of type ed25519 are 256 bits in length.", + Required: true, + // PlanModifiers: []planmodifier.String{ + // stringplanmodifier.RequiresReplace(), + // }, + CustomType: SSHPublicKeyType{}, + PlanModifiers: []planmodifier.String{ + // Add the custom plan modifier + // SuppressPublicKeyDiff(), + // Since public_key changes should force a new resource + stringplanmodifier.RequiresReplace(), + }, + }, + "tags": schema.ListAttribute{ + MarkdownDescription: "Tags for the ssh key", + Optional: true, + ElementType: types.StringType, + // Validators: []validator.List{ + // listvalidator.UniqueValues(), + // listvalidator.ValueStringsAre(stringvalidator.RegexMatches(regexp.MustCompile("read|write|read and write"), "Must be either of read|write|read and write")), + // }, + }, + "access_tags": schema.ListAttribute{ + MarkdownDescription: "Access list for this ssh key", + Optional: true, + ElementType: types.StringType, + Validators: []validator.List{ + listvalidator.SizeAtLeast(1), + }, + PlanModifiers: []planmodifier.List{ + listplanmodifier.UseStateForUnknown(), + }, + }, + "type": schema.StringAttribute{ + MarkdownDescription: "The crypto-system used by this key", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + }, + "fingerprint": schema.StringAttribute{ + MarkdownDescription: "SSH key Fingerprint info", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + }, + "length": schema.Int64Attribute{ + MarkdownDescription: "SSH key Length", + Computed: true, + PlanModifiers: []planmodifier.Int64{ + int64planmodifier.UseStateForUnknown(), + }, + }, + "resource_group": schema.StringAttribute{ + MarkdownDescription: "The resource group to use. If unspecified, the account's default resource group will be used.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + }, + "resource_controller_url": schema.StringAttribute{ + MarkdownDescription: "The URL of the IBM Cloud dashboard that can be used to explore and view details about this instance", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + }, + "resource_name": schema.StringAttribute{ + MarkdownDescription: "The name of the resource", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + }, + "resource_crn": schema.StringAttribute{ + MarkdownDescription: "The crn of the resource", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + }, + "crn": schema.StringAttribute{ + MarkdownDescription: "The crn of the resource", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + }, + "resource_group_name": schema.StringAttribute{ + MarkdownDescription: "The resource group name in which resource is provisioned", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + }, + + "id": schema.StringAttribute{ + Computed: true, + MarkdownDescription: "Key Id", + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + }, + }, + } +} + +func (r *SSHKeyResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { + var plan SSHKeyResourceModel + + resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) + + if resp.Diagnostics.HasError() { + return + } + sess, err := r.client.(conns.ClientSession).VpcV1API() + if err != nil { + resp.Diagnostics.AddError( + "Error creating session", + err.Error(), + ) + } + + options := &vpcv1.CreateKeyOptions{} + if plan.ResourceGroup.ValueString() != "" { + options.ResourceGroup = &vpcv1.ResourceGroupIdentity{ + ID: core.StringPtr(plan.ResourceGroup.ValueString()), + } + } + if plan.Name.ValueString() != "" { + options.Name = core.StringPtr(plan.Name.ValueString()) + } + if plan.PublicKey.ValueString() != "" { + options.PublicKey = core.StringPtr(plan.PublicKey.ValueString()) + } + if plan.Type.ValueString() != "" { + options.Type = core.StringPtr(plan.Type.ValueString()) + } + key, _, err := sess.CreateKey(options) + if err != nil { + resp.Diagnostics.AddError( + "Error creating key", + err.Error(), + ) + return + } + + plan.Id = basetypes.NewStringValue(*key.ID) + plan.Fingerprint = basetypes.NewStringValue(*key.Fingerprint) + plan.Length = basetypes.NewInt64Value(int64(*key.Length)) + + plan.Name = basetypes.NewStringValue(*key.Name) + + if !plan.PublicKey.IsNull() { + plan.PublicKey = NewSSHPublicKeyValue(*key.PublicKey) + } + plan.Type = basetypes.NewStringValue(*key.Type) + plan.Fingerprint = basetypes.NewStringValue(*key.Fingerprint) + plan.Length = basetypes.NewInt64Value(int64(*key.Length)) + plan.Id = basetypes.NewStringValue(*key.ID) + plan.ResourceGroup = basetypes.NewStringValue(*key.ResourceGroup.ID) + controller, err := flex.GetBaseController(r.client) + if err != nil { + resp.Diagnostics.AddError( + "Error getting base controller", + err.Error(), + ) + return + } + plan.ResourceControllerURL = basetypes.NewStringValue(controller + "/vpc-ext/compute/sshKeys") + plan.ResourceGroup = basetypes.NewStringValue(*key.ResourceGroup.ID) + plan.ResourceName = basetypes.NewStringValue(*key.ResourceGroup.Name) + plan.ResourceCRN = basetypes.NewStringValue(*key.CRN) + plan.Crn = basetypes.NewStringValue(*key.CRN) + plan.ResourceGroupName = basetypes.NewStringValue(*key.ResourceGroup.Name) + if !plan.Tags.IsNull() { + newList := plan.Tags.Elements() + err = flex.UpdateGlobalTagsElementsUsingCRN(nil, newList, r.client, *key.CRN, "", isKeyUserTagType) + if err != nil { + log.Printf( + "Error on create of vpc SSH Key (%s) tags: %s", plan.Id.ValueString(), err) + } + } + + if !plan.AccessTags.IsNull() { + newList := plan.AccessTags.Elements() + err = flex.UpdateGlobalTagsElementsUsingCRN(nil, newList, r.client, *key.CRN, "", isKeyAccessTagType) + if err != nil { + log.Printf( + "Error on create of vpc SSH Key (%s) access tags: %s", plan.Id.ValueString(), err) + } + } + // resp.State.Set(ctx, plan) + resp.Diagnostics.Append(resp.State.Set(ctx, &plan)...) +} + +func (r *SSHKeyResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { + var state SSHKeyResourceModel + + resp.Diagnostics.Append(req.State.Get(ctx, &state)...) + sess, err := r.client.(conns.ClientSession).VpcV1API() + if err != nil { + resp.Diagnostics.AddError( + "Error creating session", + err.Error(), + ) + return + } + + options := &vpcv1.GetKeyOptions{ + ID: core.StringPtr(state.Id.ValueString()), + } + + key, _, err := sess.GetKey(options) + if err != nil { + resp.Diagnostics.AddError( + "Error getting key", + err.Error(), + ) + return + } + + state.Name = basetypes.NewStringValue(*key.Name) + state.PublicKey = NewSSHPublicKeyValue(*key.PublicKey) + state.Type = basetypes.NewStringValue(*key.Type) + state.Fingerprint = basetypes.NewStringValue(*key.Fingerprint) + state.Length = basetypes.NewInt64Value(int64(*key.Length)) + state.Id = basetypes.NewStringValue(*key.ID) + state.ResourceGroup = basetypes.NewStringValue(*key.ResourceGroup.ID) + controller, err := flex.GetBaseController(r.client) + if err != nil { + resp.Diagnostics.AddError( + "Error getting base controller", + err.Error(), + ) + return + } + state.ResourceControllerURL = basetypes.NewStringValue(controller + "/vpc-ext/compute/sshKeys") + state.ResourceControllerURL = basetypes.NewStringValue(*key.ResourceGroup.ID) + state.ResourceName = basetypes.NewStringValue(*key.ResourceGroup.Name) + state.ResourceCRN = basetypes.NewStringValue(*key.CRN) + state.Crn = basetypes.NewStringValue(*key.CRN) + state.ResourceGroupName = basetypes.NewStringValue(*key.ResourceGroup.Name) + tags, _ := flex.GetGlobalTagsElementsUsingCRN(r.client, *key.CRN, "", isKeyUserTagType) + access, _ := flex.GetGlobalTagsElementsUsingCRN(r.client, *key.CRN, "", isKeyAccessTagType) + if len(tags) > 0 { + state.Tags, _ = basetypes.NewListValue(convertStringSliceToListValue(tags)) + } + if len(access) > 0 { + state.AccessTags, _ = basetypes.NewListValue(convertStringSliceToListValue(access)) + } + resp.Diagnostics.Append(resp.State.Set(ctx, &state)...) +} + +func (r *SSHKeyResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { + sess, err := r.client.(conns.ClientSession).VpcV1API() + if err != nil { + resp.Diagnostics.AddError( + "Error creating session", + err.Error(), + ) + return + } + var plan, state SSHKeyResourceModel + resp.Diagnostics.Append(req.State.Get(ctx, &state)...) + resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) + if resp.Diagnostics.HasError() { + return + } + + if !plan.Name.Equal(state.Name) { + input := &vpcv1.UpdateKeyOptions{} + id := state.Id.ValueString() + input.ID = &id + keyPatchModel := &vpcv1.KeyPatch{} + keyPatchModel.Name = core.StringPtr(plan.Name.ValueString()) + keyPatchAsPatch, err := keyPatchModel.AsPatch() + if err != nil { + resp.Diagnostics.AddError( + "Error applying asPatch of keyPatchModel", + err.Error(), + ) + return + } + input.KeyPatch = keyPatchAsPatch + + _, res, err := sess.UpdateKey(input) + + if err != nil { + resp.Diagnostics.AddError(fmt.Sprintf( + "Error creating key %v", res), + err.Error(), + ) + return + } + resp.Diagnostics.Append(resp.State.Set(ctx, &plan)...) + } + return +} + +func (r *SSHKeyResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { + var state SSHKeyResourceModel + req.State.Get(ctx, &state) + + sess, err := r.client.(conns.ClientSession).VpcV1API() + if err != nil { + resp.Diagnostics.AddError( + "Error creating session", + err.Error(), + ) + return + } + + options := &vpcv1.DeleteKeyOptions{ + ID: core.StringPtr(state.Id.ValueString()), + } + + _, err = sess.DeleteKey(options) + if err != nil { + resp.Diagnostics.AddError( + "Error deleting key", + err.Error(), + ) + return + } + + resp.State.RemoveResource(ctx) +} + +type SSHKeyResourceModel struct { + Name types.String `tfsdk:"name"` + PublicKey SSHPublicKeyValue `tfsdk:"public_key"` + Id types.String `tfsdk:"id"` + Type types.String `tfsdk:"type"` + Length types.Int64 `tfsdk:"length"` + Fingerprint types.String `tfsdk:"fingerprint"` + ResourceGroup types.String `tfsdk:"resource_group"` + ResourceControllerURL types.String `tfsdk:"resource_controller_url"` + ResourceName types.String `tfsdk:"resource_name"` + ResourceCRN types.String `tfsdk:"resource_crn"` + Crn types.String `tfsdk:"crn"` + ResourceGroupName types.String `tfsdk:"resource_group_name"` + Tags types.List `tfsdk:"tags"` + AccessTags types.List `tfsdk:"access_tags"` +} + +func convertStringSliceToListValue(stringSlice []string) (attr.Type, []attr.Value) { + valueType := basetypes.StringType{} + values := make([]attr.Value, len(stringSlice)) + + for i, s := range stringSlice { + values[i] = basetypes.NewStringValue(s) + } + + return valueType, values +} + +func BeautifyResponse(response interface{}) string { + output, err := json.MarshalIndent(response, "", " ") + if err == nil { + return fmt.Sprintf("%+v\n", string(output)) + } + return fmt.Sprintf("Error : %#v", response) +} + +// to suppress any change shown when keys are same +func suppressSshKeyPublicKeyDiff(old, new string) bool { + // if there are extra spaces or new lines, suppress that change + if strings.Compare(strings.TrimSpace(old), strings.TrimSpace(new)) != 0 { + // if old is empty + if old != "" { + //create a new piblickey object from the string + usePK, error := parseKey(new) + if error != nil { + return false + } + // returns the key in byte format with an extra added new line at the end + newkey := strings.TrimRight(string(ssh.MarshalAuthorizedKey(usePK)), "\n") + // check if both keys are same, if yes suppress the change + return strings.TrimSpace(strings.TrimPrefix(newkey, old)) == "" + } else { + return strings.TrimSpace(strings.TrimPrefix(new, old)) == "" + } + } else { + return true + } +} + +// SSHPublicKeyValue is a custom string value type that implements semantic equality +type SSHPublicKeyValue struct { + basetypes.StringValue +} + +// Type returns the type of the value +func (v SSHPublicKeyValue) Type(_ context.Context) attr.Type { + return SSHPublicKeyType{} +} + +// Equal returns true if the other value is equal +func (v SSHPublicKeyValue) Equal(other attr.Value) bool { + o, ok := other.(SSHPublicKeyValue) + if !ok { + return false + } + + return v.StringValue.Equal(o.StringValue) +} + +// StringSemanticEquals implements semantic equality for SSH public keys +func (v SSHPublicKeyValue) StringSemanticEquals(ctx context.Context, newValuable basetypes.StringValuable) (bool, diag.Diagnostics) { + var diags diag.Diagnostics + + newValue, ok := newValuable.(SSHPublicKeyValue) + if !ok { + diags.AddError( + "Semantic Equality Check Error", + "An unexpected value type was received while performing semantic equality checks. "+ + "Please report this to the provider developers.\n\n"+ + "Expected Value Type: "+fmt.Sprintf("%T", v)+"\n"+ + "Got Value Type: "+fmt.Sprintf("%T", newValuable), + ) + return false, diags + } + + return suppressSshKeyPublicKeyDiff(v.StringValue.ValueString(), newValue.StringValue.ValueString()), diags +} + +// SSHPublicKeyType is the type for SSHPublicKeyValue +type SSHPublicKeyType struct { + basetypes.StringType +} + +func (t SSHPublicKeyType) ValueFromString(ctx context.Context, in basetypes.StringValue) (basetypes.StringValuable, diag.Diagnostics) { + var diags diag.Diagnostics + + return SSHPublicKeyValue{ + StringValue: in, + }, diags +} + +func (t SSHPublicKeyType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error) { + val, err := t.StringType.ValueFromTerraform(ctx, in) + if err != nil { + return nil, err + } + + stringVal, ok := val.(basetypes.StringValue) + if !ok { + return nil, fmt.Errorf("unexpected value type %T", val) + } + + return SSHPublicKeyValue{ + StringValue: stringVal, + }, nil +} + +// String returns a human readable string +func (t SSHPublicKeyType) String() string { + return "SSHPublicKeyType" +} + +// Equal returns true if the other type is the same +func (t SSHPublicKeyType) Equal(o attr.Type) bool { + other, ok := o.(SSHPublicKeyType) + if !ok { + return false + } + + return t.StringType.Equal(other.StringType) +} + +// Type returns the underlying type +func (t SSHPublicKeyType) Type() attr.Type { + return t +} + +// ValueType returns the value type +func (t SSHPublicKeyType) ValueType(_ context.Context) attr.Value { + return SSHPublicKeyValue{} +} + +// Validate implements type validation +func (t SSHPublicKeyType) Validate(ctx context.Context, value tftypes.Value, valuePath path.Path) diag.Diagnostics { + var diags diag.Diagnostics + + if value.IsNull() || !value.IsKnown() { + return diags + } + + var valueString string + + if err := value.As(&valueString); err != nil { + diags.AddAttributeError( + valuePath, + "Invalid SSH Public Key Value", + "String value expected, received: "+value.String(), + ) + return diags + } + + return diags +} + +var ( + _ attr.Type = SSHPublicKeyType{} + _ basetypes.StringValuable = SSHPublicKeyValue{} +) + +// Helper functions to create new values +func NewSSHPublicKeyNull() SSHPublicKeyValue { + return SSHPublicKeyValue{ + StringValue: basetypes.NewStringNull(), + } +} + +func NewSSHPublicKeyUnknown() SSHPublicKeyValue { + return SSHPublicKeyValue{ + StringValue: basetypes.NewStringUnknown(), + } +} + +func NewSSHPublicKeyValue(value string) SSHPublicKeyValue { + return SSHPublicKeyValue{ + StringValue: basetypes.NewStringValue(value), + } +} diff --git a/ibm/service/vpc/resource_ibm_is_ssh_keys_new_testgo b/ibm/service/vpc/resource_ibm_is_ssh_keys_new_testgo new file mode 100644 index 0000000000..25be52e221 --- /dev/null +++ b/ibm/service/vpc/resource_ibm_is_ssh_keys_new_testgo @@ -0,0 +1,116 @@ +package vpc_test + +import ( + "fmt" + "strings" + "testing" + "time" + + acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" +) + +// Test SSH Key data +const ( + rsaPublicKey = `ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVERRN7/9484SOBJ3HSKxxNG5JN8owAjy5f9yYwcUg+JaUVuytn5Pv3aeYROHGGg+5G346xaq3DAwX6Y5ykr2fvjObgncQBnuU5KHWCECO/4h8uWuwh/kfniXPVjFToc+gnkqA+3RKpAecZhFXwfalQ9mMuYGFxn+fwn8cYEApsJbsEmb0iJwPiZ5hjFC8wREuiTlhPHDgkBLOiycd20op2nXzDbHfCHInquEe/gYxEitALONxm0swBOwJZwlTDOB7C6y2dzlrtxr1L59m7pCkWI4EtTRLvleehBoj3u7jB4usR \n` + ed25519PublicKey = `ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILw6jUMh6BHClr2dUV1LHHKBQQKyTDZvY/0BSPDQmzWo \n` +) + +func TestAccIBMIsSSHKey_RSA(t *testing.T) { + var sshKeyName = fmt.Sprintf("tf-acc-test-rsa-%d", time.Now().Unix()) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acc.TestAccFrameworkPreCheck(t) }, + ProtoV6ProviderFactories: acc.TestAccProtoV6ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testAccIBMIsSSHKeyConfigRSA(sshKeyName), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("ibm_is_ssh_key_new.rsa", "name", sshKeyName), + resource.TestCheckResourceAttr("ibm_is_ssh_key_new.rsa", "type", "rsa"), + resource.TestCheckResourceAttr("ibm_is_ssh_key_new.rsa", "public_key", strings.TrimSpace(rsaPublicKey)), + resource.TestCheckResourceAttr("ibm_is_ssh_key_new.rsa", "tags.#", "2"), + resource.TestCheckResourceAttrSet("ibm_is_ssh_key_new.rsa", "id"), + resource.TestCheckResourceAttrSet("ibm_is_ssh_key_new.rsa", "fingerprint"), + ), + }, + { + ResourceName: "ibm_is_ssh_key_new.rsa", + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccIBMIsSSHKeyConfigRSAUpdate(sshKeyName), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("ibm_is_ssh_key_new.rsa", "name", sshKeyName+"-updated"), + resource.TestCheckResourceAttr("ibm_is_ssh_key_new.rsa", "tags.#", "3"), + ), + }, + }, + }) +} + +func TestAccIBMIsSSHKey_ED25519(t *testing.T) { + var sshKeyName = fmt.Sprintf("tf-acc-test-ed25519-%d", time.Now().Unix()) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acctest.TestAccFrameworkPreCheck(t) }, + ProtoV6ProviderFactories: acctest.TestAccProtoV6ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testAccIBMIsSSHKeyConfigED25519(sshKeyName), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("ibm_is_ssh_key_new.ed25519", "name", sshKeyName), + resource.TestCheckResourceAttr("ibm_is_ssh_key_new.ed25519", "type", "ed25519"), + resource.TestCheckResourceAttr("ibm_is_ssh_key_new.ed25519", "public_key", strings.TrimSpace(ed25519PublicKey)), + resource.TestCheckResourceAttrSet("ibm_is_ssh_key_new.ed25519", "id"), + ), + }, + { + ResourceName: "ibm_is_ssh_key_new.ed25519", + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +// Configuration generation functions +func testAccIBMIsSSHKeyConfigRSA(name string) string { + return acc.ConfigCompose( + acc.ConfigureProvider(acctest.Region()), + fmt.Sprintf(` + resource "ibm_is_ssh_key_new" "rsa" { + name = %q + public_key = %q + type = "rsa" + tags = ["test:tags", "test:tags1"] + } +`, name, rsaPublicKey)) +} + +func testAccIBMIsSSHKeyConfigRSAUpdate(name string) string { + return acctest.ConfigCompose( + acctest.ConfigureProvider(acctest.Region()), + fmt.Sprintf(` +resource "ibm_is_ssh_key_new" "rsa" { + name = "%s-updated" + public_key = %q + type = "rsa" + tags = ["test:tags", "test:tags1", "test:tags2"] +} +`, name, strings.TrimSpace(rsaPublicKey))) +} + +func testAccIBMIsSSHKeyConfigED25519(name string) string { + return acctest.ConfigCompose( + acctest.ConfigureProvider(acctest.Region()), + fmt.Sprintf(` +resource "ibm_is_ssh_key_new" "ed25519" { + name = %q + public_key = %q + type = "ed25519" + tags = ["test:tags", "test:tags1"] +} +`, name, strings.TrimSpace(ed25519PublicKey))) +} diff --git a/ibm/service/vpc/resource_ibm_is_subnet.go b/ibm/service/vpc/resource_ibm_is_subnet.go index ff6ef5b0bd..e339b33fa0 100644 --- a/ibm/service/vpc/resource_ibm_is_subnet.go +++ b/ibm/service/vpc/resource_ibm_is_subnet.go @@ -15,9 +15,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -422,7 +422,7 @@ func subnetCreate(d *schema.ResourceData, meta interface{}, name, vpc, zone, ipv func isWaitForSubnetAvailable(subnetC *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for subnet (%s) to be available.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isSubnetProvisioning}, Target: []string{isSubnetProvisioningDone, ""}, Refresh: isSubnetRefreshFunc(subnetC, id), @@ -434,7 +434,7 @@ func isWaitForSubnetAvailable(subnetC *vpcv1.VpcV1, id string, timeout time.Dura return stateConf.WaitForState() } -func isSubnetRefreshFunc(subnetC *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isSubnetRefreshFunc(subnetC *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getSubnetOptions := &vpcv1.GetSubnetOptions{ ID: &id, @@ -723,7 +723,7 @@ func subnetDelete(d *schema.ResourceData, meta interface{}, id string) error { func isWaitForSubnetDeleteRetry(vpcClient *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("[DEBUG] Retrying subnet (%s) delete", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isSubnetInUse}, Target: []string{isSubnetDeleting, isSubnetDeleted, ""}, Refresh: func() (interface{}, string, error) { @@ -752,7 +752,7 @@ func isWaitForSubnetDeleteRetry(vpcClient *vpcv1.VpcV1, id string, timeout time. func isWaitForSubnetDeleted(subnetC *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for subnet (%s) to be deleted.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isSubnetDeleting}, Target: []string{isSubnetDeleted, ""}, Refresh: isSubnetDeleteRefreshFunc(subnetC, id), @@ -764,7 +764,7 @@ func isWaitForSubnetDeleted(subnetC *vpcv1.VpcV1, id string, timeout time.Durati return stateConf.WaitForState() } -func isSubnetDeleteRefreshFunc(subnetC *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isSubnetDeleteRefreshFunc(subnetC *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { log.Printf("[DEBUG] is subnet delete function here") getSubnetOptions := &vpcv1.GetSubnetOptions{ diff --git a/ibm/service/vpc/resource_ibm_is_subnet_network_acl_attachment_test.go b/ibm/service/vpc/resource_ibm_is_subnet_network_acl_attachment_test.go index a315291625..76c39c69a0 100644 --- a/ibm/service/vpc/resource_ibm_is_subnet_network_acl_attachment_test.go +++ b/ibm/service/vpc/resource_ibm_is_subnet_network_acl_attachment_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISSubnetNetworkACLAttachment_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_subnet_public_gateway_attachment.go b/ibm/service/vpc/resource_ibm_is_subnet_public_gateway_attachment.go index 058f308f42..2f8c0f5ce4 100644 --- a/ibm/service/vpc/resource_ibm_is_subnet_public_gateway_attachment.go +++ b/ibm/service/vpc/resource_ibm_is_subnet_public_gateway_attachment.go @@ -12,7 +12,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/vpc-go-sdk/vpcv1" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -262,7 +262,7 @@ func resourceIBMISSubnetPublicGatewayAttachmentDelete(context context.Context, d func isWaitForSubnetPublicGatewayAvailable(subnetC *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for subnet (%s) public gateway attachment to be available.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{IsPublicGatewayAttachmentPending, IsPublicGatewayAttachmentDeleting}, Target: []string{IsPublicGatewayAttachmentAvailable, IsPublicGatewayAttachmentFailed, ""}, Refresh: isSubnetPublicGatewayRefreshFunc(subnetC, id), @@ -274,7 +274,7 @@ func isWaitForSubnetPublicGatewayAvailable(subnetC *vpcv1.VpcV1, id string, time return stateConf.WaitForState() } -func isSubnetPublicGatewayRefreshFunc(subnetC *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isSubnetPublicGatewayRefreshFunc(subnetC *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getSubnetPublicGatewayOptionsModel := &vpcv1.GetSubnetPublicGatewayOptions{ ID: &id, @@ -299,7 +299,7 @@ func isSubnetPublicGatewayRefreshFunc(subnetC *vpcv1.VpcV1, id string) resource. func isWaitForSubnetPublicGatewayDelete(subnetC *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for subnet (%s) public gateway attachment to be detached.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{IsPublicGatewayAttachmentPending, IsPublicGatewayAttachmentDeleting}, Target: []string{IsPublicGatewayAttachmentAvailable, IsPublicGatewayAttachmentFailed, ""}, Refresh: isSubnetPublicGatewayDeleteRefreshFunc(subnetC, id), @@ -311,7 +311,7 @@ func isWaitForSubnetPublicGatewayDelete(subnetC *vpcv1.VpcV1, id string, timeout return stateConf.WaitForState() } -func isSubnetPublicGatewayDeleteRefreshFunc(subnetC *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isSubnetPublicGatewayDeleteRefreshFunc(subnetC *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getSubnetPublicGatewayOptionsModel := &vpcv1.GetSubnetPublicGatewayOptions{ ID: &id, diff --git a/ibm/service/vpc/resource_ibm_is_subnet_public_gateway_attachment_test.go b/ibm/service/vpc/resource_ibm_is_subnet_public_gateway_attachment_test.go index 02e0c39d3d..37e5e03e7f 100644 --- a/ibm/service/vpc/resource_ibm_is_subnet_public_gateway_attachment_test.go +++ b/ibm/service/vpc/resource_ibm_is_subnet_public_gateway_attachment_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISSubnetPublicGatewayAttachment_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_subnet_reserved_ip.go b/ibm/service/vpc/resource_ibm_is_subnet_reserved_ip.go index 9c8523bc22..21b031b43a 100644 --- a/ibm/service/vpc/resource_ibm_is_subnet_reserved_ip.go +++ b/ibm/service/vpc/resource_ibm_is_subnet_reserved_ip.go @@ -13,7 +13,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/IBM/go-sdk-core/v5/core" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -376,7 +376,7 @@ func get(d *schema.ResourceData, meta interface{}) (*vpcv1.ReservedIP, error) { func isWaitForReservedIpAvailable(sess *vpcv1.VpcV1, subnetid, id string, timeout time.Duration, d *schema.ResourceData) (interface{}, error) { log.Printf("Waiting for reseved ip (%s/%s) to be available.", subnetid, id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"pending"}, Target: []string{"done", "failed", ""}, Refresh: isReserveIpRefreshFunc(sess, subnetid, id, d), @@ -387,7 +387,7 @@ func isWaitForReservedIpAvailable(sess *vpcv1.VpcV1, subnetid, id string, timeou return stateConf.WaitForState() } -func isReserveIpRefreshFunc(sess *vpcv1.VpcV1, subnetid, id string, d *schema.ResourceData) resource.StateRefreshFunc { +func isReserveIpRefreshFunc(sess *vpcv1.VpcV1, subnetid, id string, d *schema.ResourceData) retry.StateRefreshFunc { return func() (interface{}, string, error) { getreservedipOptions := &vpcv1.GetSubnetReservedIPOptions{ ID: &id, diff --git a/ibm/service/vpc/resource_ibm_is_subnet_reserved_ip_patch_test.go b/ibm/service/vpc/resource_ibm_is_subnet_reserved_ip_patch_test.go index 3819662017..ed78192674 100644 --- a/ibm/service/vpc/resource_ibm_is_subnet_reserved_ip_patch_test.go +++ b/ibm/service/vpc/resource_ibm_is_subnet_reserved_ip_patch_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISSubnetReservedIPPatchResource_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_subnet_reserved_ip_test.go b/ibm/service/vpc/resource_ibm_is_subnet_reserved_ip_test.go index f86c8aa837..c15e071cd1 100644 --- a/ibm/service/vpc/resource_ibm_is_subnet_reserved_ip_test.go +++ b/ibm/service/vpc/resource_ibm_is_subnet_reserved_ip_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISSubnetReservedIPResource_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_subnet_routing_table_attachment_test.go b/ibm/service/vpc/resource_ibm_is_subnet_routing_table_attachment_test.go index 87b78d08cc..3ac4a4adfb 100644 --- a/ibm/service/vpc/resource_ibm_is_subnet_routing_table_attachment_test.go +++ b/ibm/service/vpc/resource_ibm_is_subnet_routing_table_attachment_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISSubnetRoutingTableAttachment_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_subnet_test.go b/ibm/service/vpc/resource_ibm_is_subnet_test.go index a4dadf59e3..4d3ea50d6d 100644 --- a/ibm/service/vpc/resource_ibm_is_subnet_test.go +++ b/ibm/service/vpc/resource_ibm_is_subnet_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISSubnet_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_virtual_endpoint_gateway.go b/ibm/service/vpc/resource_ibm_is_virtual_endpoint_gateway.go index fa827dcacd..190b5316f2 100644 --- a/ibm/service/vpc/resource_ibm_is_virtual_endpoint_gateway.go +++ b/ibm/service/vpc/resource_ibm_is_virtual_endpoint_gateway.go @@ -16,7 +16,7 @@ import ( "github.com/IBM/go-sdk-core/v5/core" "github.com/IBM/vpc-go-sdk/vpcv1" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -599,7 +599,7 @@ func flattenDataSourceSecurityGroups(securityGroupList []vpcv1.SecurityGroupRefe func isWaitForVirtualEndpointGatewayAvailable(sess *vpcv1.VpcV1, endPointGatewayId string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for virtual endpoint gateway (%s) to be available.", endPointGatewayId) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"waiting", "pending", "updating"}, Target: []string{"stable", "failed", ""}, Refresh: isVirtualEndpointGatewayRefreshFunc(sess, endPointGatewayId), @@ -614,7 +614,7 @@ func isWaitForVirtualEndpointGatewayAvailable(sess *vpcv1.VpcV1, endPointGateway func isWaitForVirtualEndpointGatewayForPPSGAvailable(sess *vpcv1.VpcV1, endPointGatewayId string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for virtual endpoint gateway (%s) to be available.", endPointGatewayId) // When the target is PPSG, pending is a valid state when the endpoint gateway binding is not permitted within the terraform configuration. - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"waiting", "updating"}, Target: []string{"stable", "failed", "pending", ""}, Refresh: isVirtualEndpointGatewayRefreshFunc(sess, endPointGatewayId), @@ -627,7 +627,7 @@ func isWaitForVirtualEndpointGatewayForPPSGAvailable(sess *vpcv1.VpcV1, endPoint return stateConf.WaitForState() } -func isVirtualEndpointGatewayRefreshFunc(sess *vpcv1.VpcV1, endPointGatewayId string) resource.StateRefreshFunc { +func isVirtualEndpointGatewayRefreshFunc(sess *vpcv1.VpcV1, endPointGatewayId string) retry.StateRefreshFunc { return func() (interface{}, string, error) { opt := sess.NewGetEndpointGatewayOptions(endPointGatewayId) @@ -665,7 +665,7 @@ func resourceIBMisVirtualEndpointGatewayDelete(d *schema.ResourceData, meta inte func isWaitForEGWDelete(vpcClient *vpcv1.VpcV1, d *schema.ResourceData, id string) (interface{}, error) { - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"deleting", "stable"}, Target: []string{"done", ""}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/vpc/resource_ibm_is_virtual_endpoint_gateway_ip_test.go b/ibm/service/vpc/resource_ibm_is_virtual_endpoint_gateway_ip_test.go index c367286a45..811772fc92 100644 --- a/ibm/service/vpc/resource_ibm_is_virtual_endpoint_gateway_ip_test.go +++ b/ibm/service/vpc/resource_ibm_is_virtual_endpoint_gateway_ip_test.go @@ -11,9 +11,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISVirtualEndpointGatewayIP_Basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_virtual_endpoint_gateway_test.go b/ibm/service/vpc/resource_ibm_is_virtual_endpoint_gateway_test.go index 455fa774b6..06c1b2b23f 100644 --- a/ibm/service/vpc/resource_ibm_is_virtual_endpoint_gateway_test.go +++ b/ibm/service/vpc/resource_ibm_is_virtual_endpoint_gateway_test.go @@ -10,9 +10,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISVirtualEndpointGateway_Basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_virtual_network_interface.go b/ibm/service/vpc/resource_ibm_is_virtual_network_interface.go index afa651f220..dd190892e1 100644 --- a/ibm/service/vpc/resource_ibm_is_virtual_network_interface.go +++ b/ibm/service/vpc/resource_ibm_is_virtual_network_interface.go @@ -18,7 +18,7 @@ import ( "github.com/IBM/vpc-go-sdk/vpcv1" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -1084,7 +1084,7 @@ func resourceIBMIsVirtualNetworkInterfaceVirtualNetworkInterfaceTargetShareMount func isWaitForVirtualNetworkInterfaceAvailable(client *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for VirtualNetworkInterface (%s) to be available.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"", "pending"}, Target: []string{"done", "failed", "stable"}, Refresh: isVirtualNetworkInterfaceRefreshFunc(client, id), @@ -1096,7 +1096,7 @@ func isWaitForVirtualNetworkInterfaceAvailable(client *vpcv1.VpcV1, id string, t return stateConf.WaitForState() } -func isVirtualNetworkInterfaceRefreshFunc(client *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isVirtualNetworkInterfaceRefreshFunc(client *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { vnigetoptions := &vpcv1.GetVirtualNetworkInterfaceOptions{ ID: &id, @@ -1114,7 +1114,7 @@ func isVirtualNetworkInterfaceRefreshFunc(client *vpcv1.VpcV1, id string) resour func isWaitForVirtualNetworkInterfaceDeleted(client *vpcv1.VpcV1, id string, timeout time.Duration, vni *vpcv1.VirtualNetworkInterface) (interface{}, error) { log.Printf("Waiting for VirtualNetworkInterface (%s) to be deleted.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"", "pending", "deleting", "updating", "waiting"}, Target: []string{"done", "failed", "stable", "suspended"}, Refresh: isVirtualNetworkInterfaceDeleteRefreshFunc(client, vni, id), @@ -1126,7 +1126,7 @@ func isWaitForVirtualNetworkInterfaceDeleted(client *vpcv1.VpcV1, id string, tim return stateConf.WaitForState() } -func isVirtualNetworkInterfaceDeleteRefreshFunc(client *vpcv1.VpcV1, vnir *vpcv1.VirtualNetworkInterface, id string) resource.StateRefreshFunc { +func isVirtualNetworkInterfaceDeleteRefreshFunc(client *vpcv1.VpcV1, vnir *vpcv1.VirtualNetworkInterface, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { vnigetoptions := &vpcv1.GetVirtualNetworkInterfaceOptions{ ID: &id, diff --git a/ibm/service/vpc/resource_ibm_is_virtual_network_interface_floating_ip_test.go b/ibm/service/vpc/resource_ibm_is_virtual_network_interface_floating_ip_test.go index ee8a5ff5e6..4a5da1ad71 100644 --- a/ibm/service/vpc/resource_ibm_is_virtual_network_interface_floating_ip_test.go +++ b/ibm/service/vpc/resource_ibm_is_virtual_network_interface_floating_ip_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/vpc" diff --git a/ibm/service/vpc/resource_ibm_is_virtual_network_interface_ip_test.go b/ibm/service/vpc/resource_ibm_is_virtual_network_interface_ip_test.go index 3b333d5788..23575e4811 100644 --- a/ibm/service/vpc/resource_ibm_is_virtual_network_interface_ip_test.go +++ b/ibm/service/vpc/resource_ibm_is_virtual_network_interface_ip_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" diff --git a/ibm/service/vpc/resource_ibm_is_virtual_network_interface_test.go b/ibm/service/vpc/resource_ibm_is_virtual_network_interface_test.go index 355c687877..39d703ffc6 100644 --- a/ibm/service/vpc/resource_ibm_is_virtual_network_interface_test.go +++ b/ibm/service/vpc/resource_ibm_is_virtual_network_interface_test.go @@ -7,9 +7,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM/vpc-go-sdk/vpcv1" diff --git a/ibm/service/vpc/resource_ibm_is_volume.go b/ibm/service/vpc/resource_ibm_is_volume.go index 2b5242348d..e9dcd82afc 100644 --- a/ibm/service/vpc/resource_ibm_is_volume.go +++ b/ibm/service/vpc/resource_ibm_is_volume.go @@ -15,7 +15,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/IBM/vpc-go-sdk/vpcv1" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -1067,7 +1067,7 @@ func volDelete(d *schema.ResourceData, meta interface{}, id string) error { func isWaitForVolumeDeleted(vol *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for (%s) to be deleted.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isVolumeDeleting}, Target: []string{"done", ""}, Refresh: isVolumeDeleteRefreshFunc(vol, id), @@ -1079,7 +1079,7 @@ func isWaitForVolumeDeleted(vol *vpcv1.VpcV1, id string, timeout time.Duration) return stateConf.WaitForState() } -func isVolumeDeleteRefreshFunc(vol *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isVolumeDeleteRefreshFunc(vol *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { volgetoptions := &vpcv1.GetVolumeOptions{ ID: &id, @@ -1124,7 +1124,7 @@ func volExists(d *schema.ResourceData, meta interface{}, id string) (bool, error func isWaitForVolumeAvailable(client *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for Volume (%s) to be available.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isVolumeProvisioning}, Target: []string{isVolumeProvisioningDone, ""}, Refresh: isVolumeRefreshFunc(client, id), @@ -1136,7 +1136,7 @@ func isWaitForVolumeAvailable(client *vpcv1.VpcV1, id string, timeout time.Durat return stateConf.WaitForState() } -func isVolumeRefreshFunc(client *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isVolumeRefreshFunc(client *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { volgetoptions := &vpcv1.GetVolumeOptions{ ID: &id, diff --git a/ibm/service/vpc/resource_ibm_is_volume_test.go b/ibm/service/vpc/resource_ibm_is_volume_test.go index df86461ad7..740ee7c98f 100644 --- a/ibm/service/vpc/resource_ibm_is_volume_test.go +++ b/ibm/service/vpc/resource_ibm_is_volume_test.go @@ -13,9 +13,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISVolume_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_vpc.go b/ibm/service/vpc/resource_ibm_is_vpc.go index a9ad0a99a0..e9dcd25a69 100644 --- a/ibm/service/vpc/resource_ibm_is_vpc.go +++ b/ibm/service/vpc/resource_ibm_is_vpc.go @@ -16,7 +16,7 @@ import ( "github.com/IBM/go-sdk-core/v5/core" "github.com/IBM/vpc-go-sdk/vpcv1" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" @@ -809,7 +809,7 @@ func vpcCreate(d *schema.ResourceData, meta interface{}, name, apm, rg string, i func isWaitForVPCAvailable(vpc *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for VPC (%s) to be available.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isVPCPending}, Target: []string{isVPCAvailable, isVPCFailed}, Refresh: isVPCRefreshFunc(vpc, id), @@ -893,7 +893,7 @@ func deleteDefaultSecurityGroupRules(sess *vpcv1.VpcV1, vpcID string) error { return nil } -func isVPCRefreshFunc(vpc *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isVPCRefreshFunc(vpc *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getvpcOptions := &vpcv1.GetVPCOptions{ ID: &id, @@ -1484,7 +1484,7 @@ func vpcDelete(d *schema.ResourceData, meta interface{}, id string) error { func isWaitForVPCDeleted(vpc *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for VPC (%s) to be deleted.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isVPCDeleting}, Target: []string{isVPCDeleted, isVPCFailed}, Refresh: isVPCDeleteRefreshFunc(vpc, id), @@ -1496,7 +1496,7 @@ func isWaitForVPCDeleted(vpc *vpcv1.VpcV1, id string, timeout time.Duration) (in return stateConf.WaitForState() } -func isVPCDeleteRefreshFunc(vpc *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isVPCDeleteRefreshFunc(vpc *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { log.Printf("[DEBUG] is vpc delete function here") getvpcOptions := &vpcv1.GetVPCOptions{ diff --git a/ibm/service/vpc/resource_ibm_is_vpc_address_prefix_test.go b/ibm/service/vpc/resource_ibm_is_vpc_address_prefix_test.go index fbca3ad6a9..5887ed59dd 100644 --- a/ibm/service/vpc/resource_ibm_is_vpc_address_prefix_test.go +++ b/ibm/service/vpc/resource_ibm_is_vpc_address_prefix_test.go @@ -14,9 +14,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISVPCAddressPrefix_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_vpc_dns_resolution_binding.go b/ibm/service/vpc/resource_ibm_is_vpc_dns_resolution_binding.go index 3b779a93a7..40197b6e5f 100644 --- a/ibm/service/vpc/resource_ibm_is_vpc_dns_resolution_binding.go +++ b/ibm/service/vpc/resource_ibm_is_vpc_dns_resolution_binding.go @@ -11,7 +11,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" @@ -495,7 +495,7 @@ func ParseVPCDNSTerraformID(s string) (string, string, error) { func isWaitForVpcDnsDeleted(sess *vpcv1.VpcV1, vpcid, id string, timeout time.Duration, dns *vpcv1.VpcdnsResolutionBinding) (interface{}, error) { log.Printf("Waiting for vpc dns (%s) to be deleted.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"deleting", "pending", "updating", "waiting"}, Target: []string{"stable", "failed", "suspended", ""}, Refresh: isVpcDnsDeleteRefreshFunc(sess, vpcid, id, dns), @@ -507,7 +507,7 @@ func isWaitForVpcDnsDeleted(sess *vpcv1.VpcV1, vpcid, id string, timeout time.Du return stateConf.WaitForState() } -func isVpcDnsDeleteRefreshFunc(sess *vpcv1.VpcV1, vpcid, id string, dns *vpcv1.VpcdnsResolutionBinding) resource.StateRefreshFunc { +func isVpcDnsDeleteRefreshFunc(sess *vpcv1.VpcV1, vpcid, id string, dns *vpcv1.VpcdnsResolutionBinding) retry.StateRefreshFunc { return func() (interface{}, string, error) { getVPCDnsResolutionBindingOptions := &vpcv1.GetVPCDnsResolutionBindingOptions{} @@ -531,7 +531,7 @@ func isVpcDnsDeleteRefreshFunc(sess *vpcv1.VpcV1, vpcid, id string, dns *vpcv1.V func isWaitForVpcDnsCreated(sess *vpcv1.VpcV1, vpcid, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for vpc dns (%s) to be created.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"deleting", "pending", "updating", "waiting"}, Target: []string{"stable", "failed", "suspended", ""}, Refresh: isVpcDnsCreateRefreshFunc(sess, vpcid, id), @@ -542,8 +542,7 @@ func isWaitForVpcDnsCreated(sess *vpcv1.VpcV1, vpcid, id string, timeout time.Du return stateConf.WaitForState() } - -func isVpcDnsCreateRefreshFunc(sess *vpcv1.VpcV1, vpcid, id string) resource.StateRefreshFunc { +func isVpcDnsCreateRefreshFunc(sess *vpcv1.VpcV1, vpcid, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getVPCDnsResolutionBindingOptions := &vpcv1.GetVPCDnsResolutionBindingOptions{} diff --git a/ibm/service/vpc/resource_ibm_is_vpc_dns_resolution_binding_test.go b/ibm/service/vpc/resource_ibm_is_vpc_dns_resolution_binding_test.go index c4dad92fb4..bff0f3f0e8 100644 --- a/ibm/service/vpc/resource_ibm_is_vpc_dns_resolution_binding_test.go +++ b/ibm/service/vpc/resource_ibm_is_vpc_dns_resolution_binding_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) diff --git a/ibm/service/vpc/resource_ibm_is_vpc_routing_table_route_test.go b/ibm/service/vpc/resource_ibm_is_vpc_routing_table_route_test.go index 4ce678bd24..c02dfd663e 100644 --- a/ibm/service/vpc/resource_ibm_is_vpc_routing_table_route_test.go +++ b/ibm/service/vpc/resource_ibm_is_vpc_routing_table_route_test.go @@ -11,9 +11,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISVPCRoutingTableRoute_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_vpc_routing_table_test.go b/ibm/service/vpc/resource_ibm_is_vpc_routing_table_test.go index 91e876d6a9..e81e0cdbfa 100644 --- a/ibm/service/vpc/resource_ibm_is_vpc_routing_table_test.go +++ b/ibm/service/vpc/resource_ibm_is_vpc_routing_table_test.go @@ -11,9 +11,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISVPCRoutingTable_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_vpc_test.go b/ibm/service/vpc/resource_ibm_is_vpc_test.go index 5468af48d1..551ecb1f49 100644 --- a/ibm/service/vpc/resource_ibm_is_vpc_test.go +++ b/ibm/service/vpc/resource_ibm_is_vpc_test.go @@ -12,9 +12,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISVPC_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_vpn_gateway.go b/ibm/service/vpc/resource_ibm_is_vpn_gateway.go index 96a617ff0f..b090548808 100644 --- a/ibm/service/vpc/resource_ibm_is_vpn_gateway.go +++ b/ibm/service/vpc/resource_ibm_is_vpn_gateway.go @@ -14,7 +14,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/IBM/vpc-go-sdk/vpcv1" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -453,7 +453,7 @@ func vpngwCreate(d *schema.ResourceData, meta interface{}, name, subnetID, mode func isWaitForVpnGatewayAvailable(vpnGateway *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for vpn gateway (%s) to be available.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isVPNGatewayProvisioning}, Target: []string{isVPNGatewayProvisioningDone, ""}, Refresh: isVpnGatewayRefreshFunc(vpnGateway, id), @@ -465,7 +465,7 @@ func isWaitForVpnGatewayAvailable(vpnGateway *vpcv1.VpcV1, id string, timeout ti return stateConf.WaitForState() } -func isVpnGatewayRefreshFunc(vpnGateway *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isVpnGatewayRefreshFunc(vpnGateway *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getVpnGatewayOptions := &vpcv1.GetVPNGatewayOptions{ ID: &id, @@ -721,7 +721,7 @@ func vpngwDelete(d *schema.ResourceData, meta interface{}, id string) error { func isWaitForVpnGatewayDeleted(vpnGateway *vpcv1.VpcV1, id string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for VPNGateway (%s) to be deleted.", id) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isVPNGatewayDeleting}, Target: []string{isVPNGatewayDeleted, ""}, Refresh: isVpnGatewayDeleteRefreshFunc(vpnGateway, id), @@ -733,7 +733,7 @@ func isWaitForVpnGatewayDeleted(vpnGateway *vpcv1.VpcV1, id string, timeout time return stateConf.WaitForState() } -func isVpnGatewayDeleteRefreshFunc(vpnGateway *vpcv1.VpcV1, id string) resource.StateRefreshFunc { +func isVpnGatewayDeleteRefreshFunc(vpnGateway *vpcv1.VpcV1, id string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getVpnGatewayOptions := &vpcv1.GetVPNGatewayOptions{ ID: &id, diff --git a/ibm/service/vpc/resource_ibm_is_vpn_gateway_connection_test.go b/ibm/service/vpc/resource_ibm_is_vpn_gateway_connection_test.go index 296d08a5a3..e449a30d78 100644 --- a/ibm/service/vpc/resource_ibm_is_vpn_gateway_connection_test.go +++ b/ibm/service/vpc/resource_ibm_is_vpn_gateway_connection_test.go @@ -13,9 +13,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISVPNGatewayConnection_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_vpn_gateway_connections.go b/ibm/service/vpc/resource_ibm_is_vpn_gateway_connections.go index 8f1bdf19a5..32db01da62 100644 --- a/ibm/service/vpc/resource_ibm_is_vpn_gateway_connections.go +++ b/ibm/service/vpc/resource_ibm_is_vpn_gateway_connections.go @@ -13,7 +13,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/IBM/go-sdk-core/v5/core" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -895,7 +895,7 @@ func vpngwconDelete(d *schema.ResourceData, meta interface{}, gID, gConnID strin func isWaitForVPNGatewayConnectionDeleted(vpnGatewayConnection *vpcv1.VpcV1, gID, gConnID string, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for VPNGatewayConnection (%s) to be deleted.", gConnID) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isVPNGatewayConnectionDeleting}, Target: []string{"", isVPNGatewayConnectionDeleted}, Refresh: isVPNGatewayConnectionDeleteRefreshFunc(vpnGatewayConnection, gID, gConnID), @@ -907,7 +907,7 @@ func isWaitForVPNGatewayConnectionDeleted(vpnGatewayConnection *vpcv1.VpcV1, gID return stateConf.WaitForState() } -func isVPNGatewayConnectionDeleteRefreshFunc(vpnGatewayConnection *vpcv1.VpcV1, gID, gConnID string) resource.StateRefreshFunc { +func isVPNGatewayConnectionDeleteRefreshFunc(vpnGatewayConnection *vpcv1.VpcV1, gID, gConnID string) retry.StateRefreshFunc { return func() (interface{}, string, error) { getVpnGatewayConnectionOptions := &vpcv1.GetVPNGatewayConnectionOptions{ VPNGatewayID: &gID, diff --git a/ibm/service/vpc/resource_ibm_is_vpn_gateway_test.go b/ibm/service/vpc/resource_ibm_is_vpn_gateway_test.go index 4b68e3e4f8..f6e740663f 100644 --- a/ibm/service/vpc/resource_ibm_is_vpn_gateway_test.go +++ b/ibm/service/vpc/resource_ibm_is_vpn_gateway_test.go @@ -13,9 +13,9 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM/vpc-go-sdk/vpcv1" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccIBMISVPNGateway_basic(t *testing.T) { diff --git a/ibm/service/vpc/resource_ibm_is_vpn_server.go b/ibm/service/vpc/resource_ibm_is_vpn_server.go index 5c6713d25a..78d92d2556 100644 --- a/ibm/service/vpc/resource_ibm_is_vpn_server.go +++ b/ibm/service/vpc/resource_ibm_is_vpn_server.go @@ -13,7 +13,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM/go-sdk-core/v5/core" @@ -579,7 +579,7 @@ func resourceIBMIsVPNServerCreate(context context.Context, d *schema.ResourceDat func isWaitForVPNServerStable(context context.Context, sess *vpcv1.VpcV1, d *schema.ResourceData, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for VPN Server(%s) to be stable.", d.Id()) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isVPNServerStatusPending, isVPNServerStatusUpdating}, Target: []string{isVPNServerStatusStable, isVPNServerStatusFailed}, Refresh: func() (interface{}, string, error) { @@ -1015,7 +1015,7 @@ func resourceIBMIsVPNServerDelete(context context.Context, d *schema.ResourceDat func isWaitForVPNServerDeleted(context context.Context, sess *vpcv1.VpcV1, d *schema.ResourceData) (interface{}, error) { log.Printf("Waiting for VPN Server (%s) to be deleted.", d.Id()) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isVPNServerStatusDeleting}, Target: []string{isVPNServerStatusDeleted, isVPNServerStatusFailed}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/vpc/resource_ibm_is_vpn_server_route.go b/ibm/service/vpc/resource_ibm_is_vpn_server_route.go index 95ce9764cd..5dcc60c674 100644 --- a/ibm/service/vpc/resource_ibm_is_vpn_server_route.go +++ b/ibm/service/vpc/resource_ibm_is_vpn_server_route.go @@ -13,7 +13,7 @@ import ( "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" "github.com/IBM/go-sdk-core/v5/core" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/IBM/vpc-go-sdk/vpcv1" @@ -224,7 +224,7 @@ func resourceIBMIsVPNServerRouteCreate(context context.Context, d *schema.Resour func isWaitForVPNServerRouteStable(context context.Context, sess *vpcv1.VpcV1, d *schema.ResourceData, timeout time.Duration) (interface{}, error) { log.Printf("Waiting for VPN Server Route(%s) to be stable.", d.Id()) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{isVPNServerStatusPending, isVPNServerRouteStatusUpdating}, Target: []string{isVPNServerStatusStable, isVPNServerRouteStatusFailed}, Refresh: func() (interface{}, string, error) { @@ -402,7 +402,7 @@ func resourceIBMIsVPNServerRouteDelete(context context.Context, d *schema.Resour func isWaitForVPNServerRouteDeleted(context context.Context, sess *vpcv1.VpcV1, d *schema.ResourceData) (interface{}, error) { log.Printf("Waiting for VPN Server Route(%s) to be deleted.", d.Id()) - stateConf := &resource.StateChangeConf{ + stateConf := &retry.StateChangeConf{ Pending: []string{"retry", isVPNServerRouteStatusDeleting}, Target: []string{isVPNServerStatusDeleted, isVPNServerRouteStatusFailed}, Refresh: func() (interface{}, string, error) { diff --git a/ibm/service/vpc/resource_ibm_is_vpn_server_route_test.go b/ibm/service/vpc/resource_ibm_is_vpn_server_route_test.go index 8c7c207493..f50b45a400 100644 --- a/ibm/service/vpc/resource_ibm_is_vpn_server_route_test.go +++ b/ibm/service/vpc/resource_ibm_is_vpn_server_route_test.go @@ -10,9 +10,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/vpc-go-sdk/vpcv1" ) diff --git a/ibm/service/vpc/resource_ibm_is_vpn_server_test.go b/ibm/service/vpc/resource_ibm_is_vpn_server_test.go index b7f049292a..bd15c9a67f 100644 --- a/ibm/service/vpc/resource_ibm_is_vpn_server_test.go +++ b/ibm/service/vpc/resource_ibm_is_vpn_server_test.go @@ -9,9 +9,9 @@ import ( acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/IBM/vpc-go-sdk/vpcv1" ) diff --git a/ibm/service/vpc/test-fixtures/.ssh/id_ed25519 b/ibm/service/vpc/test-fixtures/.ssh/id_ed25519 new file mode 100644 index 0000000000..c991ded01c --- /dev/null +++ b/ibm/service/vpc/test-fixtures/.ssh/id_ed25519 @@ -0,0 +1,3 @@ +-----BEGIN PRIVATE KEY----- +MC4CAQAwBQYDK2VwBCIEIO5Ob4Wv9q340DEsLF4KsRl/Pp7DF4GZO/fRUQG9i1/B +-----END PRIVATE KEY----- diff --git a/ibm/service/vpc/test-fixtures/.ssh/id_ed25519.pub b/ibm/service/vpc/test-fixtures/.ssh/id_ed25519.pub new file mode 100644 index 0000000000..3b75c4c5c6 --- /dev/null +++ b/ibm/service/vpc/test-fixtures/.ssh/id_ed25519.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEVFN/QSQyuV1Pv2DKYz68d1Ifs38lhPybeYpAvXI5Jo diff --git a/main.go b/main.go index a3769d67d0..42def0e8e5 100644 --- a/main.go +++ b/main.go @@ -1,16 +1,59 @@ package main import ( + "context" + "flag" "log" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/provider" "github.com/IBM-Cloud/terraform-provider-ibm/version" - "github.com/hashicorp/terraform-plugin-sdk/v2/plugin" + "github.com/hashicorp/terraform-plugin-framework/providerserver" + "github.com/hashicorp/terraform-plugin-go/tfprotov6" + "github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server" + "github.com/hashicorp/terraform-plugin-mux/tf5to6server" + "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" ) func main() { log.Println("IBM Cloud Provider version", version.Version, version.VersionPrerelease, version.GitCommit) - plugin.Serve(&plugin.ServeOpts{ - ProviderFunc: provider.Provider, - }) + var debugMode bool + flag.BoolVar(&debugMode, "debug", false, "set to true to run the provider with support for debuggers like delve") + flag.Parse() + + ctx := context.Background() + + upgradedSdkServer, err := tf5to6server.UpgradeServer( + ctx, + provider.New(version.Version)().GRPCProvider, + ) + if err != nil { + log.Fatal(err) + } + + frameworkServer := providerserver.NewProtocol6(provider.NewFrameworkProvider(version.Version)()) + + muxServer, err := tf6muxserver.NewMuxServer( + ctx, + func() tfprotov6.ProviderServer { return upgradedSdkServer }, + frameworkServer, + ) + if err != nil { + log.Fatal(err) + } + + var serveOpts []tf6server.ServeOpt + + if debugMode { + serveOpts = append(serveOpts, tf6server.WithManagedDebug()) + } + + err = tf6server.Serve( + "registry.terraform.io/IBM-Cloud/ibm", + muxServer.ProviderServer, + serveOpts..., + ) + if err != nil { + log.Fatal(err) + } + }