@@ -223,6 +223,70 @@ resource "google_access_context_manager_access_policy" "access-policy" {
223
223
title = "my policy"
224
224
}
225
225
```
226
+ ## Example Usage - Access Context Manager Service Perimeter Granular Controls
227
+
228
+
229
+ ``` hcl
230
+ resource "google_access_context_manager_access_policy" "access-policy" {
231
+ parent = "organizations/123456789"
232
+ title = "Policy with Granular Controls Group Support"
233
+ }
234
+
235
+ resource "google_access_context_manager_service_perimeter" "test-access" {
236
+ parent = "accessPolicies/${google_access_context_manager_access_policy.test-access.name}"
237
+ name = "accessPolicies/${google_access_context_manager_access_policy.test-access.name}/servicePerimeters/%s"
238
+ title = "%s"
239
+ perimeter_type = "PERIMETER_TYPE_REGULAR"
240
+ status {
241
+ restricted_services = ["bigquery.googleapis.com", "storage.googleapis.com"]
242
+
243
+ vpc_accessible_services {
244
+ enable_restriction = true
245
+ allowed_services = ["bigquery.googleapis.com", "storage.googleapis.com"]
246
+ }
247
+
248
+ ingress_policies {
249
+ ingress_from {
250
+ sources {
251
+ access_level = google_access_context_manager_access_level.test-access.name
252
+ }
253
+ identities = ["group:[email protected] "]
254
+ identities = ["principal://iam.googleapis.com/locations/global/workforcePools/1234/subject/janedoe"]
255
+ identities = ["principalSet://iam.googleapis.com/locations/global/workforcePools/1234/*"]
256
+ }
257
+
258
+ ingress_to {
259
+ resources = [ "*" ]
260
+ operations {
261
+ service_name = "storage.googleapis.com"
262
+
263
+ method_selectors {
264
+ method = "google.storage.objects.create"
265
+ }
266
+ }
267
+ }
268
+ }
269
+
270
+ egress_policies {
271
+ egress_from {
272
+ identities = ["group:[email protected] "]
273
+ identities = ["principal://iam.googleapis.com/locations/global/workforcePools/1234/subject/janedoe"]
274
+ identities = ["principalSet://iam.googleapis.com/locations/global/workforcePools/1234/*"]
275
+ }
276
+ egress_to {
277
+ resources = [ "*" ]
278
+ operations {
279
+ service_name = "storage.googleapis.com"
280
+
281
+ method_selectors {
282
+ method = "google.storage.objects.create"
283
+ }
284
+ }
285
+ }
286
+ }
287
+ }
288
+ }
289
+ ```
226
290
227
291
## Argument Reference
228
292
@@ -389,9 +453,10 @@ The following arguments are supported:
389
453
390
454
* ` identities ` -
391
455
(Optional)
392
- A list of identities that are allowed access through this ingress policy.
393
- Should be in the format of email address. The email address should represent
394
- individual user or service account only.
456
+ 'A list of identities that are allowed access through this ` IngressPolicy ` .
457
+ To specify an identity or identity group, use the IAM v1
458
+ format specified [ here] ( https://cloud.google.com/iam/docs/principal-identifiers.md#v1 ) .
459
+ The following prefixes are supprted: user, group, serviceAccount, principal, and principalSet.'
395
460
396
461
* ` sources ` -
397
462
(Optional)
@@ -506,9 +571,10 @@ The following arguments are supported:
506
571
507
572
* ` identities ` -
508
573
(Optional)
509
- A list of identities that are allowed access through this ` EgressPolicy ` .
510
- Should be in the format of email address. The email address should
511
- represent individual user or service account only.
574
+ 'A list of identities that are allowed access through this ` EgressPolicy ` .
575
+ To specify an identity or identity group, use the IAM v1
576
+ format specified [ here] ( https://cloud.google.com/iam/docs/principal-identifiers.md#v1 ) .
577
+ The following prefixes are supprted: user, group, serviceAccount, principal, and principalSet.'
512
578
513
579
514
580
<a name =" nested_sources " ></a >The ` sources ` block supports:
@@ -659,9 +725,10 @@ The following arguments are supported:
659
725
660
726
* ` identities ` -
661
727
(Optional)
662
- A list of identities that are allowed access through this ingress policy.
663
- Should be in the format of email address. The email address should represent
664
- individual user or service account only.
728
+ 'A list of identities that are allowed access through this ` IngressPolicy ` .
729
+ To specify an identity or identity group, use the IAM v1
730
+ format specified [ here] ( https://cloud.google.com/iam/docs/principal-identifiers.md#v1 ) .
731
+ The following prefixes are supprted: user, group, serviceAccount, principal, and principalSet.'
665
732
666
733
* ` sources ` -
667
734
(Optional)
@@ -776,9 +843,10 @@ The following arguments are supported:
776
843
777
844
* ` identities ` -
778
845
(Optional)
779
- A list of identities that are allowed access through this ` EgressPolicy ` .
780
- Should be in the format of email address. The email address should
781
- represent individual user or service account only.
846
+ 'A list of identities that are allowed access through this ` EgressPolicy ` .
847
+ To specify an identity or identity group, use the IAM v1
848
+ format specified [ here] ( https://cloud.google.com/iam/docs/principal-identifiers.md#v1 ) .
849
+ The following prefixes are supprted: user, group, serviceAccount, principal, and principalSet.'
782
850
783
851
784
852
<a name =" nested_sources " ></a >The ` sources ` block supports:
0 commit comments