SSM Parameters and Secrets
This repo automates SSM parameters for service credentials and supports referencing existing ones.
Two paths:
- Create new parameters: set entries in
ssm_parameters
or rely on autowiring fromiam_users
. - Reference existing parameters: set
existing = true
andname
.
Autowiring from IAM Users:
- Root
main.ssm_parameters.tf
merges in username and SES v4 SMTP password for eachiam_users
entry that includes anssm
block and has created an access key. - Parameters are named by the paths in the user’s
ssm
block, e.g.,/infra/smtp/username
,/infra/smtp/password
.
Module behavior:
modules/ssm_parameter
creates parameters whenexisting = false
and reads whenexisting = true
.
Example: