Created
June 27, 2017 14:55
-
-
Save msysyamamoto/4c00c0124824ead814a177af0c33b7e7 to your computer and use it in GitHub Desktop.
AWS SSM parameter store sample
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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