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

feat(TPG>=6.2)!: add cloud storage max_messages and use_topic_schema support #204

Merged
merged 3 commits into from
Nov 14, 2024

Conversation

lahuang4
Copy link
Contributor

Adding support to terraform-google-pubsub following adding support in the provider: hashicorp/terraform-provider-google#19338

Similar to #192, I'm having trouble getting the example in examples/cloud_storage pick up the new fields. Running terraform plan still ignores the specified filename_datetime_format field which was added in the previous PR:

terraform-google-pubsub/examples/cloud_storage$ terraform plan
var.project_id
  The project ID to manage the Pub/Sub resources

  Enter a value: <project>

...

Terraform will perform the following actions:

...

  # module.pubsub.google_pubsub_subscription.cloud_storage_subscriptions["example_bucket_subscription"] will be created
  + resource "google_pubsub_subscription" "cloud_storage_subscriptions" {
      + ack_deadline_seconds       = 300
      + effective_labels           = (known after apply)
      + id                         = (known after apply)
      + message_retention_duration = "604800s"
      + name                       = "example_bucket_subscription"
      + project                    = "<project>"
      + terraform_labels           = (known after apply)
      + topic                      = "cft-tf-pubsub-topic-cloud-storage"

      + cloud_storage_config {
          + bucket          = (known after apply)
          + filename_prefix = "example_prefix_"
          + filename_suffix = "_example_suffix"
          + max_duration    = "300s"
          + state           = (known after apply)
        }
    }

...

Plan: 6 to add, 0 to change, 0 to destroy.

Would appreciate any tips for debugging this, but otherwise the change seems complete, so I'm sending it for review. Thanks!

@lahuang4 lahuang4 requested review from imrannayer and a team as code owners September 11, 2024 21:12
@lahuang4
Copy link
Contributor Author

lahuang4 commented Oct 2, 2024

Hello! A friendly nudge on this PR :)

@apeabody
Copy link
Contributor

apeabody commented Oct 7, 2024

/gcbrun

@lahuang4
Copy link
Contributor Author

Hi, another nudge on this PR!

@apeabody
Copy link
Contributor

/gcbrun

@apeabody
Copy link
Contributor

Hi @lahuang4 - I pull a fresh/current copy of the repo and it's worked for me:

  # module.pubsub.google_pubsub_subscription.cloud_storage_subscriptions["example_bucket_subscription"] will be created
  + resource "google_pubsub_subscription" "cloud_storage_subscriptions" {
      + ack_deadline_seconds       = 300
      + effective_labels           = (known after apply)
      + id                         = (known after apply)
      + message_retention_duration = "604800s"
      + name                       = "example_bucket_subscription"
      + project                    = "ap-bps-experimental-gke"
      + terraform_labels           = (known after apply)
      + topic                      = "cft-tf-pubsub-topic-cloud-storage"

      + cloud_storage_config {
          + bucket                   = (known after apply)
          + filename_datetime_format = "YYYY-MM-DD/hh_mm_ssZ"
          + filename_prefix          = "example_prefix_"
          + filename_suffix          = "_example_suffix"
          + max_duration             = "300s"
          + state                    = (known after apply)
        }

      + expiration_policy (known after apply)
    }

Copy link
Contributor

@apeabody apeabody left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @lahuang4!

LGTM - @imrannayer?

Copy link
Collaborator

@imrannayer imrannayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@apeabody apeabody merged commit bc66597 into terraform-google-modules:master Nov 14, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants