-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
ContainerOperationWaiter doesn't support UserProjectOverride #9368
ContainerOperationWaiter doesn't support UserProjectOverride #9368
Comments
Looks like the original UserProjectOverride support for GKE was added with GoogleCloudPlatform/magic-modules#3892 I don't see any unique tests added to verify the feature tho, just a few |
Looks like the code to change is actually in magic-modules v1 (unless there's a newer one in DCL that i can't find): |
* UserProjectOverride for ContainerOperationWaiter fixes hashicorp/terraform-provider-google#9368 * Document container_cluster user_project_override
* UserProjectOverride for ContainerOperationWaiter fixes hashicorp#9368 * Document container_cluster user_project_override Signed-off-by: Modular Magician <magic-modules@google.com>
* UserProjectOverride for ContainerOperationWaiter fixes hashicorp/terraform-provider-google#9368 * Document container_cluster user_project_override Signed-off-by: Modular Magician <magic-modules@google.com>
* UserProjectOverride for ContainerOperationWaiter fixes hashicorp/terraform-provider-google#9368 * Document container_cluster user_project_override Signed-off-by: Modular Magician <magic-modules@google.com>
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. |
Expected
Using Terraform, with a google service account in another project, I should be able to create a GKE cluster (google_container_cluster) using User Project Override (user_project_override) with GKE API enabled in the target project, but not the service account project.
Found
Error:
The project number specified is the project the service account is in, not the project the cluster is supposed to be in.
Suspected Root Cause
I did some sleuthing and I'm pretty sure I found the root cause:
resource_container_cluster.go supports UserProjectOverride in 23 places, but it also uses containerOperationWait in 20 places, and containerOperationWait does NOT support UserProjectOverride.
So ultimately, google_container_cluster does not actually fully support user_project_override.
Fix
On https://github.com/hashicorp/terraform-provider-google/blob/master/google/container_operation.go#L78 in the QueryOp method of ContainerOperationWaiter, add the header between the Get() and the Do():
If wouldn't surprise me if there are other operations that also need to be updated for other resources to support UserProjectOverride.
The text was updated successfully, but these errors were encountered: