From 0c5760b9a613c63c3410294495cb6110b0c797eb Mon Sep 17 00:00:00 2001 From: badra001 Date: Tue, 8 Mar 2022 10:03:11 -0500 Subject: [PATCH] fix --- sns.tf | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/sns.tf b/sns.tf index 2992e4f..748db6a 100644 --- a/sns.tf +++ b/sns.tf @@ -40,16 +40,6 @@ data "aws_iam_policy_document" "topic" { variable = "AWS:SourceOwner" values = [local.account_id] } - resources = [aws_sns_topic.topic.arn] + resources = [var.create && var.enable_sns ? aws_sns_topic.topic[0].arn : null] } } -## -## { -## "Sid": "sns", -## "Effect": "Allow", -## "Action": { -## "sns:Get*", -## "sns:Publish" -## "Resource": -## } -##