-
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
google_project_service 403 - not enabling API #6013
google_project_service 403 - not enabling API #6013
Comments
@stankolubomir I can't repro the issue. After I ran your code, I verified the services were enabled. I don't see |
@edwardmedia I've updated the gist above with the full debug log. |
@stankolubomir what do you get |
@edwardmedia I think that |
@stankolubomir I can repro your issue after I removed certain permissions on the terraform account. Not sure if that is the reason that causes your problem. Can you double check if the service account your terraform uses has related permissions? I am not sure how it relates to the different results among provider versions. Did you change any other settings (configs) when you switch to different provider versions ( 3.9.0 <==> 3.12.0, 3.13.0, 3.14.0, 3.15.0)? |
Took a look at the debug logs and I see what's going on. @edwardmedia I'm going to explain it thoroughly so that you can get some ideas on how to do similar sleuthing in the future. The 403 is actually happening on the request to read the project, not on any project service reads/writes, and even though it's a 403, it's not a permissions error. It just says that the API hasn't been enabled yet:
We can see from the config that that cloudresourcemanager.googleapis.com is the exact service that's trying to get enabled, so it makes sense that it hasn't been enabled yet. So, at this point, the problem is that we're trying to call an API before we enable services. Next question is why did it work in 3.9.0 and not 3.12.0? We can check the changelog to see if anything stands out as affecting the resource. Sure enough, in the 3.12.0 changelog entry, there's a change for project_services that says |
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 👉 hashibot-feedback@hashicorp.com. 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.12.24
Terraform Google Provider 3.15.0
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/stankolubomir/59c0741c93778b793411d151a9495514
Expected Behavior
Resource should be able to enable google API after terraform google provider upgrade from 3.9.0 to 3.15.0.
Actual Behavior
Resource is not able to enable google API after terraform google provider upgrade from 3.9.0 to 3.15.0. There is also no luck using versions 3.12.0, 3.13.0 or 3.14.0.
Although after downgrade back to 3.9.0, resource is able to enable google API.
Steps to Reproduce
terraform apply
The text was updated successfully, but these errors were encountered: