You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
If no billing account is attached to the project a re-plan would try to modify it.
Actual Behavior
I had Cloud Resource Manager API enabled so I could create the project, but not Cloud Billing API so the billing account could not be attached. I received the following error:
* google_project.foo_project: Error setting billing account "xxx-xxx-xx" for project "projects/foo-project": googleapi: Error 403: Cloud Billing API has not been used in project [redacted] before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/cloudbilling.googleapis.com/overview?project=[redacted] then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry., accessNotConfigured
After enabling the above API running plan again shows 0 pending changes, and the project has no billing account attached.
Steps to Reproduce
Create a "management" project. Enable Cloud Resource Manager API in it.
Create a service account in the management project, give it permissions to create projects and to attach billing accounts.
Try to create a project with above service account with a specific billing account
Project will be created, billing account won't be attached.
Enable Cloud Billing API on management project.
Run terraform plan, observe no changes planned.
The text was updated successfully, but these errors were encountered:
I was too quick on the trigger here: the billing account actually is being changed properly. I had tried to incorrectly use -target on my project which was causing no changes to be planned.
Thank you for this. I was experiencing a similar issue and thought the error was indicating that the billing_account couldn't be set because the cloudbilling api was not enabled yet, but now I realize it's because cloudbilling wasn't enabled on my 'management' project.
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
locked and limited conversation to collaborators
May 19, 2019
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Community Note
Terraform Version
Affected Resource(s)
google_project
Terraform Configuration Files
Debug Output
Can provide if needed
Panic Output
No panic
Expected Behavior
If no billing account is attached to the project a re-plan would try to modify it.
Actual Behavior
I had Cloud Resource Manager API enabled so I could create the project, but not Cloud Billing API so the billing account could not be attached. I received the following error:
* google_project.foo_project: Error setting billing account "xxx-xxx-xx" for project "projects/foo-project": googleapi: Error 403: Cloud Billing API has not been used in project [redacted] before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/cloudbilling.googleapis.com/overview?project=[redacted] then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry., accessNotConfigured
After enabling the above API running plan again shows 0 pending changes, and the project has no billing account attached.
Steps to Reproduce
terraform plan
, observe no changes planned.The text was updated successfully, but these errors were encountered: