Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
r/aws_redshift_cluster: allow snapshot_copy modifications (#36655)
This change fixes an issue preventing clusters with the `snapshot_copy` block configured from updating any nested arguments. Before: ```console % make testacc PKG=redshift TESTS=TestAccRedshiftCluster_snapshotCopy ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.21.8 test ./internal/service/redshift/... -v -count 1 -parallel 20 -run='TestAccRedshiftCluster_snapshotCopy' -timeout 360m === RUN TestAccRedshiftCluster_snapshotCopy === PAUSE TestAccRedshiftCluster_snapshotCopy === CONT TestAccRedshiftCluster_snapshotCopy cluster_test.go:311: Step 2/3 error: Error running apply: exit status 1 Error: updating Redshift Cluster (tf-acc-test-3261690877562655687) snapshot_copy: enabling snapshot copy: SnapshotCopyAlreadyEnabledFault: Snapshot Copy is already enabled on Cluster tf-acc-test-3261690877562655687 status code: 400, request id: cf5d914b-3146-4a66-8335-a44153800324 with aws_redshift_cluster.test, on terraform_plugin_test.tf line 33, in resource aws_redshift_cluster test: 33: resource aws_redshift_cluster test { --- FAIL: TestAccRedshiftCluster_snapshotCopy (428.46s) FAIL FAIL github.com/hashicorp/terraform-provider-aws/internal/service/redshift 434.035s FAIL make: *** [testacc] Error 1 ``` After: ```console % make testacc PKG=redshift TESTS=TestAccRedshiftCluster_snapshotCopy ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.21.8 test ./internal/service/redshift/... -v -count 1 -parallel 20 -run='TestAccRedshiftCluster_snapshotCopy' -timeout 360m === RUN TestAccRedshiftCluster_snapshotCopy === PAUSE TestAccRedshiftCluster_snapshotCopy === CONT TestAccRedshiftCluster_snapshotCopy --- PASS: TestAccRedshiftCluster_snapshotCopy (431.00s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/redshift 436.505s ``` ```console % make testacc PKG=redshift TESTS=TestAccRedshiftCluster_ ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.21.8 test ./internal/service/redshift/... -v -count 1 -parallel 20 -run='TestAccRedshiftCluster_' -timeout 360m --- PASS: TestAccRedshiftCluster_availabilityZoneRelocation_publiclyAccessible (382.40s) === CONT TestAccRedshiftCluster_disappears --- PASS: TestAccRedshiftCluster_changeAvailabilityZone_availabilityZoneRelocationNotSet (382.71s) === CONT TestAccRedshiftCluster_withFinalSnapshot --- PASS: TestAccRedshiftCluster_basic (418.72s) === CONT TestAccRedshiftCluster_aqua --- PASS: TestAccRedshiftCluster_kmsKey (432.77s) === CONT TestAccRedshiftCluster_loggingEnabled --- PASS: TestAccRedshiftCluster_availabilityZoneRelocation (444.95s) === CONT TestAccRedshiftCluster_enhancedVPCRoutingEnabled --- PASS: TestAccRedshiftCluster_manageMasterPassword (450.88s) --- PASS: TestAccRedshiftCluster_publiclyAccessible (452.54s) --- PASS: TestAccRedshiftCluster_iamRoles (459.36s) --- PASS: TestAccRedshiftCluster_snapshotCopy (460.15s) --- PASS: TestAccRedshiftCluster_tags (551.91s) --- PASS: TestAccRedshiftCluster_changeAvailabilityZoneAndSetAvailabilityZoneRelocation (766.95s) --- PASS: TestAccRedshiftCluster_changeAvailabilityZone (767.07s) --- PASS: TestAccRedshiftCluster_disappears (416.75s) --- PASS: TestAccRedshiftCluster_withFinalSnapshot (463.58s) --- PASS: TestAccRedshiftCluster_loggingEnabled (446.24s) --- PASS: TestAccRedshiftCluster_forceNewUsername (902.68s) --- PASS: TestAccRedshiftCluster_multiAZ (944.06s) --- PASS: TestAccRedshiftCluster_aqua (529.97s) --- PASS: TestAccRedshiftCluster_restoreFromSnapshotARN (1011.97s) --- PASS: TestAccRedshiftCluster_restoreFromSnapshot (1044.51s) --- PASS: TestAccRedshiftCluster_enhancedVPCRoutingEnabled (623.74s) --- PASS: TestAccRedshiftCluster_updateNodeCount (1314.86s) --- PASS: TestAccRedshiftCluster_changeEncryption2 (1351.20s) --- PASS: TestAccRedshiftCluster_changeEncryption1 (1489.08s) --- PASS: TestAccRedshiftCluster_updateNodeType (1531.73s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/redshift 1537.226s ```
- Loading branch information