-
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 resource exits early leading to "Error: googleapi: Error 403: The project to be billed is associated with an absent billing account., accountDisabled" #5649
google_project resource exits early leading to "Error: googleapi: Error 403: The project to be billed is associated with an absent billing account., accountDisabled" #5649
Comments
@c-dingwell I tried few times and i didn't get the error message. I am able to create project every time in around 9 secs. I used the following config just to ensure i have the billing id from the data_source before i create the project. Could you please try this config and let me know how it goes ?
If you get the same error even with the above config please attach the debug logs (export TF_LOG=DEBUG) to get a better understanding on what's going on ? |
I am unable to reproduce it using the "google_billing_account" data structure. If I change it from that to a variable that is passed ("billing_account = var.billing_account" in the google_project resource) then I can get a regular reoccurrence of the issue. |
Its an eventual consistency issue. An explicit delay is required to handle this issue which you already have in place. Its a timing issue between 2 different APIs. Terraform/provider gets the confirmation from project API that billing account is enabled. But the update isn't propagated to storage API while creating the bucket resource thus it throws an error. I am tagging @emilymye @rileykarson to evaluate any retry mechanism is needed for storage api calls. |
@emilymye: You're most familiar with eventual consistency problems- how do you think I should solve this? I'm leaning towards a retry predicate that checks for the specific |
yeah, i don't really see a good way to use PollAsync for this, since it's happening on resources that are children of the project. There might be another way we can read a project/resourcemanager-specific state that means it's actually ready, but this wouldn't hurt for now |
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! |
This issue was originally opened by @c-dingwell as hashicorp/terraform#24079. It was migrated here as a result of the provider split. The original body of the issue is below.
Terraform Version
Terraform v0.12.20
Affected Resource(s)
google_project
Terraform Configuration Files
Expected Behavior
Project creation and assigning of the billing account should be fully done before further resources proceed to be created.
Actual Behavior
Encounter sporadically over last few days. Just ran in a loop ~40% of the time it works just fine. The remaining ~60% I received an error:
Steps to Reproduce
terraform apply
Important Factoids
Uncommenting the local exec and forcing a 10 second sleep causes this to work all the time. This isn't an elegant solution.
The text was updated successfully, but these errors were encountered: