hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.36k stars 1.75k forks source link

Removing pubsub topic allowed persistence regions does not update topic #20431

Open steved opened 4 days ago

steved commented 4 days ago

Community Note

Terraform Version & Provider Version(s)

Terraform v1.9.8 on darwin_arm64

Affected Resource(s)

google_pubsub_topic

Terraform Configuration

Before:

resource "google_pubsub_topic" "usage-metrics" {
  name = "topic-name"

  message_storage_policy {
    allowed_persistence_regions = ["us-central1"]
  }
}

After:

resource "google_pubsub_topic" "usage-metrics" {
  name = "topic-name"

  # message_storage_policy {
  #   allowed_persistence_regions = ["us-central1"]
  # }
}

Debug Output

https://gist.github.com/steved/27766f27e5dbaf9fb7031c59234d2725

Expected Behavior

Allowed persistence regions should be reset to the default (or recomputed).

Actual Behavior

No changes are noted.

Steps to reproduce

  1. terraform apply

Important Factoids

No response

References

No response

b/380481222

ggtisc commented 3 days ago

Confirmed issue!

After removing the message_storage_policy block the configuration persists in the tfstate file