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
Terraform module that simplifies multiple parameters creation on parameter store. Also can parse .env files
Especially useful with Terragrunt.
Example usage
module"parameters" {
source="zahornyak/multiple-ssm-parameters/aws"# prefix for parameter nameparameter_prefix="/dev/"parameters={
db_name = {
name ="foo"
value ="bar"
type ="String"
description ="name of the db"
}
db_password = {
value ="password"
type ="String"
description ="secure password"
}
}
}
Example parse env file
module"parameters" {
source="zahornyak/multiple-ssm-parameters/aws"# prefix for parameter nameparameter_prefix="/dev/"file_path=".env"
}
.env example:
DB_NAME=mysql
DB_PASSWORD=password
# example comment here
CERTIFICATE="dawjhjdkl;aefjhguwyidhjakenka"
SECRET="sjkbfdksnjwdjewlknfkj"
Example parse and use custom parameters
module"parameters_and_parse_files" {
source="zahornyak/multiple-ssm-parameters/aws"parameters={
db_name = {
name ="foo"
value ="bar"
type ="String"
description ="name of the db"
}
db_password = {
value ="password"
type ="String"
description ="secure password"
}
}
file_path=".env"
}
Unlocked variables example(wont be changed by terraform):
You can lock each parameter or all the parameters
module"parameters" {
source="zahornyak/multiple-ssm-parameters/aws"parameters={
db_name = {
name ="foo"
value ="bar"
type ="String"
description ="name of the db"
}
db_password = {
value ="password"
type ="String"
description ="secure password"
unlocked =true
}
}
# unlocked = true
}
You can use all the environments for container definition secrets:
module"parameters" {
source="zahornyak/multiple-ssm-parameters/aws"parameters={
db_name = {
name ="foo"
value ="bar"
type ="String"
description ="name of the db"
}
db_password = {
value ="password"
type ="String"
description ="secure password"
unlocked =true
}
}
}
module"service_container_definition" {
source="registry.terraform.io/cloudposse/ecs-container-definition/aws"container_image="nginx:latest"container_name="example"essential=truestop_timeout=5port_mappings=[
{
containerPort =80
protocol ="tcp"
hostPort =null
}
]
secrets=module.parameters.container_definitions_secrets
}