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.72k stars 9.08k forks source link

[Enhancement]: Disable Secret Manager's Rotation Schedule by Default When Enabling manage_master_user_password for RDS #38433

Closed morisekntr closed 1 month ago

morisekntr commented 1 month ago

Description

Hello,

I have learned that when creating RDS instances with Terraform and enabling manage_master_user_password, the master password is automatically managed by Secret Manager without being stored in the tfstate file.

However, the password in Secret Manager has its rotation schedule automatically enabled. This automatic rotation schedule is critical for us, as we handle a PHP-based monolithic web application, and we would prefer to have it disabled by default.

Thank you for your consideration.

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

Potential Terraform Configuration

resource "aws_db_instance" "example" {
  manage_master_user_password = true
  secretsmanager_secret_rotation = false   ## default: true
}

OR

resource "aws_db_instance" "example" {
  manage_master_user_password = true
}

resource "aws_secretsmanager_secret_rotation" "example" {
  secret_id = aws_db_instance.example.master_user_secret[0].secret_arn
  automatically_secret_rotation = false  ## default: true
}


### References

_No response_

### Would you like to implement a fix?

None
github-actions[bot] commented 1 month ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

aristosvo commented 1 month ago

Hi @morisekntr 👋!

Fellow DevOps engineer here, I understand your use case.

Unfortunately this is not something the AWS provider for Terraform can help you with, as the provider is just using the APIs of AWS, and they don't offer the functionality to stop the rotation.

At the same time it is a best practice to have a specific user for your application, instead of using the root user directly. In your case I'd look into that and how to solve that instead of expecting the functionality from the AWS provider.

justinretzolk commented 1 month ago

With the above in mind, and that it looks like there's already an existing issue tracking this request (#33462), I'm going to close this issue. If you have any additional requests in the future, please do reach out and let us know!

github-actions[bot] commented 1 month ago

[!WARNING] This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

github-actions[bot] commented 1 week ago

I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.