Complete the code to create a VPC Service Controls perimeter with the correct resource type.
resource "google_access_context_manager_service_perimeter" "example" { name = "accessPolicies/123/servicePerimeters/example" title = "Example Perimeter" perimeter_type = "[1]" }
The perimeter_type must be set to PERIMETER_TYPE_REGULAR to create a standard VPC Service Controls perimeter.
Complete the code to specify the access policy ID in the perimeter resource.
resource "google_access_context_manager_service_perimeter" "example" { name = "accessPolicies/[1]/servicePerimeters/example" title = "Example Perimeter" perimeter_type = "PERIMETER_TYPE_REGULAR" }
The access policy ID is a numeric string used in the resource name path, such as 123.
Fix the error in the resource block by completing the list of resources inside the perimeter.
resource "google_access_context_manager_service_perimeter" "example" { name = "accessPolicies/123/servicePerimeters/example" title = "Example Perimeter" perimeter_type = "PERIMETER_TYPE_REGULAR" spec { resources = ["[1]"] } }
The resources list must contain full resource names, such as projects/your-project-id.
Fill both blanks to specify the access levels and restricted services in the perimeter spec.
resource "google_access_context_manager_service_perimeter" "example" { name = "accessPolicies/123/servicePerimeters/example" title = "Example Perimeter" perimeter_type = "PERIMETER_TYPE_REGULAR" spec { access_levels = ["[1]"] restricted_services = ["[2]"] } }
The access_levels field requires the full access level resource name, and restricted_services requires the service name like storage.googleapis.com.
Fill all three blanks to define a VPC Service Controls perimeter with title, perimeter type, and resource.
resource "google_access_context_manager_service_perimeter" "example" { name = "accessPolicies/123/servicePerimeters/example" title = "[1]" perimeter_type = "[2]" spec { resources = ["[3]"] } }
The title is a friendly name like My Perimeter, the perimeter_type should be PERIMETER_TYPE_REGULAR for a standard perimeter, and resources must be full resource names like projects/my-project-id.