-
Notifications
You must be signed in to change notification settings - Fork 128
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
feat(push): Add Pub/Sub Subscription support for push payload unwrapping (no wrapper) #141
Changes from 8 commits
5af8654
e09ac95
ce8eb18
7ffce7d
fa5b50c
cbfcf0f
6f48faa
7c88ed5
a5dce96
fd4bdf3
eb85854
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,8 @@ module "pubsub" { | |
x-goog-version = "v1beta1" // optional | ||
oidc_service_account_email = "[email protected]" // optional | ||
audience = "example" // optional | ||
no_wrapper = false // optional | ||
no_wrapper_write_metadata = false // optional | ||
expiration_policy = "1209600s" // optional | ||
dead_letter_topic = "projects/my-pubsub-project/topics/example-dl-topic" // optional | ||
max_delivery_attempts = 5 // optional | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,13 @@ module "pubsub" { | |
ack_deadline_seconds = 20 | ||
expiration_policy = "1209600s" // two weeks | ||
}, | ||
{ | ||
name = "push_payload_unwrapping" | ||
push_endpoint = "https://${var.project_id}.appspot.com/" | ||
no_wrapper = { write_metadata = true } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we need something like no_wrapper = true
no_wrapper_write_metadata = true |
||
ack_deadline_seconds = 20 | ||
expiration_policy = "1209600s" // two weeks | ||
}, | ||
] | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -195,6 +195,13 @@ resource "google_pubsub_subscription" "push_subscriptions" { | |
audience = lookup(each.value, "audience", "") | ||
} | ||
} | ||
|
||
dynamic "no_wrapper" { | ||
for_each = lookup(each.value, "no_wrapper", "") ? [true] : [] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rather than a bool, would it make more sense to use a nested block |
||
content { | ||
write_metadata = lookup(each.value, "no_wrapper_write_metadata", null) | ||
} | ||
} | ||
} | ||
depends_on = [ | ||
google_pubsub_topic.topic, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If possible, please add any new variables to an example so they are exercised in the Integration CI: https://github.com/terraform-google-modules/terraform-google-pubsub/tree/master/examples