From 2a798594d58969e79d560c1a8c8a77c9a6004e8e Mon Sep 17 00:00:00 2001 From: Dario Vianello Date: Sat, 19 Nov 2022 19:46:28 +0000 Subject: [PATCH] Fix output ternary operator Ordering of the ternary operator is wrong and leads TF to try and output there ARN of a topic it didn't create in the first place. --- outputs.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/outputs.tf b/outputs.tf index 1cf49b7..d184786 100644 --- a/outputs.tf +++ b/outputs.tf @@ -1,4 +1,4 @@ output "sns_topic_arn" { description = "The SNS topic that was created" - value = var.sns_topic_arn != null ? aws_sns_topic.this[0].arn : var.sns_topic_arn + value = var.sns_topic_arn != null ? var.sns_topic_arn : aws_sns_topic.this[0].arn }