Secure Web Proxy CreateGateway fails with INTERNAL after successful router creation

We are investigating repeated Secure Web Proxy deployment failures in a standalone Google Cloud project in asia-southeast1, using explicit routing. A Google Issue Tracker response directed us to the Community Forum for technical guidance and stated that the issue thread would be closed and no longer monitored.

In two historical deployment attempts on 6 October 2026, the Network Services CreateGateway operation started and then reached terminal google.rpc.INTERNAL (13). In the later attempt, correlated compute.routers.insert start and terminal audit entries show status 0. The initial router request included one provider-generated NAT. This establishes router insertion success, but does not establish NAT runtime health or explain the gateway failure.

The configuration used:

  • A dedicated proxy-only subnet: REGIONAL_MANAGED_PROXY, ACTIVE, IPv4 /23.
  • A separate workload subnet: IPv4 /28.
  • Gateway type SECURE_WEB_GATEWAY, routing mode EXPLICIT_ROUTING_MODE.
  • The addresses field omitted for allocation from the workload subnetwork.
  • A fully qualified gateway security policy URL, one gateway port, and TLS inspection disabled.

Historical, sanitized diagnostics report:

  • The correlated gateway operation was done: true, with error code 13.
  • Its structured error details were empty; no recognized error reason was returned. This does not establish that every field of the operation metadata was inspected.
  • Network Services and Network Security APIs were enabled.
  • No exhausted positive-limit metric was observed in the inspected regional Compute quota inventory. This does not cover every product-specific quota.
  • The inspected effective Cloud NAT restriction allowed usage.
  • Recovery reported zero tracked attempt resources, including provider-generated routers. This is a historical inventory, not a fresh observation. The deleted router cannot now provide live NAT runtime status.
  • Customer-side IAM or service-agent remediation has not been established as the cause or a required fix.

Could someone identify a supported next diagnostic or recovery procedure?

  1. Which exact Network Services long-running operation metadata fields or read-only API calls can reveal a specific cause when the gateway returns INTERNAL with empty structured error details?
  2. Can this terminal sequence be correlated with a known regional or product issue, without assuming that successful router insertion proves successful NAT provisioning?
  3. Is a specific service-agent initialization or permission repair documented for this standalone scenario? If so, please link the official procedure and its preconditions.
  4. If provider investigation requires private identifiers, what appropriate private channel is available? Project identifiers, operation identifiers, principals, raw error messages, request bodies, credentials, and production data are intentionally omitted here.

We are seeking actionable evidence before another deployment attempt; no new retry or configuration change has been performed as part of this follow-up.

When CreateGateway fails with code: 13 (INTERNAL) and an empty details field, the networkservices.googleapis.com operation resource won’t show any additional error context in metadata. To see where the workflow failed, check Cloud Audit Logs around the operation timestamp for compute.googleapis.com and networksecurity.googleapis.com:

gcloud logging read 'logName:("cloudaudit.googleapis.com%2Factivity" OR "cloudaudit.googleapis.com%2Fdata_access") AND protoPayload.serviceName=("compute.googleapis.com" OR "networksecurity.googleapis.com" OR "networkservices.googleapis.com")' \
  --project=<PROJECT_ID> \
  --limit=50 \
  --format="table(timestamp, protoPayload.serviceName, protoPayload.methodName, protoPayload.resourceName, protoPayload.status.code, protoPayload.status.message)"

During CreateGateway, the control plane reserves an internal IP (v1.compute.addresses.insert), creates swg-autogen-router-<network-id> (v1.compute.routers.insert), binds your GatewaySecurityPolicy, and provisions the proxy data plane. If the policy binding or data-plane provisioning fails, the control plane rolls back by deleting the reserved gateway IP (v1.compute.addresses.delete) before returning INTERNAL. Checking whether v1.compute.addresses.delete appears right after v1.compute.routers.insert - or if an Organization Policy or VPC Service Controls denial logged at that timestamp - will narrow down where it failed.

Can this terminal sequence be correlated with a known regional or product issue, without assuming that successful router insertion proves successful NAT provisioning?

There wasn’t a known regional outage in asia-southeast1 on October 6 for Secure Web Proxy. Seeing compute.routers.insert finish with status: 0 just confirms the control plane created swg-autogen-router-<network-id> and swg-autogen-nat and moved on to the next step (CreateGateway doesn’t wait on NAT runtime state after the router insert operation completes).

Since the failure happened after compute.routers.insert, my assumption is that either 1) binding the GatewaySecurityPolicy failed (for example, if the policy references a TlsInspectionPolicy or other sub-resource in an invalid state or mismatched region), or 2) the gateway hit a Secure Web Proxy quota in asia-southeast1 (which is tracked under networkservices.googleapis.com rather than regional Compute Engine quotas). Also note that when CreateGateway rolls back a failed attempt, it deletes the gateway IP address but leaves swg-autogen-router-<network-id> and swg-autogen-nat in place for reuse. Deleting the entire swg-autogen-router-<network-id> router during cleanup is fine, as long as you don’t delete swg-autogen-nat while leaving the router behind.

Is a specific service-agent initialization or permission repair documented for this standalone scenario? If so, please link the official procedure and its preconditions.

When TLS inspection is disabled, CreateGateway doesn’t use a service agent to create the VPC resources. It runs the subnet checks, IP allocation, swg-autogen-router-<network-id> creation, and GatewaySecurityPolicy binding using the caller’s own IAM credentials, which is why the roles and permissions guide requires the deploying principal to have compute.networks.get, compute.subnetworks.get, compute.subnetworks.use, compute.addresses.*, compute.routers.*, and networksecurity.gatewaySecurityPolicies.use. Initializing the Network Security service agent (gcloud beta services identity create --service=``networksecurity.googleapis.com) is only required when enabling TLS inspection so it can access your Private CA pool.

