google-cloud-solution-n-tier-serverless-web-app

Designs secure n-tier serverless web applications on Google Cloud with Terraform and validation scripts.

19.1k|1.5k|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/google/skills --skill google-cloud-solution-n-tier-serverless-web-app
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: google-cloud-solution-n-tier-serverless-web-app
Source: https://github.com/google/skills/tree/main/skills/cloud/google-cloud-solution-n-tier-serverless-web-app
Command: npx skills add https://github.com/google/skills --skill google-cloud-solution-n-tier-serverless-web-app

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

Designing a secure multi-tier serverless web application on Google Cloud requires coordinating Cloud Run ingress isolation, VPC egress firewalls, Private Service Connect, Cloud Armor WAF, and Cloud SQL IAM authentication, which is error-prone when done manually.

Core Features & Use Cases

  • Guided Architecture Workflow: Walks through requirements discovery, solution design, implementation planning, and validation phases with an opinionated 3-tier golden path (Cloud Run frontend, Cloud Run backend, Cloud SQL PostgreSQL 18).
  • Terraform and gcloud Generation: Produces complete HCL infrastructure code based on a single-source-of-truth main.tf plus bottom-up gcloud CLI deployment commands.
  • Security Boundary Enforcement: Applies 9 non-negotiable architectural rules covering ingress isolation, least-privilege NGFW egress, Private Service Connect, and optional VPC Service Controls.
  • Use Case: A developer needs a HIPAA-conscious 3-tier web app with a private database; the skill generates the architecture report, Terraform code, and a custom validation script verifying WAF blocking and private connectivity.

Quick Start

Ask the agent to design a secure three-tier serverless web application on Google Cloud with a private Cloud SQL PostgreSQL database and generate the Terraform code.

Frequently Asked Questions about google-cloud-solution-n-tier-serverless-web-app

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy a secure three-tier web app on Google Cloud?

Use Cloud Run for the presentation and application tiers with Cloud SQL PostgreSQL for the data tier. Restrict frontend ingress to the load balancer, set backend ingress to VPC-internal only, and connect the database via Private Service Connect with IAM authentication.

How do I make Cloud Run backend services private?

Set ingress to INGRESS_TRAFFIC_INTERNAL_ONLY so the service rejects internet traffic. Callers must use Direct VPC Egress with ALL_TRAFFIC, Private Google Access on the subnet, and a Cloud DNS private zone mapping *.run.app to Private Google Access VIPs.

Should I use a global or regional Application Load Balancer on Google Cloud?

Use a global external Application Load Balancer for worldwide audiences and Cloud CDN edge caching. Choose a regional load balancer for strict data residency compliance, but note it requires a proxy-only subnet, an explicit network parameter on the forwarding rule, and does not support Cloud CDN.

Why does my Cloud Run service fail to connect to Cloud SQL with private IP?

Connection failures often occur because the Cloud SQL Auth Proxy sidecar needs outbound TCP 443 to Private Google Access VIPs for IAM certificate exchange, in addition to TCP 5432 to the database. Default-deny egress firewalls that block port 443 cause container startup crashes.

When should I not use this serverless n-tier architecture?

Do not use this approach when designing VM-based or GKE-based architectures, or when the workload is not deployed on Google Cloud. It is specifically scoped to Cloud Run serverless tiers with Cloud SQL and Memorystore data services.