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

google_bigquery_dataset_iam_member erroring out with 'Provider produced inconsistent result after apply" #17172

Closed
mbohri-cslt opened this issue Feb 3, 2024 · 7 comments

Comments

@mbohri-cslt
Copy link

mbohri-cslt commented Feb 3, 2024

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 a user, that user is claiming responsibility for the issue.
  • Customers working with a Google Technical Account Manager or Customer Engineer can ask them to reach out internally
    to expedite investigation and resolution of this issue.

Terraform Version

1.0.6

Affected Resource(s)

google_bigquery_dataset_iam_member

Terraform Configuration

Debug Output

Step #4 - "tf apply": │ Error: Provider produced inconsistent result after apply
Step #4 - "tf apply": │
Step #4 - "tf apply": │ When applying changes to
Step #4 - "tf apply": │ google_bigquery_dataset_iam_member.reference_tic_editor, provider
Step #4 - "tf apply": │ "provider["registry.terraform.io/hashicorp/google"]" produced an
Step #4 - "tf apply": │ unexpected new value: Root resource was present, but now absent.
Step #4 - "tf apply": │
Step #4 - "tf apply": │ This is a bug in the provider, which should be reported in the provider's
Step #4 - "tf apply": │ own issue tracker.

Expected Behavior

TF apply should pass and resources should be created

Actual Behavior

Randomly terraform destroys the google_bigquery_dataset_iam_member resource and recreates ( without the resource being updated). The following error is being logged

google_bigquery_dataset_iam_member.resoursename, provider
"provider[\"registry.terraform.io/hashicorp/google\"]" produced an
│ unexpected new value: Root resource was present, but now absent.

TF Apply fails with error during this process and TF state gets updated incorrectly and causes errors when the TF apply is executed next time.

Sample error seen during the subsequent TF apply

Error: Error creating Dataset: googleapi: Error 409: Already Exists: Dataset datasetname, duplicate
 with google_bigquery_dataset.datasetname,
 on main.tf line 803, in resource "google_bigquery_dataset" "datasetname":
 803: resource "google_bigquery_dataset" "datasetname" {

please note: the google_bigquery_dataset_iam_member resource name that errors in teh first run is not associated with the dataset that has duplicate error.

Steps to reproduce

The following resources are available under the same Terraform project.

  • google_bigquery_dataset_iam_member .
  • google_bigquery_dataset .

Run Terraform apply multiple times

Important Factoids

No response

References

No response

b/325436168

@mbohri-cslt mbohri-cslt added the bug label Feb 3, 2024
@github-actions github-actions bot added forward/review In review; remove label to forward service/bigquery labels Feb 3, 2024
@edwardmedia edwardmedia self-assigned this Feb 3, 2024
@edwardmedia
Copy link
Contributor

@mbohri-cslt thanks for reporting this issue but the provided info is not enough for me to investigate. Below info is a little bit vague and likely it is related to a way to build the system.

Can you repro the issue? Are you able to put all in a simple config that I can repro? What version of provider do you use?

Error: Provider produced inconsistent result after apply

@edwardmedia
Copy link
Contributor

@mbohri-cslt is this still an issue?

@edwardmedia
Copy link
Contributor

closing this as a dup of #16607

@c2thorn
Copy link
Collaborator

c2thorn commented Feb 13, 2024

Reopenning, this seems like a separate issue that I'm also seeing in GoogleCloudPlatform/magic-modules#9948

@c2thorn c2thorn reopened this Feb 13, 2024
@edwardmedia edwardmedia removed their assignment Feb 14, 2024
@edwardmedia edwardmedia removed the forward/review In review; remove label to forward label Feb 14, 2024
@wj-chen
Copy link

wj-chen commented Feb 16, 2024

@c2thorn Looks like the test issue in GoogleCloudPlatform/magic-modules#9948 was resolved. Since we don't have additional information from the reporter on whether this is still happening or examples to repro, is it good to be closed for now?

@c2thorn
Copy link
Collaborator

c2thorn commented Feb 20, 2024

Yes @wj-chen, either this user's case is not still happening or it will be fixed in GoogleCloudPlatform/magic-modules#9948

@c2thorn c2thorn closed this as completed Feb 20, 2024
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 Mar 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants