Skip to content

Instantly share code, notes, and snippets.

@msysyamamoto
Created June 27, 2017 14:55
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save msysyamamoto/4c00c0124824ead814a177af0c33b7e7 to your computer and use it in GitHub Desktop.
Save msysyamamoto/4c00c0124824ead814a177af0c33b7e7 to your computer and use it in GitHub Desktop.
AWS SSM parameter store sample
resource "aws_elastic_beanstalk_environment" "sample_env" {
setting {
namespace = "aws:elasticbeanstalk:application:environment"
name = "DATASOURCE_PASSWORD"
value = "${data.aws_ssm_parameter.rds_password.value}"
}
}
# use parameter
data "aws_ssm_parameter" "rds_password" {
name = "/${terraform.env}/rds/rds_password"
}
# Set parameter
resource "aws_ssm_parameter" "rds_password" {
name = "/${terraform.env}/rds/rds_password"
value = "very nice password"
type = "String"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment