-
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
global or zonal IAP SSH tunnel #7196
global or zonal IAP SSH tunnel #7196
Comments
+1 |
Hi If you are looking to set up IAP for all instances, you should apply this role It is bad idea to apply IAM policies to instances that are part of an Managed Instance Group. They are by design ephermeral so it is better to assign roles to zone or the project. If you look here, https://cloud.google.com/iap/docs/managing-access#resources_and_permissions the iap.tunnel resource API call is functionally identical to doing something like this.
If this answers your question, please go ahead and close the issue. Thank you |
Hello, First of all, thanks for your quick answer. But, the main issue with assigning the role roles/iap.tunnelResourceAccessor with IAM is we can't use conditions based on access levels. However, our IAP tunnels have a couple of restrictions based on access levels, which we won't be able to use with IAM... So, we really need that kind of resources. Thanks for your help! |
Just to link the prior request for this: #5577. @upodroid, I'm pretty sure that specific condition is only valid for IAP resources, and doesn't work at the project IAM level. If you've been able to get it to work properly, I bet the subscribers on this issue would be interested in an example. We can add new resources for this with https://cloud.google.com/iap/docs/reference/rest/v1/TopLevel/setIamPolicy. |
I assumed the OP wasn't using conditions but later on he talked about access levels which can be specified in IAM conditions and work if you use the iap.googleapis.com setIamPolicy calls. On that note, there are other resources such as snapshots that have iam methods which we don't have resources for. I'll open separate issues for those. |
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 👉 [email protected]. Thanks! |
Community Note
Description
Identity Aware Proxy (IAP) SSH access can be set up not only for an specific instance, but also for a zone or globally. And that's my problem with the google_iap_tunnel_instance_iam_policy, google_iap_tunnel_instance_iam_binding and google_iap_tunnel_instance_iam_member because I can't use it with a Managed Instances Group for instance, considering instances can be replaced at any time and are on several different zones.
I would like to be able to set up a IAP SSH tunnel for all my instances, even with the instances not already created. Basically, zone and instance should be optional fields.
New or Affected Resource(s)
google_iap_tunnel_iam_policy
google_iap_tunnel_iam_binding
google_iap_tunnel_iam_member
Potential Terraform Configuration
The text was updated successfully, but these errors were encountered: