Terraform module to use Parameter Store with task definitions.
Terraform Provider for AWS does not offers a data source to get values from Parameter Store by path (using GetParametersByPath API) and we need to get those values to configure our task definitions.
See this Pull Request: terraform-provider-aws#9615.
Replace the version on ?ref=v0.0.0
with a valid release value (list).
module "aws_psenv" {
source = "[email protected]:grupomytec/terraform-aws-psenv?ref=v0.0.0"
ssm_path = "/api/production/"
}
output "environment_variables" {
value = module.aws_psenv.environment_variables
}
Output (just a example):
environment_variables = [{"name":"FOO","valueFrom":"arn:aws:ssm:us-east-1:999999999999:parameter/api/production/FOO"},{"name":"BAR","valueFrom":"arn:aws:ssm:us-east-1:999999999999:parameter/api/production/BAR"}]
Name | Description | Type | Default |
---|---|---|---|
ssm_path |
The hierarchy for the parameter. | string |
/ |
value_from |
Use valueFrom syntax (with the parameter ARN). | bool |
true |
- Use
curl
instead ofaws-cli
- Matheus Alves (@theuves)
Licensed under MIT license.
Copyright © 2020 by Grupo Mytec.