mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 06:00:46 -05:00
* fix(rds): populate MasterUserSecret for Aurora clusters with ManageMasterUserPassword CreateDBCluster ignored ManageMasterUserPassword, so aws_rds_cluster with manage_master_user_password=true always returned an empty master_user_secret, breaking any Terraform reference to master_user_secret[0]. The instance path already generates the managed secret; the cluster path never parsed the option. Mirror the instance behavior on the cluster path: - CreateDBCluster / ModifyDBCluster parse ManageMasterUserPassword and MasterUserSecretKmsKeyId and generate a Secrets Manager secret (rds!<clusterResourceId>, OwningService=rds, tagged aws:rds:primaryDBClusterArn) - DescribeDBClusters and the other cluster responses render <MasterUserSecret> - ModifyDBCluster enables the secret on demand and removes it when the option is turned off with a caller-supplied password - DeleteDBCluster deletes the managed secret - Startup ownership backfill also covers persisted clusters Closes #3061 * fix(rds): roll back cluster managed secret on failed create and honor KMS re-key Addresses review feedback on the cluster managed-master-user-password path: - doCreateDbCluster now deletes the just-created managed secret if proxy startup or persistence fails afterwards. The cluster is never stored in that case, so DeleteDBCluster could not otherwise reach the orphaned secret. - ModifyDBCluster with MasterUserSecretKmsKeyId on a cluster that already has a managed secret re-keys the existing secret via updateSecret instead of silently dropping the request.