-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
provider/google: Use resource-specific project when waiting for creation, instead of global #7029
provider/google: Use resource-specific project when waiting for creation, instead of global #7029
Conversation
It is quite possible that other resources are also affected by this. If you like, I could put some work into identifying them and addressing them in this pull request. |
I forgot to paste the error that I got prior to this patch:
|
…tion Creating most google cloud resources uses the compute_operation to wait for the creation to complete. However, the computeOperationWait* functions always uses the global `config.Project`, instead of the resource- specific one. This means that creating resource in a project other than the main one fails with a 404 on the operation resource. This patch uses the project from google_compute_instance instead of the global one.
c9cf4e9
to
ad9a3fe
Compare
I've gone ahead and passed the project for every resource in the google provider. And I've squashed the commits. This patch should now be complete! |
Thanks for this @igorwwwwwwwwwwwwwwwwwwww! I'm going to defer to @lwander - our local GCP guru - for review. 👍 |
LGTM! @sethvargo was recently working on refactoring the GCP project stuff - is this OK with you? |
You have the coolest GitHub username. This change looks good to me |
thanks for the review folks! :) @phinze could you take another look at this? |
Bump |
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Creating a google_compute_instance resource uses the compute_operation to wait for the creation to complete. However, the computeOperationWaitZone function always uses the global
config.Project
, instead of the instance-specific one.This means that creating an instance in a project other than the main one fails with a 404 on the operation resource.
This patch uses the project from google_compute_instance instead of the global one.