-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
cloud_run_service_iam_member
unable to retrieve IAM policy
#8067
Comments
@timothyrenner can you try something like below? resource "google_cloud_run_service_iam_member" "member" {
location = google_cloud_run_service.default.location
project = google_cloud_run_service.default.project
service = google_cloud_run_service.default.name
role = "roles/viewer"
member = "serviceAccount:${google_service_account.run_invoker.account_id}@${var.gcp_project_id}.iam.gserviceaccount.com"
} |
Adding the project and location explicitly worked. Any idea why I have to do that just for this resource? |
@timothyrenner it is based on the |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Community Note
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 tohashibot
, a community member has claimed the issue already.Terraform Version
Terraform v0.14.3
Affected Resource(s)
Terraform Configuration Files
These are the relevant bits.
Debug Output
https://gist.github.com/timothyrenner/53d213276c3148ab31eb31c225e26925
Real names have been replaced to protect the innocent. The above logs are for the creation of the service account. If you need other portions of the logs please let me know.
Panic Output
None
Expected Behavior
I would have expected it to work fine, the service and service accounts both exist, and other IAM member resources in the project work without issue.
Actual Behavior
The problem appears (at least to me, but I'm not an expert) to be the request itself:
v1/projects/REDACTED/locations//services/my-service
). Default region for the project is us-central1 and none of the other resources have that issue.Host: -run.googleapis.com
).Steps to Reproduce
terraform apply
Important Factoids
This has failed when I run locally as project owner and as a service account (with Project IAM Admin) with the same error.
References
Nothing I was able to find.
The text was updated successfully, but these errors were encountered: