Skip to content

Enabling Global Access API to Secure Web Proxy resources#18248

Draft
DasJayYa wants to merge 4 commits into
GoogleCloudPlatform:mainfrom
DasJayYa:feat/swp-global
Draft

Enabling Global Access API to Secure Web Proxy resources#18248
DasJayYa wants to merge 4 commits into
GoogleCloudPlatform:mainfrom
DasJayYa:feat/swp-global

Conversation

@DasJayYa

@DasJayYa DasJayYa commented Jul 10, 2026

Copy link
Copy Markdown

Overview

Secure Web Proxy now supports Global Access allowing clients to connect from any region to the SWP.

Enabling the new allowGlobalAccess api as an optional property for the google_network_services_gateway resource. This feature allows users to create Web Proxies that will allow traffic from clients outside of the region where the gateway is located.

The NetworkServices / Gateway provider module should be updated to support the new

Updated Resource(s)

google_network_services_gateway

resource "google_network_services_gateway" "webproxy" {
  name                                 = "test-web-proxy-gateway"
  location                             = "australia-southeast1"
  type                                 = "SECURE_WEB_GATEWAY"
  ports                                = [443]
  gateway_security_policy              = google_network_security_gateway_security_policy.gateway-policy.id
  network                              = "projects/test-project/global/networks/my-vpc"
  subnetwork                           = "projects/test-project/regions/australia-southeast1/subnetworks/my-subnetwork"
  allow_global_access                  = true
  delete_swg_autogen_router_on_destroy = true
}

Updated testAccNetworkServicesGateway_basicSwp Go Test with new property to validate terraform.

Google Docs

Fixes hashicorp/terraform-provider-google#28204

Testing

Local Go Tests Results on change. Updated test

make testacc TEST=./google-beta/services/networkservices TESTARGS='-run=TestAccNetworkServicesGateway_networkServicesGatewayBasicExample$$'

-----------------------------------------------------
2026/07/10 14:45:19 [DEBUG] Got done: false while polling for operation projects/<redacted>/locations/us-central1/operations/operation-1783658706517-6563a679a3fe5-9614feb2-0310ecef's status
2026/07/10 14:45:29 [DEBUG] Waiting for state to become: [success]
2026/07/10 14:45:29 [DEBUG] Google API Request Details:
---[ REQUEST ]---------------------------------------
GET /v1/projects/<redacted>/locations/us-central1/operations/operation-1783658706517-6563a679a3fe5-9614feb2-0310ecef?alt=json HTTP/1.1
Host: networkservices.googleapis.com
User-Agent: Terraform/1.5.7 (+https://www.terraform.io) Terraform-Plugin-SDK/2.40.1 terraform-provider-google-beta/acc
Content-Type: application/json
Accept-Encoding: gzip


-----------------------------------------------------
2026/07/10 14:45:30 [DEBUG] Google API Response Details:
---[ RESPONSE ]--------------------------------------
HTTP/2.0 200 OK
Content-Type: application/json; charset=UTF-8
Date: Fri, 10 Jul 2026 04:45:30 GMT
Server: ESF
Vary: Origin
Vary: X-Origin
Vary: Referer
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 0

{
  "name": "projects/<redacted>/locations/us-central1/operations/operation-1783658706517-6563a679a3fe5-9614feb2-0310ecef",
  "metadata": {
    "@type": "type.googleapis.com/google.cloud.networkservices.v1.OperationMetadata",
    "createTime": "2026-07-10T04:45:06.670795327Z",
    "endTime": "2026-07-10T04:45:28.306445296Z",
    "target": "projects/<redacted>/locations/us-central1/gateways/tf-test-my-gateway1vcdc8h8207",
    "verb": "create",
    "requestedCancellation": false,
    "apiVersion": "v1"
  },
  "done": true,
  "response": {
    "@type": "type.googleapis.com/google.cloud.networkservices.v1.Gateway",
    "name": "projects/<redacted>/locations/us-central1/gateways/tf-test-my-gateway1vcdc8h8207",
    "createTime": "2026-07-10T04:45:06.665142185Z",
    "updateTime": "2026-07-10T04:45:06.665142185Z",
    "labels": {
      "goog-terraform-provisioned": "true"
    },
    "type": "SECURE_WEB_GATEWAY",
    "addresses": [
"10.128.0.99"
    ],
    "scope": "tf-test-my-default-scope1vcdc8h8207",
    "ports": [
443
    ],
    "network": "projects/<<redacted>>/global/networks/tf-test-my-networkvcdc8h8207",
    "subnetwork": "projects/<redacted>/regions/us-central1/subnetworks/tf-test-my-subnetwork-namevcdc8h8207",
    "gatewaySecurityPolicy": "projects/<redacted>/locations/us-central1/gatewaySecurityPolicies/tf-test-my-policy-namevcdc8h8207",
    "allowGlobalAccess": true
  }
}

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jul 10, 2026
@google-cla

google-cla Bot commented Jul 10, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-approval Pull requests that need reviewer's approval to run presubmit tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for allow_global_access config for Secure Web Gateway creation

2 participants