Skip to content

Commit

Permalink
fix(filter_policy_scope): changed default to null, added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vladget committed Oct 10, 2024
1 parent b18d228 commit ea1a9cf
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
21 changes: 21 additions & 0 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
4 changes: 2 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}))
Expand Down

0 comments on commit ea1a9cf

Please sign in to comment.