terraform-google-modules / terraform-google-pubsub

Creates Pub/Sub topic and subscriptions associated with the topic
https://registry.terraform.io/modules/terraform-google-modules/pubsub/google
Apache License 2.0
89 stars 126 forks source link

Add option to control `enable_exactly_once_delivery` for subscriptions. #91

Open ttacon opened 2 years ago

ttacon commented 2 years ago

TL;DR

Currently, enabling exactly once delivery is a preview feature for GCP PubSub subscriptions. I'm curious if y'all are open to adding this flag while it's in a preview state to this module (the official provider supports it).

Terraform Resources

The official pubub_subscription provider supports the enable_exactly_once_delivery.

Detailed design

Implementing this should be a similar change to this one here.

The only major constraint would be that enable_exactly_once_deliver and enable_message_ordering are mutually exclusive. However, handling that doesn't feel like this module's responsibility (the provider should handle it, which it doesn't).

Additional information

No response

ttacon commented 2 years ago

Any other information that I can provide here?

ttacon commented 2 years ago

Howdy folks - checking in again, would this be a change that we'd be open to taking in?

notobsd2 commented 2 years ago

Hello,

I would also like to +1 this. I have the code changes that I've made myself, however it's annoying to apply the changes after init-ing the module.

hdavila146 commented 2 years ago

because that i will have to create my own module :(..

bharathkkb commented 2 years ago

@hdavila146 @ttacon @notobsd2 Happy to review a PR adding this

hdavila146 commented 2 years ago

Hello @bharathkkb I already got the code change an tested please let me know how can I delivery I don't have permission do a push in this repository and neither a PR 👎

apeabody commented 2 years ago

Hello @bharathkkb I already got the code change an tested please let me know how can I delivery I don't have permission do a push in this repository and neither a PR 👎

Hi @hdavila146 - Thanks for reaching out. The standard practice is to create your own fork of this repo and upload your changes to a branch on your fork. You should then be able to create a pull request from the branch in your fork to this repository.

hdavila146 commented 2 years ago

this is done in the @ttacon @notobsd2 commit 9b6b91383097df226951c48c0e0b3df86795a842

hdavila146 commented 2 years ago

Hello, now google doesn't support enable_exactly_once_delivery for push subscription only for pull I will do a new PR 👎 @apeabody `Error: Error creating Subscription: googleapi: Error 400: A subscription cannot have push config or bigquery config set with exactly once delivery configured.
│ │ with google_pubsub_subscription.push_subscriptions["system_anvyl-event-processor"], │ on main.tf line 118, in resource "google_pubsub_subscription" "push_subscriptions": │ 118: resource "google_pubsub_subscription" "push_subscriptions" { │ ╵ ERRO[0026] 1 error occurred:

apeabody commented 2 years ago

9b6b913

Thanks @hdavila146 - Once you open the PR please @ me in a comment and I'll try to take a look.