-
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
Allow compute_backend_service.iap oauth2_client_id and oauth2_client_secret to be optional based on the recent underlying API changes #16585
Allow compute_backend_service.iap oauth2_client_id and oauth2_client_secret to be optional based on the recent underlying API changes #16585
Comments
Note from triage: There is a field in the API called |
The resource Via gcloud CLI you can create a regional LB with IAP enabled like this: gcloud compute backend-services create my-secure-backend-service \
--region europe-west3 \
--iap enabled \
--protocol https If somebody guides me, I want to contribute and create a PR. For reference: There was already a similar (or even same) request a while ago: #10614 |
Hi @raman-nbg - could you please create a new issue for updating the regional version of the resource? The PR that closed this issue would be a useful resource to look at when figuring out what your PR would need to contain. Once you open a PR you'll be assigned a reviewer who can give guidance! |
Reopening this issue; the PR merged may have some issues that were not detected in review, so it's been reverted. The behavior of the iap fields is complex enough that we should make sure we know what's happening for both the global and regional resources before moving forward with implementation on either. |
I don't know which version introduced this, but as of 6.6.0 I can do this in the (global) google_compute_backend_service which matches what's available via
|
I have tested it again in a fresh new project and everything is working as expected on google_compute_backend_service with google provider v6.6.0. Verified that the project has no oauth consent screen and no oauth client. The IAP works just like when it's using the Google oauth client. The documentation is also explaining oauth2_client_id and oauth2_client_secret as optional parameters as expected. Closing this. Thanks everyone!!! |
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. |
Community Note
Description
Would like to see these two required oauth2 client parameters on the
compute_backend_service
resourceiap
block becoming optional (with the recent underlying API changes):compute_backend_service.iap.oauth2_client_id
compute_backend_service.iap.oauth2_client_secret
This means a new parameter is probably required
compute_backend_service.iap.enabled
This is necessary in order to take advantage of a recently launched feature that IAP supports the use of a Google managed OAuth2 client. The creation of a custom OAuth2 client is no longer strictly required. IAP can simply be "enabled" by using a Google managed OAuth client.
This new feature's
gcloud
equivalent is:gcloud compute backend-services create backend --global --protocol=HTTPS --iap=enabled
Examples can also be found on the official doc .
The benefit of this feature is that this will skip a lot of resource configuration that would normally come with a custom OAuth2 client (
google_iap_brand
and its group email address,google_iap_client
).New or Affected Resource(s)
Potential Terraform Configuration
References
This was mentioned in an earlier issue #10614 . At that time it wasn't possible via the API. Now this is possible.
More info
https://cloud.google.com/iap/docs/custom-oauth-configuration#google_managed_oauth_client_and_custom_oauth_client_comparison
b/313620253
The text was updated successfully, but these errors were encountered: