Skip to content

Commit 556bca1

Browse files
committed
fix(ssm ouputs): use simplier condition as coalesce cant be used here
1 parent c2d2cd1 commit 556bca1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

modules/ssm/outputs.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
output "parameters" {
22
value = {
33
github_app_id = {
4-
name = coalesce(var.github_app.id_ssm, aws_ssm_parameter.github_app_id[0]).name
5-
arn = coalesce(var.github_app.id_ssm, aws_ssm_parameter.github_app_id[0]).arn
4+
name = var.github_app.id_ssm != null ? var.github_app.id_ssm.name : aws_ssm_parameter.github_app_id[0].name
5+
arn = var.github_app.id_ssm != null ? var.github_app.id_ssm.arn : aws_ssm_parameter.github_app_id[0].arn
66
}
77
github_app_key_base64 = {
8-
name = coalesce(var.github_app.key_base64_ssm, aws_ssm_parameter.github_app_key_base64[0]).name
9-
arn = coalesce(var.github_app.key_base64_ssm, aws_ssm_parameter.github_app_key_base64[0]).arn
8+
name = var.github_app.key_base64_ssm != null ? var.github_app.key_base64_ssm.name : aws_ssm_parameter.github_app_key_base64[0].name
9+
arn = var.github_app.key_base64_ssm != null ? var.github_app.key_base64_ssm.arn : aws_ssm_parameter.github_app_key_base64[0].arn
1010
}
1111
github_app_webhook_secret = {
12-
name = coalesce(var.github_app.webhook_secret_ssm, aws_ssm_parameter.github_app_webhook_secret[0]).name
13-
arn = coalesce(var.github_app.webhook_secret_ssm, aws_ssm_parameter.github_app_webhook_secret[0]).arn
12+
name = var.github_app.webhook_secret_ssm != null ? var.github_app.webhook_secret_ssm.name : aws_ssm_parameter.github_app_webhook_secret[0].name
13+
arn = var.github_app.webhook_secret_ssm != null ? var.github_app.webhook_secret_ssm.arn : aws_ssm_parameter.github_app_webhook_secret[0].arn
1414
}
1515
}
1616
}

0 commit comments

Comments
 (0)