Skip to content

This module will create all the resources to store and rotate a MySQL or Aurora password using the AWS Secrets Manager service.

License

Notifications You must be signed in to change notification settings

giuseppeborgese/terraform-aws-secret-manager-with-rotation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This module will create all the resources to store and rotate a MySQL or Aurora password using the AWS Secrets Manager service.

Schema

schema

Prerequisites

  • A VPC with private subnets and accessibilty to AWS Secrets Manager Endpoint, see below for more details.
  • An RDS with MySQL or Aurora already created and reacheable from the private subnets

Usage Example

module "secret-manager-with-rotation" {
  source         = "giuseppeborgese/secret-manager-with-rotation/aws"
  version        = "<always choose the latest version displayed in the upper right corner of this page>"
  name           = "PassRotation"
  rotation_days  = 10
  subnets_lambda = ["subnet-xxxxxx", "subnet-xxxxxx"]
  mysql_username = "giuseppe"
  mysql_dbname   = "my_db_name"
  mysql_host     =  "mysqlEndpointurl.xxxxxx.us-east-1.rds.amazonaws.com"
  mysql_password = "dummy_password_will_we_rotated"
}

Video Tutorial

Take a look to the video to see the module in action

Rotate automatically a MySQL or Aurora password using AWS Secrets Manager and Terraform

The subnets specified needs to be private and with internet access to reach the AWS secrets manager endpoint You can use a NAT GW or configure your Routes with a VPC Endpoint like is described in this guide

Further details

If you like it

Please if you like this module, thumbs up on the youtube video and leave a comment as well for any questions.

About

This module will create all the resources to store and rotate a MySQL or Aurora password using the AWS Secrets Manager service.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages