-
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
Feb 29, 2024
1 parent
1253916
commit 6a5a915
Showing
5 changed files
with
80 additions
and
25 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
55 changes: 55 additions & 0 deletions
55
...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,55 @@ | ||
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]"] | ||
} | ||
|
||
ingress_to { | ||
resources = [ "*" ] | ||
operations { | ||
service_name = "storage.googleapis.com" | ||
|
||
method_selectors { | ||
method = "google.storage.objects.create" | ||
} | ||
} | ||
} | ||
} | ||
|
||
egress_policies { | ||
egress_from { | ||
identities = ["group:[email protected]"] | ||
} | ||
egress_to { | ||
resources = [ "*" ] | ||
operations { | ||
service_name = "storage.googleapis.com" | ||
|
||
method_selectors { | ||
method = "google.storage.objects.create" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |