-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaws.ssm.tf
21 lines (19 loc) · 967 Bytes
/
aws.ssm.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
resource "aws_ssm_parameter" "outputs" {
for_each = local.parameter_store_outputs
name = "${trimsuffix(var.parameter_store_path, "/")}/${each.key}"
type = try(each.value.secure, false) ? "SecureString" : "String"
value = each.value.value
}
locals {
parameter_store_outputs = {
s3_bucket_name = { value = aws_s3_bucket.terraform_state.id }
dynamodb_table_arn = { value = aws_dynamodb_table.terraform_lock.arn }
iam_user_name = { value = aws_iam_user.iac.name }
iam_user_arn = { value = aws_iam_user.iac.arn }
iam_user_access_key_id = { value = aws_iam_access_key.iac.id }
iam_user_access_key_secret = { secure = true, value = nonsensitive(aws_iam_access_key.iac.secret) }
kms_key_alias = { value = aws_kms_alias.iac.name }
kms_key_id = { value = aws_kms_key.iac.key_id }
kms_key_arn = { value = aws_kms_key.iac.arn }
}
}