Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(filter_policy_scope): changed default to null, added tests #88

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading