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/rds_cluster: add ability to promotion read replica cluster to standalone #40337

Merged
merged 10 commits into from
Dec 3, 2024

Conversation

johnsonaj
Copy link
Contributor

Description

Removing replication_source_identifier now promotes a read replica cluster to standalone

Relations

Closes #31320

References

Output from Acceptance Testing

% make testacc TESTARGS='-run=TestAccRDSCluster_' PKG=rds

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_ -timeout 360m
2024/11/27 13:17:11 Initializing Terraform AWS Provider...
    cluster_test.go:2193: serverless does not support snapshot restore on an empty volume
--- SKIP: TestAccRDSCluster_SnapshotIdentifierEngineMode_serverless (0.00s)
--- PASS: TestAccRDSCluster_availabilityZones (109.93s)
--- PASS: TestAccRDSCluster_localWriteForwarding (112.26s)
--- PASS: TestAccRDSCluster_basic (121.95s)
--- PASS: TestAccRDSCluster_deletionProtection (157.59s)
--- PASS: TestAccRDSCluster_storageTypeAuroraIopt1UpdateAurora (158.88s)
--- PASS: TestAccRDSCluster_storageTypeAuroraUpdateAuroraIopt1 (169.40s)
--- PASS: TestAccRDSCluster_SnapshotIdentifier_preferredBackupWindow (307.98s)
--- PASS: TestAccRDSCluster_SnapshotIdentifier_kmsKeyID (339.00s)
--- PASS: TestAccRDSCluster_SnapshotIdentifier_encryptedRestore (339.13s)
--- PASS: TestAccRDSCluster_SnapshotIdentifierEngineMode_provisioned (349.28s)
--- PASS: TestAccRDSCluster_SnapshotIdentifier_masterUsername (350.29s)
--- PASS: TestAccRDSCluster_SnapshotIdentifier_deletionProtection (367.78s)
--- PASS: TestAccRDSCluster_SnapshotIdentifierVPCSecurityGroupIDs_tags (264.57s)
--- PASS: TestAccRDSCluster_SnapshotIdentifier_masterPassword (312.41s)
--- PASS: TestAccRDSCluster_SnapshotIdentifier_tags (262.58s)
--- PASS: TestAccRDSCluster_SnapshotIdentifier_vpcSecurityGroupIDs (334.52s)
--- PASS: TestAccRDSCluster_serverlessV2ScalingConfiguration (174.12s)
--- PASS: TestAccRDSCluster_ManagedMasterPassword_managedSpecificKMSKey (111.74s)
--- PASS: TestAccRDSCluster_ManagedMasterPassword_managed (96.29s)
--- PASS: TestAccRDSCluster_ManagedMasterPassword_convertToManaged (144.63s)
--- PASS: TestAccRDSCluster_port (151.42s)
--- PASS: TestAccRDSCluster_Scaling_defaultMinCapacity (255.00s)
--- PASS: TestAccRDSCluster_SnapshotIdentifier_preferredMaintenanceWindow (303.13s)
--- PASS: TestAccRDSCluster_scaling (262.88s)
--- PASS: TestAccRDSCluster_identifierPrefix (115.67s)
--- PASS: TestAccRDSCluster_snapshotIdentifier (342.23s)
--- PASS: TestAccRDSCluster_tags (122.74s)
--- PASS: TestAccRDSCluster_backupsUpdate (151.99s)
--- PASS: TestAccRDSCluster_copyTagsToSnapshot (190.15s)
--- PASS: TestAccRDSCluster_engineLifecycleSupport_disabled (116.45s)
--- PASS: TestAccRDSCluster_SnapshotIdentifierEngineVersion_different (285.81s)
--- PASS: TestAccRDSCluster_minorVersion (839.18s)
--- PASS: TestAccRDSCluster_onlyMajorVersion (850.90s)
--- PASS: TestAccRDSCluster_NoDeleteAutomatedBackups (243.31s)
--- PASS: TestAccRDSCluster_allowMajorVersionUpgradeNoApplyImmediately (904.96s)
--- PASS: TestAccRDSCluster_storageTypeAuroraIopt1 (104.44s)
--- PASS: TestAccRDSCluster_storageTypeAuroraReturnsBlank (103.44s)
--- PASS: TestAccRDSCluster_identifierGenerated (116.06s)
--- PASS: TestAccRDSCluster_disappears (103.33s)
--- PASS: TestAccRDSCluster_copyTagsToSnapshot_restorePointInTime (326.80s)
--- PASS: TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_add (109.46s)
--- PASS: TestAccRDSCluster_SnapshotIdentifierEngineVersion_equal (320.35s)
--- PASS: TestAccRDSCluster_GlobalClusterIdentifierEngineMode_global (187.14s)
--- PASS: TestAccRDSCluster_PointInTimeRestore_enabledCloudWatchLogsExports (264.32s)
--- PASS: TestAccRDSCluster_allocatedStorage (1430.12s)
--- PASS: TestAccRDSCluster_performanceInsightsRetentionPeriod (1524.64s)
--- PASS: TestAccRDSCluster_EnabledCloudWatchLogsExports_mySQL (180.55s)
--- PASS: TestAccRDSCluster_GlobalClusterIdentifierEngineMode_provisioned (201.78s)
--- PASS: TestAccRDSCluster_missingUserNameCausesError (4.94s)
--- PASS: TestAccRDSCluster_iops (1642.86s)
--- PASS: TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_update (191.51s)
--- PASS: TestAccRDSCluster_pointInTimeRestore (253.52s)
--- PASS: TestAccRDSCluster_storageTypeGeneralPurposeToProvisionedIOPS (1059.69s)
--- PASS: TestAccRDSCluster_allowMajorVersionUpgrade (1829.40s)
--- PASS: TestAccRDSCluster_takeFinalSnapshot (204.80s)
--- PASS: TestAccRDSCluster_pointInTimeRestoreViaResourceID (264.03s)
--- PASS: TestAccRDSCluster_enableHTTPEndpointProvisioned (190.98s)
--- PASS: TestAccRDSCluster_iamAuth (92.96s)
--- PASS: TestAccRDSCluster_kmsKey (118.95s)
--- PASS: TestAccRDSCluster_password (171.86s)
--- PASS: TestAccRDSCluster_dbSubnetGroupName (110.17s)
--- PASS: TestAccRDSCluster_encrypted (112.99s)
--- PASS: TestAccRDSCluster_updateIAMRoles (114.11s)
--- PASS: TestAccRDSCluster_performanceInsightsKMSKeyID (1489.37s)
--- PASS: TestAccRDSCluster_networkType (209.26s)
--- PASS: TestAccRDSCluster_performanceInsightsEnabled (1515.71s)
--- PASS: TestAccRDSCluster_enableHTTPEndpoint (292.22s)
--- PASS: TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParametersApplyImm (2066.91s)
--- PASS: TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParameters (2129.88s)
--- PASS: TestAccRDSCluster_backtrackWindow (141.54s)
--- PASS: TestAccRDSCluster_engineVersionWithPrimaryInstance (1231.25s)
--- PASS: TestAccRDSCluster_engineMode (345.52s)
--- PASS: TestAccRDSCluster_engineVersion (424.57s)
--- PASS: TestAccRDSCluster_availabilityZones_caCertificateIdentifier (1573.87s)
--- PASS: TestAccRDSCluster_storageTypeIo1 (1540.78s)
--- PASS: TestAccRDSCluster_ReplicationSourceIdentifier_kmsKeyID (1962.57s)
--- PASS: TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_remove (196.50s)
--- PASS: TestAccRDSCluster_ReplicationSourceIdentifier_promote (2113.86s)
--- PASS: TestAccRDSCluster_domain (1780.46s)
--- PASS: TestAccRDSCluster_GlobalClusterIdentifier_replicationSourceIdentifier (2895.23s)
--- PASS: TestAccRDSCluster_storageTypeIo2 (1590.40s)
--- PASS: TestAccRDSCluster_dbClusterInstanceClass (3733.64s)
--- PASS: TestAccRDSCluster_GlobalClusterIdentifier_secondaryClustersWriteForwarding (3225.02s)
--- PASS: TestAccRDSCluster_EnabledCloudWatchLogsExports_postgresql (1840.55s)
--- PASS: TestAccRDSCluster_GlobalClusterIdentifier_primarySecondaryClusters (3012.71s)
PASS
ok 		github.com/hashicorp/terraform-provider-aws/internal/service/rds	4178.987s

@johnsonaj johnsonaj requested a review from a team as a code owner November 27, 2024 22:24
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
Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

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

This new behaviour should be documented.

Also, should replication_source_identifier be ForceNew if it's changed to a different value? If so, consider a separate PR

internal/service/rds/cluster.go Show resolved Hide resolved
@johnsonaj johnsonaj requested a review from gdavison December 2, 2024 15:19
website/docs/r/rds_cluster.html.markdown Outdated Show resolved Hide resolved
@johnsonaj johnsonaj requested a review from gdavison December 3, 2024 00:38
@johnsonaj johnsonaj merged commit 10f6656 into main Dec 3, 2024
42 checks passed
@johnsonaj johnsonaj deleted the f-rds_cluster_promotion branch December 3, 2024 00:55
@github-actions github-actions bot added this to the v5.79.0 milestone Dec 3, 2024
terraform-aws-provider bot pushed a commit that referenced this pull request Dec 3, 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 3, 2024
Copy link

github-actions bot commented Dec 3, 2024

This functionality has been released in v5.79.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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/rds Issues and PRs that pertain to the rds service. 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.

[Enhancement]: Add support for promoting read replica to standalone db cluster
2 participants