Terraform-provider-google: Add support for configuring the message retention duration of PubSub subscriptions

Created on 16 Oct 2018  ·  7Comments  ·  Source: hashicorp/terraform-provider-google


Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment. If the issue is assigned to the "modular-magician" user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If the issue is assigned to a user, that user is claiming responsibility for the issue. If the issue is assigned to "hashibot", a community member has claimed the issue already.

Description

Please add support for configuring the message retention duration of PubSub subscriptions.

Also, PubSub subscriptions can now be updated.
Edit: update was implemented as part of https://github.com/GoogleCloudPlatform/magic-modules/pull/1088

New or Affected Resource(s)

  • google_pubsub_subscription

Potential Terraform Configuration

resource "google_pubsub_topic" "mytopic" {
  name = "mytopic"
}

resource "google_pubsub_subscription" "mytopic-subscription" {
  name  = "mytopic-subscription"
  topic = "${google_pubsub_topic.mytopic.name}"

  ack_deadline_seconds = "600"

  #NOTE: not implemented yet
  message_retention_duration = "48h"
}

References

enhancement

Most helpful comment

@aaron-lane: It's a part of google_pubsub_subscription, not google_pubsub_topic: https://github.com/terraform-providers/terraform-provider-google/blob/v2.2.0/google/resource_pubsub_subscription.go#L69

All 7 comments

This was apparently graduated to GA as part of the replay feature release (there's no longer any mention of alpha or beta on this field).

https://cloud.google.com/pubsub/docs/replay-overview

https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/create#body.request_body.FIELDS.message_retention_duration

https://cloud.google.com/sdk/gcloud/reference/pubsub/subscriptions/create#--message-retention-duration

@rileykarson, now that Pubsub resources are magic-modules generated, do you think support for this could be implemented?

Thanks @rileykarson! :tada:

@rileykarson: Thanks for implementing this!

It appears not to have been released with v2.2.0. Is it targeted for v2.3.0 now?

It was released in 2.2.0, I'm already using it.

@aaron-lane: It's a part of google_pubsub_subscription, not google_pubsub_topic: https://github.com/terraform-providers/terraform-provider-google/blob/v2.2.0/google/resource_pubsub_subscription.go#L69

Some day, I'll learn to read things. Thank you!

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

Was this page helpful?
0 / 5 - 0 ratings