Skip to content

grupomytec/terraform-aws-psenv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-aws-psenv

Terraform module to use Parameter Store with task definitions.

Why?

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.

Usage

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"}]

Requirements

Inputs

Name Description Type Default
ssm_path The hierarchy for the parameter. string /
value_from Use valueFrom syntax (with the parameter ARN). bool true

TODO

  • Use curl instead of aws-cli

Maintainers

License

Licensed under MIT license.

Copyright © 2020 by Grupo Mytec.