-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
Support for GCP? #65
Comments
Hi @gonzaatcroud, Apologies for the very late response. I've started some initial work on this by beginning the mapping, however this may take some time before it's sufficient enough to be included in the tooling - but it is possible in the future. |
This would be amazing, thanks for sharing an update on it! |
Preview support out today, but lots of mappings missing so use with caution. Feedback welcomed! |
This is fantastic! thanks for adding this. It works fine with the |
Hey @joemiller, I'm surprised that hasn't worked out of the box for you if it's using the SDK under the hood. I do notice an unresolved issue relating to this here: hashicorp/terraform#523 Do none of the configs work?
If not, I may go hunting in Terraform. |
@iann0036 The I did have a little more luck with the _PROXY env vars. The problem is that it also sends the aws provider thru the proxy, if I recall. I was using it with a rather large stack that had multiple providers (eg. aws, gcp, k8s) I'm also running tf via EDIT: spent a few minutes on another attempt today. Setting with EDIT 2: Possible path... According to this googleapis/google-api-go-client#221 (comment) the gcp go client would respect the standard HTTP_PROXY env vars and that's about it, which is consistent w/ my experiments so far. My next step is to try a small fork of the provider to add some method to inject specific proxy settings, either via provider config or special env vars like the |
SUCCESS! Here's what I had to do: The key: I was able to get a successful
Trickiest part here was getting NO_PROXY=tailscale.com,okta.com,githubusercontent.com,github.com,terraform.io,hashicorp.com,amazonaws.com Most of these were easy to figure out because tf would fail early with an error about not being able to fetch a plugin from One thing I found surprising is some of the permissions being reported by $ gcp-iam-lookup orgpolicy.policy.set
==> Searching for roles containing permissions: [orgpolicy.policy.set] ...
roles/assuredworkloads.admin (21)
roles/assuredworkloads.editor (21)
roles/orgpolicy.policyAdmin (16) I also saw |
Hey @joemiller, Thanks for the detailed response, that's super insightful. According to the datasource, only the following methods should produce the
So I would also find it weird that the Terraform provider would attempt that. There's an outstanding issue with intercepting responses, however I've cut a new version (1.1.3) which includes a Let me know how this goes. |
@iann0036 I am trying out the latest release with EDIT: I also see I added a debug print in
|
Hey @joemiller, Thanks for that detail. I've determined the presence of the Will work on a fix shortly. |
Hey @joemiller, I've updated the pattern matching logic to now uses Regex to avoid the issue with the Could you try the same now and let me know how you go? |
@iann0036 looks great! no more I also ran 1.1.4 against a much smaller module (basically just https://registry.terraform.io/modules/terraform-google-modules/cloud-storage/google/latest/examples/simple_bucket) and the resulting permission set was much better. I had run 1.1.3 against this module and it did not output any |
Awesome feedback, thanks! Again, not every single permission is mapped out yet - but I'm working through it. Appreciate your time testing things out. |
This is great, managed to get it to work using @joemiller's approach. I'm not sure if this is even a thing for other providers, but for me the tool would be much much more useful if it could somehow group the detected permissions by resource (or atleast request). A good example is, there is likely always going to be As a workaround I have to run with |
I have used this tool in the past for a couple of AWS projects (congrats BTW, this is fantastic).
I find myself needing to do the same but with GCP. I'm having trouble trying to find something with a similar scope to this but in the GCP domain.
Are there any plans for supporting GCP in the future? If not, can you offer guidance on how you would fork this project and include GCP support?
Thanks!
The text was updated successfully, but these errors were encountered: