hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.61k stars 9k forks source link

[Enhancement]: [RDS] Allow setting the name of the master_user_secret when using manage_master_user_password #35929

Open anuj-upadhyay-hah opened 4 months ago

anuj-upadhyay-hah commented 4 months ago

Description

When manage_master_user_password is set to true, rds creates it's own managed secret with a predefined name which follows this pattern: rds!cluster-*

I would like to be able to provide a custom name for this managed secret.

Affected Resource(s) and/or Data Source(s)

aws_rds_cluster

Potential Terraform Configuration

resource "aws_rds_cluster" "test" {
  cluster_identifier            = "example"
  database_name                 = "test"
  manage_master_user_password   = true
  master_user_secret_name       = "custom-secret-name"
  master_user_secret_kms_key_id = aws_kms_key.example.key_id
  master_username               = "test"
}

References

Similar issues were there in aws-cdk which are now fixed: https://github.com/aws/aws-cdk/issues/8984 https://github.com/aws/aws-cdk/issues/13746

Would you like to implement a fix?

No

github-actions[bot] commented 4 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

justinretzolk commented 4 months ago

Looks like this is the same as #33470, but this one has a bit more information, so making the link but leaving them both open.