-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update ACM service perimeter resources to support Granular Controls
groups
- Loading branch information
Charles Leon
committed
Mar 11, 2024
1 parent
1253916
commit 5569a50
Showing
5 changed files
with
99 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
...ates/terraform/examples/access_context_manager_service_perimeter_granular_controls.tf.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
resource "google_access_context_manager_access_policy" "access-policy" { | ||
parent = "organizations/123456789" | ||
title = "Policy with Granular Controls Group Support" | ||
} | ||
|
||
resource "google_access_context_manager_service_perimeter" "test-access" { | ||
parent = "accessPolicies/${google_access_context_manager_access_policy.test-access.name}" | ||
name = "accessPolicies/${google_access_context_manager_access_policy.test-access.name}/servicePerimeters/%s" | ||
title = "%s" | ||
perimeter_type = "PERIMETER_TYPE_REGULAR" | ||
status { | ||
restricted_services = ["bigquery.googleapis.com", "storage.googleapis.com"] | ||
|
||
vpc_accessible_services { | ||
enable_restriction = true | ||
allowed_services = ["bigquery.googleapis.com", "storage.googleapis.com"] | ||
} | ||
|
||
ingress_policies { | ||
ingress_from { | ||
sources { | ||
access_level = google_access_context_manager_access_level.test-access.name | ||
} | ||
identities = ["group:[email protected]"] | ||
identities = ["principal://iam.googleapis.com/locations/global/workforcePools/1234/subject/janedoe"] | ||
identities = ["principalSet://iam.googleapis.com/locations/global/workforcePools/1234/*"] | ||
} | ||
|
||
ingress_to { | ||
resources = [ "*" ] | ||
operations { | ||
service_name = "storage.googleapis.com" | ||
|
||
method_selectors { | ||
method = "google.storage.objects.create" | ||
} | ||
} | ||
} | ||
} | ||
|
||
egress_policies { | ||
egress_from { | ||
identities = ["group:[email protected]"] | ||
identities = ["principal://iam.googleapis.com/locations/global/workforcePools/1234/subject/janedoe"] | ||
identities = ["principalSet://iam.googleapis.com/locations/global/workforcePools/1234/*"] | ||
} | ||
egress_to { | ||
resources = [ "*" ] | ||
operations { | ||
service_name = "storage.googleapis.com" | ||
|
||
method_selectors { | ||
method = "google.storage.objects.create" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |