AWS RDS SM-stored credential rotation tool that automates secret management for RDS databases using AWS Secrets Manager.
AWS SM-stored credential rotation with RDS
This tool is designed for developers and DevOps engineers who need to manage and rotate database credentials securely in AWS RDS. It automates the process of credential rotation to enhance security without causing downtime.
Be cautious when rotating the master secret using the RDS console, as it may cause server unavailability. Using Secrets Manager for rotation is recommended to avoid downtime.
Create the './infra/.auto.tfvars' file with the desired AWS region.
Initialize the Terraform configuration with 'terraform -chdir="infra" init'.
Apply the Terraform configuration with 'terraform -chdir="infra" apply -auto-approve'.
Create the 'app.env' file with database address and secret ID.
Run the application using 'go get' and 'go run .'.
terraform -chdir="infra" init
Initializes the Terraform configuration.
terraform -chdir="infra" apply -auto-approve
Applies the Terraform configuration to create the necessary infrastructure.
go get
Fetches the necessary Go dependencies for the application.
go run .
Runs the application which connects to the RDS database.
terraform -chdir="infra" destroy -auto-approve
Cleans up and destroys the resources created by Terraform.