0
0
GCPcloud~10 mins

VPC Service Controls in GCP - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - VPC Service Controls
Start: Define Service Perimeter
Select Google Cloud Services
Add Resources to Perimeter
Enforce Access Restrictions
Monitor Access & Logs
Adjust Perimeter as Needed
End
This flow shows how you create a secure boundary around your cloud resources by defining a perimeter, selecting services, adding resources, enforcing restrictions, monitoring, and adjusting.
Execution Sample
GCP
gcloud access-context-manager perimeters create perimeter-1 \
  --title="My Perimeter" \
  --resources=projects/123456789 \
  --restricted-services=storage.googleapis.com,bigquery.googleapis.com
This command creates a service perimeter named 'perimeter-1' that restricts access to Storage and BigQuery for the specified project.
Process Table
StepActionInput/CommandResult/State Change
1Define PerimeterCreate perimeter-1 with title 'My Perimeter'Perimeter 'perimeter-1' created
2Select ServicesRestrict services: storage.googleapis.com, bigquery.googleapis.comServices restricted inside perimeter
3Add ResourcesAdd project 123456789 to perimeterProject added to perimeter
4Enforce RestrictionsApply perimeter policiesAccess to restricted services limited to perimeter
5Monitor AccessCheck audit logs for perimeter accessLogs show allowed and denied access attempts
6Adjust PerimeterAdd another project or servicePerimeter updated with new resources
7ExitNo more changesPerimeter enforces access controls as configured
💡 No more perimeter changes; access controls active
Status Tracker
VariableStartAfter Step 1After Step 2After Step 3After Step 4After Step 5After Step 6Final
Perimeter NameNoneperimeter-1perimeter-1perimeter-1perimeter-1perimeter-1perimeter-1perimeter-1
Restricted ServicesNoneNonestorage.googleapis.com, bigquery.googleapis.comstorage.googleapis.com, bigquery.googleapis.comstorage.googleapis.com, bigquery.googleapis.comstorage.googleapis.com, bigquery.googleapis.comstorage.googleapis.com, bigquery.googleapis.comstorage.googleapis.com, bigquery.googleapis.com
Resources in PerimeterNoneNoneNoneprojects/123456789projects/123456789projects/123456789projects/123456789, new-projectprojects/123456789, new-project
Access EnforcementOffOffOffOnOnOnOnOn
Audit Logs CheckedNoNoNoNoYesYesYesYes
Key Moments - 3 Insights
Why can't resources outside the perimeter access restricted services?
Because the perimeter enforces access restrictions at step 4, blocking access from outside resources as shown in the execution_table row 4.
Can you add more projects after creating the perimeter?
Yes, as shown in step 6, you can adjust the perimeter to include more projects or services.
What happens if you don't specify restricted services?
No services are restricted, so the perimeter won't block access; this is implied by the absence of restricted services in step 2.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table at step 3, what resource is added to the perimeter?
Astorage.googleapis.com
Bperimeter-1
Cprojects/123456789
Dbigquery.googleapis.com
💡 Hint
Check the 'Input/Command' and 'Result/State Change' columns at step 3 in the execution_table.
At which step does access enforcement become active?
AStep 2
BStep 4
CStep 5
DStep 6
💡 Hint
Look at the 'Access Enforcement' variable in variable_tracker and the 'Result/State Change' in execution_table.
If you add a new project at step 6, what changes in the variable_tracker?
AResources in Perimeter list updates
BPerimeter Name changes
CRestricted Services list changes
DAudit Logs Checked resets
💡 Hint
Check the 'Resources in Perimeter' row in variable_tracker after step 6.
Concept Snapshot
VPC Service Controls create a secure boundary called a perimeter.
You define which Google Cloud services are restricted inside it.
Add projects or resources to the perimeter to protect them.
Access outside the perimeter to restricted services is blocked.
Monitor access with audit logs and adjust perimeter as needed.
Full Transcript
VPC Service Controls help protect your cloud resources by creating a secure perimeter. You start by defining a perimeter and giving it a name. Then, you select which Google Cloud services should be restricted inside this perimeter, like Storage or BigQuery. Next, you add your projects or resources to this perimeter. Once set, the perimeter enforces access restrictions, blocking access to restricted services from outside resources. You can monitor access attempts using audit logs to see allowed or denied requests. If needed, you can adjust the perimeter by adding more projects or services. This process ensures your sensitive data stays protected within your defined boundary.