To centralize your Secure Web Proxy deployment across multiple VPC networks, you can make Secure Web Proxy available through a Private Service Connect service attachment.
Deploying Secure Web Proxy with Private Service Connect involves the following steps:
- Create a Secure Web Proxy policy and rules.
- Create a Secure Web Proxy instance that uses your policy.
- Create a service attachment to publish the Secure Web Proxy instance as a Private Service Connect service.
- Create a Private Service Connect consumer endpoint in each VPC network that needs to connect to Secure Web Proxy.
- Point your workload's outbound traffic to the centralized Secure Web Proxy instance within the region.
Before you begin
Before completing the steps on this page, complete the initial setup steps.
Create and configure a Secure Web Proxy instance
This guide describes how to create a Secure Web Proxy policy and rules that match traffic by session.
For information about optionally configuring TLS inspection, see Enable TLS inspection.
For information about optionally configuring application-level matching, see Create and deploy a Secure Web Proxy instance.
Create a Secure Web Proxy policy
Console
In the Google Cloud console, go to the SWP Policies page.
Click Create a policy.
Enter a name for the policy that you want to create, such as
myswppolicy.Enter a description of the policy.
In the Regions list, select the region where you want to create the web proxy policy.
Click Create.
Cloud Shell
Create a
policy.yamlfile.description: basic Secure Web Proxy policy name: projects/PROJECT_ID/locations/REGION/gatewaySecurityPolicies/policy1Replace the following:
PROJECT_ID: the project ID of your projectREGION: the region of the policy
Create a Secure Web Proxy policy based on
policy.yaml.gcloud network-security gateway-security-policies import policy1 \ --source=policy.yaml \ --location=REGION
Add Secure Web Proxy rules to your policy
Configure Secure Web Proxy rules to allow egress traffic from each workload.
This section shows how to create a rule to allow traffic from workloads that are identified by Resource Manager tag or service account. For information about matching traffic in other ways, see CEL matcher language reference.