Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

r/aws_rds_cluster: Fix InvalidDBClusterStateFault errors when deleting clusters that are members of a global cluster #40333

Merged
merged 15 commits into from
Dec 5, 2024

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Nov 27, 2024

Description

When an RDS DB Cluster is removed from a Global Cluster it is in promoting state for a while.
If an attempt to delete the DB Cluster (with a final snapshot) is made while it is in this state, the InvalidDBClusterStateFault: Can't create a snapshot because the database cluster ... isn't currently in the available state error is raised.
Address this by waiting for the DB Cluster to become available after removal from the Global Cluster.

Relations

Closes #39909.

Output from Acceptance Testing

% ACCTEST_TIMEOUT=720m make testacc TESTARGS='-run=TestAccRDSGlobalCluster_' PKG=rds ACCTEST_PARALLELISM=4
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/rds/... -v -count 1 -parallel 4  -run=TestAccRDSGlobalCluster_ -timeout 720m
2024/12/04 14:58:03 Initializing Terraform AWS Provider...
=== RUN   TestAccRDSGlobalCluster_basic
=== PAUSE TestAccRDSGlobalCluster_basic
=== RUN   TestAccRDSGlobalCluster_disappears
=== PAUSE TestAccRDSGlobalCluster_disappears
=== RUN   TestAccRDSGlobalCluster_databaseName
=== PAUSE TestAccRDSGlobalCluster_databaseName
=== RUN   TestAccRDSGlobalCluster_deletionProtection
=== PAUSE TestAccRDSGlobalCluster_deletionProtection
=== RUN   TestAccRDSGlobalCluster_engineLifecycleSupport_disabled
=== PAUSE TestAccRDSGlobalCluster_engineLifecycleSupport_disabled
=== RUN   TestAccRDSGlobalCluster_EngineVersion_updateMinor
=== PAUSE TestAccRDSGlobalCluster_EngineVersion_updateMinor
=== RUN   TestAccRDSGlobalCluster_EngineVersion_updateMajor
=== PAUSE TestAccRDSGlobalCluster_EngineVersion_updateMajor
=== RUN   TestAccRDSGlobalCluster_EngineVersion_updateMinorMultiRegion
=== PAUSE TestAccRDSGlobalCluster_EngineVersion_updateMinorMultiRegion
=== RUN   TestAccRDSGlobalCluster_EngineVersion_updateMajorMultiRegion
=== PAUSE TestAccRDSGlobalCluster_EngineVersion_updateMajorMultiRegion
=== RUN   TestAccRDSGlobalCluster_EngineVersion_auroraMySQL
=== PAUSE TestAccRDSGlobalCluster_EngineVersion_auroraMySQL
=== RUN   TestAccRDSGlobalCluster_EngineVersion_auroraPostgreSQL
=== PAUSE TestAccRDSGlobalCluster_EngineVersion_auroraPostgreSQL
=== RUN   TestAccRDSGlobalCluster_forceDestroy
=== PAUSE TestAccRDSGlobalCluster_forceDestroy
=== RUN   TestAccRDSGlobalCluster_sourceDBClusterIdentifier
=== PAUSE TestAccRDSGlobalCluster_sourceDBClusterIdentifier
=== RUN   TestAccRDSGlobalCluster_SourceDBClusterIdentifier_storageEncrypted
=== PAUSE TestAccRDSGlobalCluster_SourceDBClusterIdentifier_storageEncrypted
=== RUN   TestAccRDSGlobalCluster_storageEncrypted
=== PAUSE TestAccRDSGlobalCluster_storageEncrypted
=== CONT  TestAccRDSGlobalCluster_basic
=== CONT  TestAccRDSGlobalCluster_EngineVersion_updateMajorMultiRegion
=== CONT  TestAccRDSGlobalCluster_sourceDBClusterIdentifier
=== CONT  TestAccRDSGlobalCluster_engineLifecycleSupport_disabled
--- PASS: TestAccRDSGlobalCluster_basic (14.80s)
=== CONT  TestAccRDSGlobalCluster_storageEncrypted
--- PASS: TestAccRDSGlobalCluster_engineLifecycleSupport_disabled (15.97s)
=== CONT  TestAccRDSGlobalCluster_SourceDBClusterIdentifier_storageEncrypted
--- PASS: TestAccRDSGlobalCluster_storageEncrypted (23.34s)
=== CONT  TestAccRDSGlobalCluster_EngineVersion_auroraPostgreSQL
--- PASS: TestAccRDSGlobalCluster_EngineVersion_auroraPostgreSQL (15.33s)
=== CONT  TestAccRDSGlobalCluster_forceDestroy
--- PASS: TestAccRDSGlobalCluster_forceDestroy (11.60s)
=== CONT  TestAccRDSGlobalCluster_databaseName
    global_cluster_test.go:169: Step 3/3 error: Error running apply: exit status 1
        
        Error: creating RDS Global Cluster (tf-acc-test-4661037672474888664): operation error RDS: CreateGlobalCluster, https response error StatusCode: 400, RequestID: e093fa03-bf92-4f42-8590-9b16c8aa7e5f, GlobalClusterAlreadyExistsFault: Global cluster tf-acc-test-4661037672474888664 already exists
        
          with aws_rds_global_cluster.test,
          on terraform_plugin_test.tf line 12, in resource "aws_rds_global_cluster" "test":
          12: resource "aws_rds_global_cluster" "test" {
        
--- FAIL: TestAccRDSGlobalCluster_databaseName (16.02s)
=== CONT  TestAccRDSGlobalCluster_deletionProtection
--- PASS: TestAccRDSGlobalCluster_deletionProtection (53.68s)
=== CONT  TestAccRDSGlobalCluster_EngineVersion_auroraMySQL
--- PASS: TestAccRDSGlobalCluster_EngineVersion_auroraMySQL (16.49s)
=== CONT  TestAccRDSGlobalCluster_disappears
--- PASS: TestAccRDSGlobalCluster_disappears (13.36s)
=== CONT  TestAccRDSGlobalCluster_EngineVersion_updateMajor
--- PASS: TestAccRDSGlobalCluster_sourceDBClusterIdentifier (220.11s)
=== CONT  TestAccRDSGlobalCluster_EngineVersion_updateMinorMultiRegion
--- PASS: TestAccRDSGlobalCluster_SourceDBClusterIdentifier_storageEncrypted (209.36s)
=== CONT  TestAccRDSGlobalCluster_EngineVersion_updateMinor
--- PASS: TestAccRDSGlobalCluster_EngineVersion_updateMinor (1546.66s)
--- PASS: TestAccRDSGlobalCluster_EngineVersion_updateMajor (1837.24s)
--- PASS: TestAccRDSGlobalCluster_EngineVersion_updateMinorMultiRegion (3461.30s)
--- PASS: TestAccRDSGlobalCluster_EngineVersion_updateMajorMultiRegion (3932.46s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/rds	3937.663s
FAIL
make: *** [testacc] Error 1

Failure is unrelated to this change and is occurring in CI:

=== RUN   TestAccRDSGlobalCluster_databaseName
=== PAUSE TestAccRDSGlobalCluster_databaseName
=== CONT  TestAccRDSGlobalCluster_databaseName
    global_cluster_test.go:169: Step 3/3 error: Error running apply: exit status 1
        Error: creating RDS Global Cluster (tf-acc-test-1291545954286344066): operation error RDS: CreateGlobalCluster, https response error StatusCode: 400, RequestID: 2a905d2d-607c-444a-a320-4fae5aef64e5, GlobalClusterAlreadyExistsFault: Global cluster tf-acc-test-1291545954286344066 already exists
          with aws_rds_global_cluster.test,
          on terraform_plugin_test.tf line 12, in resource "aws_rds_global_cluster" "test":
          12: resource "aws_rds_global_cluster" "test" {
--- FAIL: TestAccRDSGlobalCluster_databaseName (190.77s)
% ACCTEST_TIMEOUT=720m make testacc TESTARGS='-run=TestAccRDSCluster_' PKG=rds ACCTEST_PARALLELISM=4  
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/rds/... -v -count 1 -parallel 4  -run=TestAccRDSCluster_ -timeout 720m
2024/12/04 16:22:06 Initializing Terraform AWS Provider...
=== RUN   TestAccRDSCluster_basic
=== PAUSE TestAccRDSCluster_basic
=== RUN   TestAccRDSCluster_disappears
=== PAUSE TestAccRDSCluster_disappears
=== RUN   TestAccRDSCluster_identifierGenerated
=== PAUSE TestAccRDSCluster_identifierGenerated
=== RUN   TestAccRDSCluster_identifierPrefix
=== PAUSE TestAccRDSCluster_identifierPrefix
=== RUN   TestAccRDSCluster_tags
=== PAUSE TestAccRDSCluster_tags
=== RUN   TestAccRDSCluster_securityGroupUpdate
=== PAUSE TestAccRDSCluster_securityGroupUpdate
=== RUN   TestAccRDSCluster_allowMajorVersionUpgrade
=== PAUSE TestAccRDSCluster_allowMajorVersionUpgrade
=== RUN   TestAccRDSCluster_allowMajorVersionUpgradeNoApplyImmediately
=== PAUSE TestAccRDSCluster_allowMajorVersionUpgradeNoApplyImmediately
=== RUN   TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParametersApplyImm
=== PAUSE TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParametersApplyImm
=== RUN   TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParameters
=== PAUSE TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParameters
=== RUN   TestAccRDSCluster_onlyMajorVersion
=== PAUSE TestAccRDSCluster_onlyMajorVersion
=== RUN   TestAccRDSCluster_minorVersion
=== PAUSE TestAccRDSCluster_minorVersion
=== RUN   TestAccRDSCluster_availabilityZones
=== PAUSE TestAccRDSCluster_availabilityZones
=== RUN   TestAccRDSCluster_availabilityZones_caCertificateIdentifier
=== PAUSE TestAccRDSCluster_availabilityZones_caCertificateIdentifier
=== RUN   TestAccRDSCluster_storageTypeIo1
=== PAUSE TestAccRDSCluster_storageTypeIo1
=== RUN   TestAccRDSCluster_storageTypeIo2
=== PAUSE TestAccRDSCluster_storageTypeIo2
=== RUN   TestAccRDSCluster_storageTypeGeneralPurposeToProvisionedIOPS
=== PAUSE TestAccRDSCluster_storageTypeGeneralPurposeToProvisionedIOPS
=== RUN   TestAccRDSCluster_storageTypeAuroraReturnsBlank
=== PAUSE TestAccRDSCluster_storageTypeAuroraReturnsBlank
=== RUN   TestAccRDSCluster_storageTypeAuroraIopt1
=== PAUSE TestAccRDSCluster_storageTypeAuroraIopt1
=== RUN   TestAccRDSCluster_storageTypeAuroraUpdateAuroraIopt1
=== PAUSE TestAccRDSCluster_storageTypeAuroraUpdateAuroraIopt1
=== RUN   TestAccRDSCluster_allocatedStorage
=== PAUSE TestAccRDSCluster_allocatedStorage
=== RUN   TestAccRDSCluster_storageTypeAuroraIopt1UpdateAurora
=== PAUSE TestAccRDSCluster_storageTypeAuroraIopt1UpdateAurora
=== RUN   TestAccRDSCluster_iops
=== PAUSE TestAccRDSCluster_iops
=== RUN   TestAccRDSCluster_dbClusterInstanceClass
=== PAUSE TestAccRDSCluster_dbClusterInstanceClass
=== RUN   TestAccRDSCluster_backtrackWindow
=== PAUSE TestAccRDSCluster_backtrackWindow
=== RUN   TestAccRDSCluster_dbSubnetGroupName
=== PAUSE TestAccRDSCluster_dbSubnetGroupName
=== RUN   TestAccRDSCluster_pointInTimeRestore
=== PAUSE TestAccRDSCluster_pointInTimeRestore
=== RUN   TestAccRDSCluster_pointInTimeRestoreViaResourceID
=== PAUSE TestAccRDSCluster_pointInTimeRestoreViaResourceID
=== RUN   TestAccRDSCluster_PointInTimeRestore_enabledCloudWatchLogsExports
=== PAUSE TestAccRDSCluster_PointInTimeRestore_enabledCloudWatchLogsExports
=== RUN   TestAccRDSCluster_takeFinalSnapshot
=== PAUSE TestAccRDSCluster_takeFinalSnapshot
=== RUN   TestAccRDSCluster_GlobalClusterIdentifierTakeFinalSnapshot
=== PAUSE TestAccRDSCluster_GlobalClusterIdentifierTakeFinalSnapshot
=== RUN   TestAccRDSCluster_missingUserNameCausesError
=== PAUSE TestAccRDSCluster_missingUserNameCausesError
=== RUN   TestAccRDSCluster_domain
=== PAUSE TestAccRDSCluster_domain
=== RUN   TestAccRDSCluster_EnabledCloudWatchLogsExports_mySQL
=== PAUSE TestAccRDSCluster_EnabledCloudWatchLogsExports_mySQL
=== RUN   TestAccRDSCluster_EnabledCloudWatchLogsExports_postgresql
=== PAUSE TestAccRDSCluster_EnabledCloudWatchLogsExports_postgresql
=== RUN   TestAccRDSCluster_updateIAMRoles
=== PAUSE TestAccRDSCluster_updateIAMRoles
=== RUN   TestAccRDSCluster_kmsKey
=== PAUSE TestAccRDSCluster_kmsKey
=== RUN   TestAccRDSCluster_networkType
=== PAUSE TestAccRDSCluster_networkType
=== RUN   TestAccRDSCluster_encrypted
=== PAUSE TestAccRDSCluster_encrypted
=== RUN   TestAccRDSCluster_copyTagsToSnapshot
=== PAUSE TestAccRDSCluster_copyTagsToSnapshot
=== RUN   TestAccRDSCluster_copyTagsToSnapshot_restorePointInTime
=== PAUSE TestAccRDSCluster_copyTagsToSnapshot_restorePointInTime
=== RUN   TestAccRDSCluster_ReplicationSourceIdentifier_promote
=== PAUSE TestAccRDSCluster_ReplicationSourceIdentifier_promote
=== RUN   TestAccRDSCluster_ReplicationSourceIdentifier_kmsKeyID
=== PAUSE TestAccRDSCluster_ReplicationSourceIdentifier_kmsKeyID
=== RUN   TestAccRDSCluster_backupsUpdate
=== PAUSE TestAccRDSCluster_backupsUpdate
=== RUN   TestAccRDSCluster_iamAuth
=== PAUSE TestAccRDSCluster_iamAuth
=== RUN   TestAccRDSCluster_deletionProtection
=== PAUSE TestAccRDSCluster_deletionProtection
=== RUN   TestAccRDSCluster_engineMode
=== PAUSE TestAccRDSCluster_engineMode
=== RUN   TestAccRDSCluster_engineVersion
=== PAUSE TestAccRDSCluster_engineVersion
=== RUN   TestAccRDSCluster_engineVersionWithPrimaryInstance
=== PAUSE TestAccRDSCluster_engineVersionWithPrimaryInstance
=== RUN   TestAccRDSCluster_GlobalClusterIdentifierEngineMode_global
=== PAUSE TestAccRDSCluster_GlobalClusterIdentifierEngineMode_global
=== RUN   TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_add
=== PAUSE TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_add
=== RUN   TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_remove
=== PAUSE TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_remove
=== RUN   TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_update
=== PAUSE TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_update
=== RUN   TestAccRDSCluster_GlobalClusterIdentifierEngineMode_provisioned
=== PAUSE TestAccRDSCluster_GlobalClusterIdentifierEngineMode_provisioned
=== RUN   TestAccRDSCluster_GlobalClusterIdentifier_primarySecondaryClusters
=== PAUSE TestAccRDSCluster_GlobalClusterIdentifier_primarySecondaryClusters
=== RUN   TestAccRDSCluster_GlobalClusterIdentifier_replicationSourceIdentifier
=== PAUSE TestAccRDSCluster_GlobalClusterIdentifier_replicationSourceIdentifier
=== RUN   TestAccRDSCluster_GlobalClusterIdentifier_secondaryClustersWriteForwarding
=== PAUSE TestAccRDSCluster_GlobalClusterIdentifier_secondaryClustersWriteForwarding
=== RUN   TestAccRDSCluster_ManagedMasterPassword_managed
=== PAUSE TestAccRDSCluster_ManagedMasterPassword_managed
=== RUN   TestAccRDSCluster_ManagedMasterPassword_managedSpecificKMSKey
=== PAUSE TestAccRDSCluster_ManagedMasterPassword_managedSpecificKMSKey
=== RUN   TestAccRDSCluster_ManagedMasterPassword_convertToManaged
=== PAUSE TestAccRDSCluster_ManagedMasterPassword_convertToManaged
=== RUN   TestAccRDSCluster_port
=== PAUSE TestAccRDSCluster_port
=== RUN   TestAccRDSCluster_scaling
=== PAUSE TestAccRDSCluster_scaling
=== RUN   TestAccRDSCluster_serverlessV2ScalingConfiguration
=== PAUSE TestAccRDSCluster_serverlessV2ScalingConfiguration
=== RUN   TestAccRDSCluster_Scaling_defaultMinCapacity
=== PAUSE TestAccRDSCluster_Scaling_defaultMinCapacity
=== RUN   TestAccRDSCluster_snapshotIdentifier
=== PAUSE TestAccRDSCluster_snapshotIdentifier
=== RUN   TestAccRDSCluster_SnapshotIdentifier_deletionProtection
=== PAUSE TestAccRDSCluster_SnapshotIdentifier_deletionProtection
=== RUN   TestAccRDSCluster_SnapshotIdentifierEngineMode_provisioned
=== PAUSE TestAccRDSCluster_SnapshotIdentifierEngineMode_provisioned
=== RUN   TestAccRDSCluster_SnapshotIdentifierEngineMode_serverless
    cluster_test.go:2255: serverless does not support snapshot restore on an empty volume
--- SKIP: TestAccRDSCluster_SnapshotIdentifierEngineMode_serverless (0.00s)
=== RUN   TestAccRDSCluster_SnapshotIdentifierEngineVersion_different
=== PAUSE TestAccRDSCluster_SnapshotIdentifierEngineVersion_different
=== RUN   TestAccRDSCluster_SnapshotIdentifierEngineVersion_equal
=== PAUSE TestAccRDSCluster_SnapshotIdentifierEngineVersion_equal
=== RUN   TestAccRDSCluster_SnapshotIdentifier_kmsKeyID
=== PAUSE TestAccRDSCluster_SnapshotIdentifier_kmsKeyID
=== RUN   TestAccRDSCluster_SnapshotIdentifier_masterPassword
=== PAUSE TestAccRDSCluster_SnapshotIdentifier_masterPassword
=== RUN   TestAccRDSCluster_SnapshotIdentifier_masterUsername
=== PAUSE TestAccRDSCluster_SnapshotIdentifier_masterUsername
=== RUN   TestAccRDSCluster_SnapshotIdentifier_preferredBackupWindow
=== PAUSE TestAccRDSCluster_SnapshotIdentifier_preferredBackupWindow
=== RUN   TestAccRDSCluster_SnapshotIdentifier_preferredMaintenanceWindow
=== PAUSE TestAccRDSCluster_SnapshotIdentifier_preferredMaintenanceWindow
=== RUN   TestAccRDSCluster_SnapshotIdentifier_tags
=== PAUSE TestAccRDSCluster_SnapshotIdentifier_tags
=== RUN   TestAccRDSCluster_SnapshotIdentifier_vpcSecurityGroupIDs
=== PAUSE TestAccRDSCluster_SnapshotIdentifier_vpcSecurityGroupIDs
=== RUN   TestAccRDSCluster_SnapshotIdentifierVPCSecurityGroupIDs_tags
=== PAUSE TestAccRDSCluster_SnapshotIdentifierVPCSecurityGroupIDs_tags
=== RUN   TestAccRDSCluster_SnapshotIdentifier_encryptedRestore
=== PAUSE TestAccRDSCluster_SnapshotIdentifier_encryptedRestore
=== RUN   TestAccRDSCluster_enableHTTPEndpoint
=== PAUSE TestAccRDSCluster_enableHTTPEndpoint
=== RUN   TestAccRDSCluster_enableHTTPEndpointProvisioned
=== PAUSE TestAccRDSCluster_enableHTTPEndpointProvisioned
=== RUN   TestAccRDSCluster_password
=== PAUSE TestAccRDSCluster_password
=== RUN   TestAccRDSCluster_NoDeleteAutomatedBackups
=== PAUSE TestAccRDSCluster_NoDeleteAutomatedBackups
=== RUN   TestAccRDSCluster_engineLifecycleSupport_disabled
=== PAUSE TestAccRDSCluster_engineLifecycleSupport_disabled
=== RUN   TestAccRDSCluster_performanceInsightsEnabled
=== PAUSE TestAccRDSCluster_performanceInsightsEnabled
=== RUN   TestAccRDSCluster_performanceInsightsKMSKeyID
=== PAUSE TestAccRDSCluster_performanceInsightsKMSKeyID
=== RUN   TestAccRDSCluster_performanceInsightsRetentionPeriod
=== PAUSE TestAccRDSCluster_performanceInsightsRetentionPeriod
=== RUN   TestAccRDSCluster_localWriteForwarding
=== PAUSE TestAccRDSCluster_localWriteForwarding
=== CONT  TestAccRDSCluster_basic
=== CONT  TestAccRDSCluster_iamAuth
=== CONT  TestAccRDSCluster_iops
=== CONT  TestAccRDSCluster_EnabledCloudWatchLogsExports_mySQL
--- PASS: TestAccRDSCluster_basic (95.54s)
=== CONT  TestAccRDSCluster_backupsUpdate
--- PASS: TestAccRDSCluster_iamAuth (102.84s)
=== CONT  TestAccRDSCluster_ReplicationSourceIdentifier_kmsKeyID
--- PASS: TestAccRDSCluster_EnabledCloudWatchLogsExports_mySQL (179.54s)
=== CONT  TestAccRDSCluster_ReplicationSourceIdentifier_promote
--- PASS: TestAccRDSCluster_backupsUpdate (129.90s)
=== CONT  TestAccRDSCluster_copyTagsToSnapshot_restorePointInTime
--- PASS: TestAccRDSCluster_copyTagsToSnapshot_restorePointInTime (336.33s)
=== CONT  TestAccRDSCluster_copyTagsToSnapshot
--- PASS: TestAccRDSCluster_copyTagsToSnapshot (179.05s)
=== CONT  TestAccRDSCluster_encrypted
--- PASS: TestAccRDSCluster_encrypted (103.04s)
=== CONT  TestAccRDSCluster_networkType
--- PASS: TestAccRDSCluster_networkType (209.84s)
=== CONT  TestAccRDSCluster_kmsKey
--- PASS: TestAccRDSCluster_kmsKey (119.12s)
=== CONT  TestAccRDSCluster_updateIAMRoles
--- PASS: TestAccRDSCluster_updateIAMRoles (120.46s)
=== CONT  TestAccRDSCluster_EnabledCloudWatchLogsExports_postgresql
--- PASS: TestAccRDSCluster_iops (1439.25s)
=== CONT  TestAccRDSCluster_SnapshotIdentifierEngineMode_provisioned
--- PASS: TestAccRDSCluster_SnapshotIdentifierEngineMode_provisioned (333.22s)
=== CONT  TestAccRDSCluster_localWriteForwarding
--- PASS: TestAccRDSCluster_localWriteForwarding (105.00s)
=== CONT  TestAccRDSCluster_minorVersion
--- PASS: TestAccRDSCluster_ReplicationSourceIdentifier_kmsKeyID (1963.30s)
=== CONT  TestAccRDSCluster_performanceInsightsRetentionPeriod
--- PASS: TestAccRDSCluster_ReplicationSourceIdentifier_promote (2066.07s)
=== CONT  TestAccRDSCluster_storageTypeAuroraIopt1UpdateAurora
--- PASS: TestAccRDSCluster_storageTypeAuroraIopt1UpdateAurora (142.17s)
=== CONT  TestAccRDSCluster_performanceInsightsKMSKeyID
--- PASS: TestAccRDSCluster_performanceInsightsRetentionPeriod (434.05s)
=== CONT  TestAccRDSCluster_allocatedStorage
--- PASS: TestAccRDSCluster_minorVersion (1057.78s)
=== CONT  TestAccRDSCluster_performanceInsightsEnabled
--- PASS: TestAccRDSCluster_EnabledCloudWatchLogsExports_postgresql (1780.61s)
=== CONT  TestAccRDSCluster_storageTypeAuroraUpdateAuroraIopt1
--- PASS: TestAccRDSCluster_storageTypeAuroraUpdateAuroraIopt1 (153.65s)
=== CONT  TestAccRDSCluster_engineLifecycleSupport_disabled
--- PASS: TestAccRDSCluster_performanceInsightsKMSKeyID (892.35s)
=== CONT  TestAccRDSCluster_storageTypeAuroraIopt1
--- PASS: TestAccRDSCluster_performanceInsightsEnabled (347.29s)
=== CONT  TestAccRDSCluster_NoDeleteAutomatedBackups
--- PASS: TestAccRDSCluster_allocatedStorage (784.43s)
=== CONT  TestAccRDSCluster_storageTypeAuroraReturnsBlank
--- PASS: TestAccRDSCluster_engineLifecycleSupport_disabled (96.68s)
=== CONT  TestAccRDSCluster_password
--- PASS: TestAccRDSCluster_storageTypeAuroraIopt1 (103.26s)
=== CONT  TestAccRDSCluster_storageTypeGeneralPurposeToProvisionedIOPS
--- PASS: TestAccRDSCluster_storageTypeAuroraReturnsBlank (102.78s)
=== CONT  TestAccRDSCluster_enableHTTPEndpointProvisioned
--- PASS: TestAccRDSCluster_password (130.11s)
=== CONT  TestAccRDSCluster_storageTypeIo2
--- PASS: TestAccRDSCluster_enableHTTPEndpointProvisioned (179.78s)
=== CONT  TestAccRDSCluster_enableHTTPEndpoint
--- PASS: TestAccRDSCluster_enableHTTPEndpoint (199.96s)
=== CONT  TestAccRDSCluster_SnapshotIdentifier_encryptedRestore
--- PASS: TestAccRDSCluster_storageTypeIo2 (437.14s)
=== CONT  TestAccRDSCluster_SnapshotIdentifierVPCSecurityGroupIDs_tags
--- PASS: TestAccRDSCluster_SnapshotIdentifierVPCSecurityGroupIDs_tags (285.17s)
=== CONT  TestAccRDSCluster_SnapshotIdentifier_vpcSecurityGroupIDs
--- PASS: TestAccRDSCluster_SnapshotIdentifier_encryptedRestore (182.08s)
=== CONT  TestAccRDSCluster_SnapshotIdentifier_tags
--- PASS: TestAccRDSCluster_SnapshotIdentifier_tags (181.22s)
=== CONT  TestAccRDSCluster_SnapshotIdentifier_preferredMaintenanceWindow
--- PASS: TestAccRDSCluster_SnapshotIdentifier_vpcSecurityGroupIDs (205.13s)
=== CONT  TestAccRDSCluster_SnapshotIdentifier_preferredBackupWindow
--- PASS: TestAccRDSCluster_storageTypeGeneralPurposeToProvisionedIOPS (753.55s)
=== CONT  TestAccRDSCluster_SnapshotIdentifier_masterUsername
--- PASS: TestAccRDSCluster_SnapshotIdentifier_preferredMaintenanceWindow (212.07s)
=== CONT  TestAccRDSCluster_SnapshotIdentifier_masterPassword
--- PASS: TestAccRDSCluster_SnapshotIdentifier_masterUsername (273.57s)
=== CONT  TestAccRDSCluster_SnapshotIdentifier_kmsKeyID
--- PASS: TestAccRDSCluster_SnapshotIdentifier_preferredBackupWindow (323.50s)
=== CONT  TestAccRDSCluster_SnapshotIdentifierEngineVersion_equal
--- PASS: TestAccRDSCluster_SnapshotIdentifier_masterPassword (293.59s)
=== CONT  TestAccRDSCluster_SnapshotIdentifierEngineVersion_different
--- PASS: TestAccRDSCluster_SnapshotIdentifier_kmsKeyID (293.41s)
=== CONT  TestAccRDSCluster_GlobalClusterIdentifier_replicationSourceIdentifier
--- PASS: TestAccRDSCluster_SnapshotIdentifierEngineVersion_equal (279.38s)
=== CONT  TestAccRDSCluster_availabilityZones_caCertificateIdentifier
--- PASS: TestAccRDSCluster_SnapshotIdentifierEngineVersion_different (279.87s)
=== CONT  TestAccRDSCluster_SnapshotIdentifier_deletionProtection
--- PASS: TestAccRDSCluster_availabilityZones_caCertificateIdentifier (198.36s)
=== CONT  TestAccRDSCluster_snapshotIdentifier
--- PASS: TestAccRDSCluster_SnapshotIdentifier_deletionProtection (313.02s)
=== CONT  TestAccRDSCluster_allowMajorVersionUpgrade
--- PASS: TestAccRDSCluster_snapshotIdentifier (333.44s)
=== CONT  TestAccRDSCluster_Scaling_defaultMinCapacity
--- PASS: TestAccRDSCluster_Scaling_defaultMinCapacity (164.08s)
=== CONT  TestAccRDSCluster_onlyMajorVersion
--- PASS: TestAccRDSCluster_allowMajorVersionUpgrade (316.30s)
=== CONT  TestAccRDSCluster_serverlessV2ScalingConfiguration
--- PASS: TestAccRDSCluster_serverlessV2ScalingConfiguration (155.41s)
=== CONT  TestAccRDSCluster_scaling
--- PASS: TestAccRDSCluster_GlobalClusterIdentifier_replicationSourceIdentifier (1044.47s)
=== CONT  TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParameters
--- PASS: TestAccRDSCluster_onlyMajorVersion (319.00s)
=== CONT  TestAccRDSCluster_port
--- PASS: TestAccRDSCluster_scaling (184.16s)
=== CONT  TestAccRDSCluster_ManagedMasterPassword_convertToManaged
--- PASS: TestAccRDSCluster_port (141.05s)
=== CONT  TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParametersApplyImm
--- PASS: TestAccRDSCluster_ManagedMasterPassword_convertToManaged (134.23s)
=== CONT  TestAccRDSCluster_ManagedMasterPassword_managedSpecificKMSKey
--- PASS: TestAccRDSCluster_ManagedMasterPassword_managedSpecificKMSKey (111.69s)
=== CONT  TestAccRDSCluster_ManagedMasterPassword_managed
--- PASS: TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParameters (483.80s)
=== CONT  TestAccRDSCluster_allowMajorVersionUpgradeNoApplyImmediately
--- PASS: TestAccRDSCluster_ManagedMasterPassword_managed (108.69s)
=== CONT  TestAccRDSCluster_GlobalClusterIdentifier_secondaryClustersWriteForwarding
--- PASS: TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParametersApplyImm (993.13s)
=== CONT  TestAccRDSCluster_engineVersion
--- PASS: TestAccRDSCluster_allowMajorVersionUpgradeNoApplyImmediately (902.50s)
=== CONT  TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_add
--- PASS: TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_add (149.63s)
=== CONT  TestAccRDSCluster_GlobalClusterIdentifierEngineMode_global
--- PASS: TestAccRDSCluster_engineVersion (415.06s)
=== CONT  TestAccRDSCluster_GlobalClusterIdentifier_primarySecondaryClusters
--- PASS: TestAccRDSCluster_GlobalClusterIdentifierEngineMode_global (197.53s)
=== CONT  TestAccRDSCluster_engineVersionWithPrimaryInstance
--- PASS: TestAccRDSCluster_GlobalClusterIdentifier_secondaryClustersWriteForwarding (1567.58s)
=== CONT  TestAccRDSCluster_GlobalClusterIdentifierEngineMode_provisioned
--- PASS: TestAccRDSCluster_engineVersionWithPrimaryInstance (512.19s)
=== CONT  TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_update
--- PASS: TestAccRDSCluster_GlobalClusterIdentifierEngineMode_provisioned (191.96s)
=== CONT  TestAccRDSCluster_PointInTimeRestore_enabledCloudWatchLogsExports
--- PASS: TestAccRDSCluster_PointInTimeRestore_enabledCloudWatchLogsExports (195.62s)
=== CONT  TestAccRDSCluster_domain
--- PASS: TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_update (212.44s)
=== CONT  TestAccRDSCluster_missingUserNameCausesError
--- PASS: TestAccRDSCluster_GlobalClusterIdentifier_primarySecondaryClusters (907.42s)
=== CONT  TestAccRDSCluster_dbSubnetGroupName
--- PASS: TestAccRDSCluster_missingUserNameCausesError (4.57s)
=== CONT  TestAccRDSCluster_GlobalClusterIdentifierTakeFinalSnapshot
--- PASS: TestAccRDSCluster_dbSubnetGroupName (102.48s)
=== CONT  TestAccRDSCluster_takeFinalSnapshot
--- PASS: TestAccRDSCluster_GlobalClusterIdentifierTakeFinalSnapshot (177.75s)
=== CONT  TestAccRDSCluster_pointInTimeRestoreViaResourceID
--- PASS: TestAccRDSCluster_takeFinalSnapshot (92.77s)
=== CONT  TestAccRDSCluster_pointInTimeRestore
--- PASS: TestAccRDSCluster_domain (368.12s)
=== CONT  TestAccRDSCluster_backtrackWindow
--- PASS: TestAccRDSCluster_pointInTimeRestoreViaResourceID (235.17s)
=== CONT  TestAccRDSCluster_dbClusterInstanceClass
--- PASS: TestAccRDSCluster_pointInTimeRestore (235.22s)
=== CONT  TestAccRDSCluster_availabilityZones
--- PASS: TestAccRDSCluster_dbClusterInstanceClass (2622.83s)
=== CONT  TestAccRDSCluster_identifierPrefix
--- PASS: TestAccRDSCluster_backtrackWindow (140.61s)
=== CONT  TestAccRDSCluster_securityGroupUpdate
--- PASS: TestAccRDSCluster_availabilityZones (83.25s)
=== CONT  TestAccRDSCluster_identifierGenerated
--- PASS: TestAccRDSCluster_identifierPrefix (105.30s)
=== CONT  TestAccRDSCluster_tags
--- PASS: TestAccRDSCluster_identifierGenerated (84.74s)
=== CONT  TestAccRDSCluster_disappears
--- PASS: TestAccRDSCluster_tags (120.10s)
=== CONT  TestAccRDSCluster_deletionProtection
--- PASS: TestAccRDSCluster_securityGroupUpdate (201.61s)
=== CONT  TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_remove
--- PASS: TestAccRDSCluster_disappears (102.51s)
=== CONT  TestAccRDSCluster_storageTypeIo1
--- PASS: TestAccRDSCluster_storageTypeIo1 (1580.01s)
=== CONT  TestAccRDSCluster_engineMode
--- PASS: TestAccRDSCluster_engineMode (356.88s)
--- PASS: TestAccRDSCluster_deletionProtection (140.70s)
--- PASS: TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_remove (215.87s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/rds	9768.711s

@ewbankkit ewbankkit requested a review from a team as a code owner November 27, 2024 17:23
Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/rds Issues and PRs that pertain to the rds service. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. labels Nov 27, 2024
@ewbankkit ewbankkit changed the title r/aws_db_cluster: Fix InvalidDBClusterStateFault errors when deleting clusters that are members of a global cluster r/aws_rds_cluster: Fix InvalidDBClusterStateFault errors when deleting clusters that are members of a global cluster Nov 27, 2024
jar-b
jar-b previously approved these changes Dec 2, 2024
Copy link
Member

@jar-b jar-b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

% make testacc PKG=rds TESTS=TestAccRDSCluster_GlobalClusterIdentifierTakeFinalSnapshot
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/rds/... -v -count 1 -parallel 20 -run='TestAccRDSCluster_GlobalClusterIdentifierTakeFinalSnapshot'  -timeout 360m
2024/12/02 09:43:38 Initializing Terraform AWS Provider...
=== RUN   TestAccRDSCluster_GlobalClusterIdentifierTakeFinalSnapshot
=== PAUSE TestAccRDSCluster_GlobalClusterIdentifierTakeFinalSnapshot
=== CONT  TestAccRDSCluster_GlobalClusterIdentifierTakeFinalSnapshot
--- PASS: TestAccRDSCluster_GlobalClusterIdentifierTakeFinalSnapshot (289.84s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/rds        296.414s

YakDriver
YakDriver previously approved these changes Dec 4, 2024
@github-actions github-actions bot added service/neptune Issues and PRs that pertain to the neptune service. service/docdb Issues and PRs that pertain to the docdb service. sweeper Pertains to changes to or issues with the sweeper. labels Dec 5, 2024
@ewbankkit ewbankkit merged commit 776dd8d into main Dec 5, 2024
41 checks passed
@ewbankkit ewbankkit deleted the b-aws_rds_cluster-delete-global+snapshot branch December 5, 2024 16:06
@github-actions github-actions bot added this to the v5.81.0 milestone Dec 5, 2024
terraform-aws-provider bot pushed a commit that referenced this pull request Dec 5, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Dec 12, 2024
Copy link

This functionality has been released in v5.81.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/docdb Issues and PRs that pertain to the docdb service. service/neptune Issues and PRs that pertain to the neptune service. service/rds Issues and PRs that pertain to the rds service. sweeper Pertains to changes to or issues with the sweeper. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Unable to remove RDS Global Cluster and associated RDS Clusters at one go
3 participants