You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This module creates secrets in AWS Secrets Manager. The varible names is a list that will be used to create secrets for however many values are passed into the list.
Dependencies
No dependencies.
Resource List
Secrets Manager Secret
Secret Policy
Secret Version
Deployment Steps
This module can be called as outlined below.
Change directories to the directory that requires secrets and source the module as shown below.
From the directory run terraform init.
Run terraform plan to review the resources being created.
If everything looks correct in the plan output, run terraform apply.
Usage
The below example is how you can call secrets manager module to create secrets as needed. One important note is ensuring you exclude any characters for systems such as PGSQL. As there can be issues with the characters accepted by it. It's best to exclude #$/_%&"'=
If secrets need to be shared between AWS accounts, set "shared = true" and also provide "cross_account_ids".
locals{
secrets=[
{
secret_name ="test123"
secret_description ="test service account for the 123 service"
},
{
secret_name ="svc_test456"
secret_description =""
}
]
}
module"secrets" {
source="github.com/Coalfire-CF/terraform-aws-secretsmanager"partition=var.partitionsecrets=local.secretslength=15special=trueoverride_special="$%&!"kms_key_id=data.terraform_remote_state.setup.sm_kms_key_idpath=""shared=falsecross_account_ids=[""]
}
Returns all secrets generated by the secrets manager module
Contributing
If you're interested in contributing to our projects, please review the Contributing Guidelines. And send an email to our team to receive a copy of our CLA and start the onboarding process.