Skip to content

Commit

Permalink
#34 encrypted the values
Browse files Browse the repository at this point in the history
  • Loading branch information
kunduso committed May 2, 2024
1 parent 103ac5a commit 12c0984
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions infra/ssm_parameter.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ssm_parameter
resource "aws_ssm_parameter" "infra_output" {
name = "/${var.name}/output"
type = "String"
value = jsonencode( {
"subnet_ids": [for subnet in aws_subnet.public : subnet.id],
"security_group_id": "${aws_security_group.custom_sg.id}",
"aws_lb_target_group": "${aws_lb_target_group.target_group.arn}",
"cluster_id": "${aws_ecs_cluster.app_cluster.id}",
"cloud_watch_log_group_name": "${aws_cloudwatch_log_group.logs.name}"
type = "SecureString"
key_id = aws_kms_key.custom_kms_key.id
value = jsonencode({
"subnet_ids" : [for subnet in aws_subnet.public : subnet.id],
"security_group_id" : "${aws_security_group.custom_sg.id}",
"aws_lb_target_group" : "${aws_lb_target_group.target_group.arn}",
"cluster_id" : "${aws_ecs_cluster.app_cluster.id}",
"cloud_watch_log_group_name" : "${aws_cloudwatch_log_group.logs.name}"
})
}

0 comments on commit 12c0984

Please sign in to comment.