diff --git a/examples/complete/main.tf b/examples/complete/main.tf index b47b674..3ab9d0a 100644 --- a/examples/complete/main.tf +++ b/examples/complete/main.tf @@ -13,3 +13,24 @@ module "sns" { context = module.this.context } + +resource "aws_sqs_queue" "sqs" { + name = "test-sqs" + fifo_queue = false +} + +module "sns_with_subscriber" { + source = "../../" + + allowed_aws_services_for_sns_published = var.allowed_aws_services_for_sns_published + + subscribers = { + "sqs" = { + protocol = "sqs" + endpoint = aws_sqs_queue.sqs.arn + raw_message_delivery = true + } + } + context = module.this.context + attributes = ["sqs", "subscriber"] +} diff --git a/variables.tf b/variables.tf index 8f5c151..8168383 100644 --- a/variables.tf +++ b/variables.tf @@ -8,8 +8,8 @@ variable "subscribers" { # Boolean indicating whether the end point is capable of auto confirming subscription e.g., PagerDuty (default is false) filter_policy = optional(string, null) # The filter policy JSON that is assigned to the subscription. For more information, see Amazon SNS Filter Policies. - filter_policy_scope = optional(string, "MessageAttributes") - # The filter policy scope that is assigned to the subscription. Whether the `filter_policy` applies to `MessageAttributes` (default) or `MessageBody` + filter_policy_scope = optional(string, null) + # The filter policy scope that is assigned to the subscription. Whether the `filter_policy` applies to `MessageAttributes` or `MessageBody`. Default is null. raw_message_delivery = optional(bool, false) # Boolean indicating whether or not to enable raw message delivery (the original message is directly passed, not wrapped in JSON with the original message in the message property) (default is false) }))