Skip to content

Commit 2d90512

Browse files
committed
Adds support for invokerIamDisabled
This is a new by-invitation feature documented in Fixes hashicorp/terraform-provider-google#19786 ```release-note:enhancement cloudrunv2: added invokerIamDisabled field to Service ```
1 parent 2c219b6 commit 2d90512

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

mmv1/products/cloudrunv2/Service.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,14 @@ examples:
160160
ignore_read_extra:
161161
- 'deletion_protection'
162162
external_providers: ["time"]
163+
- name: 'cloudrunv2_service_invokeriam'
164+
primary_resource_id: 'default'
165+
primary_resource_name: 'fmt.Sprintf("tf-test-cloudrun-srv%s", context["random_suffix"])'
166+
min_version: 'beta'
167+
vars:
168+
cloud_run_service_name: 'cloudrun-service'
169+
ignore_read_extra:
170+
- 'deletion_protection'
163171
virtual_fields:
164172
- name: 'deletion_protection'
165173
description: |
@@ -950,6 +958,10 @@ properties:
950958
type: String
951959
description: |
952960
Indicates a string to be part of the URI to exclusively reference this target.
961+
- name: 'invokerIamDisabled'
962+
type: Boolean
963+
description: |
964+
Disables IAM permission check for run.routes.invoke for callers of this service. This feature is available by invitation only. For more information, visit https://cloud.google.com/run/docs/securing/managing-access#invoker_check.
953965
- name: 'observedGeneration'
954966
type: String
955967
description: |

mmv1/third_party/terraform/services/cloudrunv2/resource_cloud_run_v2_service_test.go.tmpl

+28
Original file line numberDiff line numberDiff line change
@@ -1383,3 +1383,31 @@ resource "google_cloud_run_v2_service" "default" {
13831383
`, context)
13841384
}
13851385
{{- end }}
1386+
1387+
func testAccCloudRunV2Service_withInvokerIamDisabled(context map[string]interface{}) string {
1388+
return acctest.Nprintf(`
1389+
resource "google_cloud_run_v2_service" "default" {
1390+
name = "tf-test-cloudrun-service%{random_suffix}"
1391+
description = "publicly available service with no IAM check"
1392+
location = "us-central1"
1393+
deletion_protection = false
1394+
annotations = {
1395+
generated-by = "magic-modules"
1396+
}
1397+
ingress = "INGRESS_TRAFFIC_ALL"
1398+
labels = {
1399+
label-1 = "value-1"
1400+
}
1401+
client = "client-1"
1402+
client_version = "client-version-1"
1403+
invoker_iam_disabled = true
1404+
template {
1405+
containers {
1406+
name = "container-1"
1407+
image = "us-docker.pkg.dev/cloudrun/container/hello"
1408+
}
1409+
}
1410+
}
1411+
1412+
`, context)
1413+
}

0 commit comments

Comments
 (0)