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

Failed to add role roles/bigquery.dataEditor for a service account (Provider produced inconsistent result after apply) #20762

Open
tsugumi-sys opened this issue Dec 20, 2024 · 1 comment

Comments

@tsugumi-sys
Copy link

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 & Provider Version(s)

Terraform v1.9.5
on

  • provider registry.terraform.io/hashicorp/google v5.19.0

Affected Resource(s)

google_project_iam_member

Terraform Configuration

locals {
  pubsub_service_account_roles = ["roles/bigquery.dataEditor", "roles/bigquery.metadataViewer", "roles/pubsub.publisher", "roles/pubsub.viewer"]
}

resource "google_project_iam_member" "pubsub_service_account" {
  for_each = toset(local.pubsub_service_account_roles)

  project = data.google_project.project.project_id
  role    = each.value
  member  = "serviceAccount:service-${data.google_project.project.number}@gcp-sa-pubsub.iam.gserviceaccount.com"
}

Debug Output

Error: Provider produced inconsistent result after apply
When applying changes to module.gcp_data.google_project_iam_member.pubsub_service_account["roles/bigquery.dataEditor"], provider "provider[\"registry.terraform.io/hashicorp/google\"]" produced an unexpected new value: Root object was present, but now absent.

This is a bug in the provider, which should be reported in the provider's own issue tracker.

Expected Behavior

Apply successfully finished.

Actual Behavior

The error of debug output is raised.

Steps to reproduce

  1. terraform apply

Important Factoids

No response

References

No response

@github-actions github-actions bot added forward/review In review; remove label to forward service/cloudresourcemanager-crm labels Dec 20, 2024
@shuyama1
Copy link
Collaborator

I can't reproduce the error locally. Does this error occur consistently? Can you share the debug log for the apply that fails? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants