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

Failures when enabling google_project_service are opaque #5074

Closed
rileykarson opened this issue Dec 4, 2019 · 3 comments · Fixed by GoogleCloudPlatform/magic-modules#2944
Assignees

Comments

@rileykarson
Copy link
Collaborator

rileykarson commented Dec 4, 2019

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 v0.12.17
+ provider.google 2.14.0

This will also occur on 3.0.0/3.1.0, I believe.

Affected Resource(s)

  • google_project_service

Terraform Configuration Files

resource "google_project_service" "project" {
  project = "your-project-id"
  service = "iam.googleapis.com"

  disable_dependent_services = true
}

resource "google_project_service" "project2" {
  project = "your-project-id"
  service = "invalid-service.googleapis.com"

  disable_dependent_services = true
}

Debug Output

Error: failed to send enable services request: googleapi: Error 403: The caller does not have permission, forbidden
 
  on main.tf line 1, in resource "google_project_service" "project":
  1: resource "google_project_service" "project" {
 
 
 
Error: failed to send enable services request: googleapi: Error 403: The caller does not have permission, forbidden
 
  on main.tf line 7, in resource "google_project_service" "project2":
  7: resource "google_project_service" "project2" {

Panic Output

Expected Behavior

I should be able to tell why my request failed

Actual Behavior

I can't see what services failed, or what the failing request was.

Steps to Reproduce

  1. terraform apply

Important Factoids

This will actually cause both services to fail because we're batching the requests.

References

  • b/145637405
@ghost ghost added the bug label Dec 4, 2019
@rileykarson
Copy link
Collaborator Author

I wonder if we could retry services from a failed request one-by-one as well. I did that for renamed services to reduce the risk of failing other requests. That probably falls more into an FR than this bug, though. For whoever resolves this, I'll leave that call up to you- can you make an FR if it isn't resolved here?

@chrisst
Copy link
Contributor

chrisst commented Jan 8, 2020

As of the most recent batching updates the error coming back is:

Error: Batch "project/tf-test-chrisst-2/services:batchEnable" for request "Enable Project Services tf-test-chrisst-2: map[storage-api.googleapis.com:{}]" returned error: failed to send enable services request: googleapi: Error 403: Service 'fakeapi.googleapis.com' not found or permission denied., forbidden

  on main.tf line 74, in resource "google_project_service" "project8":
  74: resource "google_project_service" "project8" {



Error: Batch "project/tf-test-chrisst-2/services:batchEnable" for request "Enable Project Services tf-test-chrisst-2: map[fakeapi.googleapis.com:{}]" returned error: failed to send enable services request: googleapi: Error 403: Service 'fakeapi.googleapis.com' not found or permission denied., forbidden

  on main.tf line 80, in resource "google_project_service" "project9":
  80: resource "google_project_service" "project9" {

Additionally I'll add a caveat on how to disable batching in the error.

@ghost
Copy link

ghost commented Feb 9, 2020

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!

@ghost ghost locked and limited conversation to collaborators Feb 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants