Build API Gateway v2 configurations with OpenAPI specs, gateway service accounts, and backend routing.
Build API Gateway v2 configurations with API definitions, OpenAPI specs, gateway service accounts, and backend routing.
Required Fields
api.nameapiConfig.nameapiConfig.gatewayServiceAccountgateway.namegateway.apiConfigOutput will appear here...Build an API Gateway v2 configuration spanning the Api, ApiConfig, and Gateway resources: the Api is the logical container, the ApiConfig holds an immutable OpenAPI document plus the gatewayServiceAccount that the managed proxy uses to invoke your backend, and the Gateway is the deployed, regional instance serving traffic. ApiConfigs are immutable once created, updating a route or backend address means creating a brand-new ApiConfig and pointing the Gateway at it, not patching the existing one, which is a deliberate versioning/rollback design rather than an oversight.
An API team ships a v2 ApiConfig with an updated OpenAPI spec pointing at a new backend service, but every request starts failing with 403 immediately after the Gateway repoints, because the new backend is a different Cloud Run service and the existing gatewayServiceAccount was never granted invoker on it. They use the builder to lay out the full three-resource chain, catch that apiConfig.gatewayServiceAccount needs an explicit IAM binding on the new backend before cutover, grant roles/run.invoker to that service account, and the same ApiConfig starts serving traffic cleanly on retry.
An OpenAPI document with a syntax error or unsupported extension fails ApiConfig creation with an error that can be vague, validate the raw YAML/JSON with a standalone OpenAPI linter before submitting it through this flow to isolate spec bugs from IAM bugs.
Because ApiConfigs are immutable, every iteration during active development creates a new one, clean up stale ApiConfigs periodically or the Api resource accumulates dozens of unused configs that make the 'which one is live' question harder to answer during an incident.
The x-google-backend address must be reachable from Google's managed infrastructure, a Cloud Run service with ingress locked to "internal" will reject the gateway's calls even with correct IAM, since ingress control and IAM invoker permission are enforced independently.
The builder requires api.name, apiConfig.name, apiConfig.gatewayServiceAccount, gateway.name, and gateway.apiConfig to all resolve, reflecting that a Gateway resource is only valid once it references a real ApiConfig, which in turn is only valid once it references a service account with actual invoke permission on the backend, three linked resources rather than one flat config.
Was this tool helpful?
Disclaimer: This tool runs entirely in your browser. No data is sent to our servers. Always verify outputs before using them in production. AWS, Azure, and GCP are trademarks of their respective owners.