Loading...
Loading...
### Terraform Version ```shell Terraform 1.9.8 ``` ### Terraform Configuration Files ```terraformresource "google_logging_project_bucket_config" "logging_log_bucket" { provider = google-beta project = "my-project" location = "global" retention_days = 30 bucket_id = "_Default" } data "google_iam_policy" "iam_policy_0" { provider = google-beta binding { role = "roles/logging.viewAccessor" members = ["user:user@domain.com"] } } resource "google_logging_log_view" "logging_log_view" { provider = google-beta name = "tf-test-viewalwkiekrlkjsdd" bucket = google_logging_project_bucket_config.logging_log_bucket.id description = "An updated logging view configured with Terraform" filter = "SOURCE(\"projects/myproject\") AND resource.type = \"gce_instance\"" } resource "google_logging_log_view_iam_policy" "log_view_iam_policy_0" { provider = google-beta parent = google_logging_log_view.logging_log_view.parent location = google_logging_log_view.logging_log_view.location bucket = google_logging_log_view.logging_log_view.bucket name = google_logging_log_view.logging_log_view.name policy_data = data.google_iam_policy.iam_policy_0.policy_data } # Uncomment for second apply to trigger bug # resource "google_logging_log_view" "logging_log_view1" { # provider = google-beta # name = "tf-test-view-1-oaiweroiasduf" # bucket = google_logging_project_bucket_config.logging_log_bucket.id # description = "An updated logging view configured with Terraform" # filter = "SOURCE(\"projects/myproject\") AND resource.type = \"gce_instance\"" # } # resource "google_logging_log_view_iam_policy" "log_view_iam_policy_1" { # provider = google-beta # parent = google_logging_log_view.logging_log_view1.parent # location = google_logging_log_view.logging_log_view1.location # bucket = google_logging_log_view.logging_log_view1.bucket # name = google_logging_log_view.logging_log_view1.name # policy_data = data.google_iam_policy.iam_policy_0.policy_data # } ``` ### Debug Output ``` 2025-08-12T13:23:52.861-0700 [WARN] Provider "provider[\"registry.terraform.io/hashicorp/google-beta\"]" produced an unexpected new value for google_logging_log_view.logging_log_view1, but we are tolerating it because it is using the legacy plugin SDK. The following problems may be the cause of any confusing errors from downstream operations: - .bucket: was cty.StringVal("projects/my-project/locations/global/buckets/_Default"), but now cty.StringVal("_Default") google_logging_log_view.logging_log_view1: Creation complete after 1s [id=projects/my-project/locations/global/buckets/_Default/views/tf-test-view-1-oaiweroiasduf] 2025-08-12T13:23:52.871-0700 [DEBUG] State storage *statemgr.Filesystem declined to persist a state snapshot 2025-08-12T13:23:52.875-0700 [ERROR] vertex "google_logging_log_view_iam_policy.log_view_iam_policy_1" error: Provider produced inconsistent final plan ╷ │ Error: Provider produced inconsistent final plan │ │ When expanding the plan for google_logging_log_view_iam_policy.log_view_iam_policy_1 to include new values learned so far during apply, │ provider "registry.terraform.io/hashicorp/google-beta" produced an invalid new value for .bucket: was │ cty.StringVal("projects/my-project/locations/global/buckets/_Default"), but now cty.StringVal("_Default"). │ │ This is a bug in the provider, which should be reported in the provider's own issue tracker. ``` ### Expected Behavior As stated in the debug output: > Provider "provider[\"registry.terraform.io/hashicorp/google-beta\"]" produced an unexpected new value for google_logging_log_view.logging_log_view1, but we are tolerating it because it is using the legacy plugin SDK. I would expect this tolerance to extend to resources that _reference_ the changed field. ### Actual Behavior If `google_logging_log_view_iam_policy` references the `bucket` field on a google_logging_log_view, and it changes during apply (which is allowed by the legacy plugin SDK), the IAM policy resource will fail to apply with an "inconsistent plan" error. ### Steps to Reproduce 1. terraform init 2. terraform apply 3. Uncomment the last part of the config 4. terraform apply ### Additional Context _No response_ ### References https://github.com/hashicorp/terraform-provider-google/issues/22390 ### Generative AI / LLM assisted development? _No response_
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.