Skip to content

Commit 7a641b8

Browse files
Added IAP Enable/Disable flag in cloudrunv2 service. (#13575) (#22301)
[upstream:6042c8c999bb48c56a563ca81553df4b881316f4] Signed-off-by: Modular Magician <[email protected]>
1 parent ab203d9 commit 7a641b8

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.changelog/13575.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
cloudrunv2: added `iapEnabled` field to `mmv1/products/cloudrunv2/Service.yaml` resource
3+
```

website/docs/r/cloud_run_v2_service.html.markdown

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,31 @@ resource "google_project_iam_member" "logs_writer" {
662662
member = "serviceAccount:${google_service_account.cloudbuild_service_account.email}"
663663
}
664664
```
665+
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
666+
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md&cloudshell_working_dir=cloudrunv2_service_iap&open_in_editor=main.tf" target="_blank">
667+
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
668+
</a>
669+
</div>
670+
## Example Usage - Cloudrunv2 Service Iap
671+
672+
673+
```hcl
674+
resource "google_cloud_run_v2_service" "default" {
675+
provider = google-beta
676+
name = "cloudrun-iap-service"
677+
location = "us-central1"
678+
deletion_protection = false
679+
ingress = "INGRESS_TRAFFIC_ALL"
680+
launch_stage = "BETA"
681+
iap_enabled = true
682+
683+
template {
684+
containers {
685+
image = "us-docker.pkg.dev/cloudrun/container/hello"
686+
}
687+
}
688+
}
689+
```
665690

666691
## Argument Reference
667692

@@ -1318,6 +1343,10 @@ The following arguments are supported:
13181343
Configuration for building a Cloud Run function.
13191344
Structure is [documented below](#nested_build_config).
13201345

1346+
* `iap_enabled` -
1347+
(Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html))
1348+
Used to enable/disable IAP for the service.
1349+
13211350
* `project` - (Optional) The ID of the project in which the resource belongs.
13221351
If it is not provided, the provider project is used.
13231352

0 commit comments

Comments
 (0)