Closed Aaketk17 closed 7 months ago
Experiencing same problem. RDS was brought up with module version 6.3.1. Then the module version was bumped to 6.4.0 and configuration was added to the module inputs: manage_master_user_password_rotation = false
Terraform plan results in No changes and password rotation is still enabled.
Note: Terraform plan shows No changes if secrets rotation is set to disabled manually via aws console.
The provider doesn't currently have a way to disable automatic password rotation when using RDS password management with Secretsmanager that I know of. The manage_master_user_password_rotation
parameter is just a way to manage the rotation schedule outside the default schedule (7 days I believe) and isn't for enabling or disabling rotation outright.
But if you create the aws_secretsmanager_secret_rotation
resource by configuring manage_master_user_password_rotation
to true
(master_user_password_rotation_automatically_after_days
or master_user_password_rotation_schedule_expression
will also need to be set), apply, then set to false
and apply again (it will then destroy the aws_secretsmanager_secret_rotation
), that will disable rotation on the secretsmanager secret. When configuring, note that master_user_password_rotate_immediately
should be set to false
to prevent immediate rotation of the secret on an apply (example).
This is a workaround though and I would recommend testing prior to use.
Related provider issue comments: https://github.com/hashicorp/terraform-provider-aws/issues/33462#issuecomment-1830849144
This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days
This issue was automatically closed because of stale in 10 days
This issue has been resolved in version 6.5.5 :tada:
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.
This is the code I am currently using to provision the RDS instance. But even the
manage_master_user_password_rotation
is set tofalse
it is enabling the automatic ket rotation. I need to manage the master password in the secret manager but without enabling automatic key rotation.