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.65k stars 9.03k forks source link

[Enhancement]: Secret rotation for manage_master_user_password in RDS with automaticallyafterdays option #33462

Open ds50421 opened 10 months ago

ds50421 commented 10 months ago

Description

Hi,

in the resource [resource "aws_db_instance"(https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance), setting the manage_master_user_password argument allows RDS to manage the master user password in Secrets Manager. the rotation is set to 7 days by default with value AutomaticallyAfterDays.But terraform does not provide option to change the days .

Request you create a parameter to add AutomatciallyAfterDays for secret manager rotation .

How we achieved this via CLI:aws secretsmanager rotate-secret --secret-id RDSXXXXXXXX --rotation-rules AutomaticallyAfterDays=30

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

resource "aws_db_instance"

Potential Terraform Configuration

No response

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 10 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

rae89 commented 8 months ago

The ability to disable rotation would also be nice.

stewartcampbell commented 6 months ago

There is an example here which configures the rotation: https://github.com/hashicorp/terraform-provider-aws/issues/32405

I am looking to disable it as well, though, which I don't think that helps with.