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

Permanent diff for google_bigquery_dataset friendly_name #13951

Assignees
Labels
bug forward/review In review; remove label to forward service/bigquery

Comments

@pingyeh
Copy link

pingyeh commented Mar 9, 2023

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 an 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 an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.

Terraform Version

$ terraform --version
Terraform v1.3.9
on linux_amd64
+ provider registry.terraform.io/hashicorp/google v4.56.0

Your version of Terraform is out of date! The latest version
is 1.4.0. You can update by downloading from https://www.terraform.io/downloads.html

Affected Resource(s)

  • google_bigquery_dataset

Terraform Configuration Files

resource "google_bigquery_dataset" "aquarium" {                                     
  project       = local.project_id
  dataset_id    = "aquarium"
  description   = "Tables for internal Aquarium work"
  location      = "US"
}                                                                                   

Debug Output

https://gist.github.com/pingyeh/d61c215819646527a241eaf1153f74e1

Panic Output

Expected Behavior

The BigQuery dataset has a non-empty friendly_name. It should be set to null as indicated by terraform apply.

Actual Behavior

Terraform tries to remove the friendly_name attribute:

  # google_bigquery_dataset.aquarium will be updated in-place
  ~ resource "google_bigquery_dataset" "aquarium" {
      - friendly_name                   = "Aquarium work" -> null
        id                              = "projects/{project_id_redacted}/datasets/aquarium"
        # (12 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

The friendly_name has not changed after terraform apply. Reapplying again produces the same diff over and over.

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000
@pingyeh pingyeh added the bug label Mar 9, 2023
@edwardmedia edwardmedia self-assigned this Mar 9, 2023
@edwardmedia
Copy link
Contributor

edwardmedia commented Mar 9, 2023

@pingyeh I am not able to repro this issue in both conditions (with and without friendly_name in the config). No permadiff is found. Reviewed the log you provided, I do see friendly_name in the api response. I don't see the request call in your log that created the dataset. Wonder if you created the dataset with the friendly_name and updated the config afterward?

Please detail the repro steps if that is not the case

@pingyeh
Copy link
Author

pingyeh commented Mar 9, 2023

The dataset was created before I started using terraform, so the config was imported.

I added a friendly_name among other attributes to the config after the import, ran terraform apply successfully, then I wanted to remove the friendly_name because I realized that it is not visible on the Google Cloud Console in the new UI now. Terraform apply shows the diff correctly:

      - friendly_name                   = "Aquarium work" -> null

But terraform apply was a NOP. The diff is still there.

@edwardmedia
Copy link
Contributor

@pingyeh I understand now what the problem is. Basically you are not able to remove it. Yes, this is a bug in the provider.

@pingyeh
Copy link
Author

pingyeh commented Mar 9, 2023

@edwardmedia Thanks for recognizing the bug!

What's the plan?

@pingyeh
Copy link
Author

pingyeh commented Mar 14, 2023

@edwardmedia I just set my google provider to version = ">= 4.57.0" released today, but the permadiff still exists. Will the fix be available in the next release?

@github-actions
Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 13, 2023
@github-actions github-actions bot added service/bigquery forward/review In review; remove label to forward labels Jan 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.