From 0ee0cbf9a6a36c79619dfe5e0e23fbe55d875c4b Mon Sep 17 00:00:00 2001 From: Andrei Neculau Date: Mon, 9 Sep 2024 11:20:20 +0200 Subject: [PATCH] custom sns_topic_policy_json should be enough to create policies --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 4f58382..69ad3f2 100644 --- a/main.tf +++ b/main.tf @@ -8,7 +8,7 @@ locals { sqs_dlq_enabled = local.enabled && var.sqs_dlq_enabled - sns_topic_policy_enabled = local.enabled && length(var.allowed_aws_services_for_sns_published) > 0 || length(var.allowed_iam_arns_for_sns_publish) > 0 + sns_topic_policy_enabled = local.enabled && (length(var.sns_topic_policy_json) > 0 || length(var.allowed_aws_services_for_sns_published) > 0 || length(var.allowed_iam_arns_for_sns_publish) > 0) } resource "aws_sns_topic" "this" {