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

Investigate adding X-Goog-User-Project header in requests by default #4059

Closed
rileykarson opened this issue Jul 18, 2019 · 6 comments
Closed
Assignees

Comments

@rileykarson
Copy link
Collaborator

https://cloud.google.com/apis/docs/system-parameters

This should resolve some issues with gcloud-based interactive user credentials.

@rileykarson rileykarson added this to the 3.0.0 milestone Jul 18, 2019
@danawillow danawillow removed this from the 3.0.0 milestone Sep 12, 2019
@danawillow danawillow self-assigned this Sep 12, 2019
@andyroyle
Copy link

Would it be simple to add this to resources that aren't auto-generated by magic-modules?

For context; we're being bitten by this when using the google_container_cluster resource, which doesn't respect the user_project_override attribute on the provider.

@danawillow
Copy link
Contributor

It wouldn't be simple to do it for all of them in a big sweeping change, but on an individual basis, yup it would be pretty easy. Most of the client libraries we use have a Header() function that can be used to add headers to the request before it's sent out. Are you asking because you'd like to contribute that change, or because you'd like someone on our team to do so?

@andyroyle
Copy link

I would be up for making the changes myself. I had a quick look at the generated API client for the container service yesterday, so I will take another look today and see if I can find a path. Should we be setting X-Goog-User-Project irrespective of the setting for user_project_override?

@danawillow
Copy link
Contributor

Cool! I actually just did a combination generated and handwritten one at GoogleCloudPlatform/magic-modules#2737, so you can take a look at how I did it there. Since using project overrides requires specific IAM permissions, it's best if we continue making it opt-in using the user_project_override setting.

@paddycarver
Copy link
Contributor

Closing as it's not looking like we're going to move forward with this, due to the IAM permissions issue.

@ghost
Copy link

ghost commented Mar 28, 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 👉 hashibot-feedback@hashicorp.com. Thanks!

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

No branches or pull requests

4 participants