If provider investigation requires private identifiers, what appropriate private channel is available? Project identifiers, operation identifiers, principals, raw error messages, request bodies, credentials, and production data are intentionally omitted here.

Because INTERNAL (code: 13) masks the underlying backend error, finding the exact failure reason requires looking up the internal logs using your project number and operation-... ID. The supported private channels for that are either 1) opening a Cloud Customer Care support case or 2) reaching out to your Google Cloud account team (Customer Engineer or Technical Account Manager) with the full projects/<project>/locations/asia-southeast1/operations/operation-... resource names and timestamps.

okay zachs, thanks for your response

Hi Zachs, We completed the additional read-only quota and audit checks.

For the target region, the Console graph for “Gateways per region” shows a limit of 50 and peak usage of 1 (2%) across a displayed period including the failed deployment. The GatewaySecurityPolicies graph shows a limit of 10 and peak usage of 1 (10%) over the displayed 14-day period. Current usage is zero for both. These graphs do not show either quota approaching capacity; we have not independently confirmed whether a separate SWP-specific or concurrent quota applies.

The correlated audit sequence remains: router insertion completed with status 0, followed by terminal CreateGateway INTERNAL (13). Permissions shown for the gateway-create and router-create entries are granted. A targeted search around the failed operation found no entries mentioning gatewaySecurityPolicies.use, no authorizationInfo.granted=false, and no status code 7. We understand that an empty search is not proof of complete authorization.

The preserved provisioning source disables TLS inspection and has no tlsInspectionPolicy reference. This is source evidence, not independent proof of backend state. The failed resources have been cleaned up; no new deployment or IAM repair has been attempted.

Could you help clarify the remaining diagnostic boundary?

  1. Does the RegionalGateways quota cover SECURE_WEB_GATEWAY, or is there another SWP-specific/concurrent metric we should check? Please provide the exact quota identifier if different.
  2. With TLS inspection disabled, which supported read-only evidence can distinguish GatewaySecurityPolicy binding failure from proxy data-plane provisioning failure after rollback?
  3. Is gatewaySecurityPolicies.use expected to appear in authorizationInfo for CreateGateway? If it is not logged there, what resource scope and supported permission-check procedure should we use, given that the original policy was deleted during rollback?
  4. Is there a public operation field, audit event, or known issue that can identify the failed stage without a new deployment? If only private backend logs can resolve it, please confirm that limitation and whether a no-paid-support product escalation route is available.

We can provide sanitized observations, but will not publish credentials, principal values, raw operation identifiers, raw error messages, or request bodies. Retry remains unauthorized.

Does the RegionalGateways quota cover SECURE_WEB_GATEWAY, or is there another SWP-specific/concurrent metric we should check? Please provide the exact quota identifier if different.

Yes, RegionalGateways (metric identifier networkservices.googleapis.com/regional-gateways, along with the global networkservices.googleapis.com/gateways metric) is the exact allocation quota charged by CreateGateway for SECURE_WEB_GATEWAY. Secure Web Proxy also enforces a product limit of 5 Secure Web Proxy instances per project per region, which isn’t exposed as a separate Service Usage metric. Since your peak usage on RegionalGateways was 1 and current usage is 0, you aren’t hitting a gateway quota limit.

With TLS inspection disabled, which supported read-only evidence can distinguish GatewaySecurityPolicy binding failure from proxy data-plane provisioning failure after rollback?

There isn’t a customer-visible log or API call that separates those two stages after rollback. Both the GatewaySecurityPolicy binding and the data-plane configuration push run over internal control-plane RPCs that don’t emit Cloud Audit Logs.

However, the control plane’s error handling still narrows this down. When binding the GatewaySecurityPolicy, a missing policy, wrong region, or missing networksecurity.gatewaySecurityPolicies.use permission returns INVALID_ARGUMENT (code: 3) rather than INTERNAL (code: 13). Assuming the GatewaySecurityPolicy was in the same project and region as the gateway, a code: 13 result after compute.routers.insert points to the backend data-plane provisioning step.

Is gatewaySecurityPolicies.use expected to appear in authorizationInfo for CreateGateway? If it is not logged there, what resource scope and supported permission-check procedure should we use, given that the original policy was deleted during rollback?

No, networksecurity.gatewaySecurityPolicies.use isn’t logged in protoPayload.authorizationInfo on the CreateGateway audit entry. That entry only records the initial networkservices.gateways.create check on the gateway resource, while networksecurity.gatewaySecurityPolicies.use is evaluated later inside the operation when attaching the policy.

Since the original policy was deleted, you can verify the deploying principal’s effective permission at the project level using gcloud policy-intelligence troubleshoot-iam (or projects.testIamPermissions):

gcloud policy-intelligence troubleshoot-iam //cloudresourcemanager.googleapis.com/projects/<PROJECT_ID> \
  --principal-email=<PRINCIPAL_EMAIL> \
  --permission=networksecurity.gatewaySecurityPolicies.use

Is there a public operation field, audit event, or known issue that can identify the failed stage without a new deployment? If only private backend logs can resolve it, please confirm that limitation and whether a no-paid-support product escalation route is available.

I can confirm that limitation - once CreateGateway rolls back and finishes with INTERNAL (code: 13) and an empty details array, no public operation field or customer-side audit event exposes the underlying backend exception. Only internal control-plane logs (indexed by project number and the operation-... ID) contain the exact failure reason.

There isn’t a formal escalation path for project-specific log lookups. If you file a public Issue Tracker ticket, frame it as an unhandled code: 13 (INTERNAL) control-plane bug rather than a configuration question and ask the triager for a restricted comment to share the operation ID. Then let me know the bug ID and I’ll try to follow up internally.