google-cloud-solution-n-tier-serverless-web-app
Skill này làm gì
Skill này thiết kế ứng dụng web nhiều tầng trên Cloud Run với cách ly mạng chặt chẽ giữa các tầng. Skill dành cho các đội muốn một ứng dụng serverless an toàn với cơ sở dữ liệu riêng tư và dịch vụ nội bộ riêng tư.
Khi nào nên dùng
- ✓Khi bạn muốn thiết kế một ứng dụng web serverless nhiều tầng trên Google Cloud.
- ✓Khi bạn cần các dịch vụ nội bộ riêng tư không có truy cập internet trực tiếp trên Cloud Run.
- ✓Khi ứng dụng serverless của bạn có yêu cầu về nơi lưu trữ dữ liệu (data residency) hoặc chủ quyền dữ liệu tại châu Âu.
Liên kết skill
https://github.com/google/skills/blob/main/skills/cloud/google-cloud-solution-n-tier-serverless-web-app/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Thiết kế một ứng dụng web serverless ba tầng trên Cloud Run với cơ sở dữ liệu Cloud SQL riêng tư và mã Terraform để tôi xem lại.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill thiết lập một tầng công khai phía trước và các tầng nội bộ riêng tư kết nối với nhau qua VPC, với cơ sở dữ liệu được giữ riêng tư. Skill cung cấp danh sách kiểm tra bảo mật và mã Terraform để xem lại.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Secure n-tier serverless web application with strict private application tiers
This skill guides agents through the workflow of designing and implementing a secure serverless web application with as many architectural design layers as specified by the user. It uses Cloud Run for the serverless layers and Cloud SQL for PostgreSQL as the data layer. A three-tier web application might be represented in three architectural layers: a Cloud Run presentation layer, a Cloud Run application layer, and a Cloud SQL for PostgreSQL database layer.
The architecture enforces strict physical and network isolation across all tiers (T1 to TN):
- Tier 1 presentation tier (frontend / reverse proxy): Public-facing UI rendering/gateway service (Cloud Run). Exposes the entry point via Cloud Load Balancing and routes requests downstream to internal tiers privately via Direct VPC Egress.
- Tier 2..N application tier (internal microservices / business logic): Private application services (Cloud Run). 100% isolated from the internet (Ingress: VPC-internal,
INGRESS_TRAFFIC_INTERNAL_ONLY), reachable exclusively via upstream VPC routing (egress = "ALL_TRAFFIC"with Private Google Access on the subnet for*.run.appURLs). - Data tier: Private Cloud SQL for persistent data and Memorystore for Redis for caching, reachable exclusively from authorized application tiers.
Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read and follow the instructions in
Usage Attribution.
General guidance to the LLM
1. Direct Resource Map (Zero-Search File Access)
All necessary reference architectures, HCL templates, and checklists are co-located in this skill. Use exact relative paths from this skill folder:
| Asset Path | Purpose & Usage |
|---|---|
assets/main.tf |
Single Source of Truth for Terraform (HCL). Contains all security boundaries, Cloud Run v2 configs, PSC endpoints, DNS private zones, and firewall rules. |
assets/output-template.md |
Standardized Solution Architecture report markdown structure. |
references/non-negotiable-architectural-rules.md |
Non-negotiable security rules, audit checklist, and product mappings. |
references/related-guidance.md |
Supplemental deep reference (do NOT read for standard design or IaC tasks; read only if specialized edge-case troubleshooting is explicitly required). |
- No Directory Crawling: Do NOT run
list_dirchains down workspace directories to discover these files. - No Search Thrashing on Local Files: Do NOT run
code_searchorfind_by_namequeries to look insideassets/main.tf. Read the file directly usingview_fileonce and reuse the context. - No Redundant Skill Searches: Do NOT call
skill_searchfor serverless or n-tier architecture skills while executing this skill.
2. Direct Inline Generation (No Subagent Delegation)
- Perform all architecture compilation, Terraform drafting,
gcloudcommand assembly, and validation script generation directly in the primary conversation. - Do NOT invoke subagents (
invoke_subagent) to research external GitHub Terraform modules, probe environment configs, or draft reports. All required patterns are fully contained inassets/main.tfandreferences/.
3. One-Shot Clean Artifact Writing
- Generate complete, fully-rendered, and valid HCL blocks and Markdown reports in a single
write_to_filecall. - Avoid leaving placeholders or malformed code fences that require multi-turn
replace_file_contentandgrep_searchpatch loops. - No Unpopulated Placeholders: When embedding code or scripts inside architecture reports (e.g., Section 6 of
assets/output-template.md), always inline the actual complete Terraform code, gcloud commands, and validation script code. Never output literal template placeholder comments (e.g.,# [Paste of main.tf file contents]). - In-Response Direct Rendering (Mandatory): Whenever Terraform code, deployment scripts, or architecture reports are requested or generated (e.g., "provide a design and Terraform code", "generate IaC"), you MUST print the complete generated
terraform ...HCL code block and full solution report directly in your chat response text, in addition to writing them to files on disk. Never output only an architectural design summary or file links when code is requested; automated eva
Câu hỏi thường gặp
Cơ sở dữ liệu có truy cập được từ internet không?
Không. Tầng dữ liệu được giữ riêng tư và chỉ truy cập được qua mạng riêng.
Skill có bao gồm ứng dụng VM hoặc GKE không?
Không. Skill dành cho ứng dụng Cloud Run serverless.
Skill cung cấp những gì?
Thiết kế kiến trúc, danh sách kiểm tra bảo mật, mã Terraform và hướng dẫn triển khai.
Chi tiết
Mô tả gốc của tác giả
Assists in designing and implementing secure n-tier serverless web applications and microservices on Google Cloud. Use when users need architecture designs, security checklists, Terraform code, or deployment guidance for multi-tier serverless apps, regional data residency / European sovereignty compliance, zero-trust private VPC networking, or Private Service Connect. Don't use for VM, GKE, or non-Google Cloud architectures.
repo: google/skills
Độ phổ biến
- Sao GitHub
- 22k
- Vị trí xếp hạng
- #10326
- Giấy phép
- Apache-2.0
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
finding-google-skills
22kGiúp agent của bạn tìm hướng dẫn Google phù hợp cho việc thiết lập, như hosting, cơ sở dữ liệu, lưu trữ, đăng nhập hoặc phục vụ mô hình AI.
gcloud
22kGiúp agent của bạn viết và kiểm tra các lệnh gcloud của Google Cloud, tra cứu cú pháp chính xác trước khi chạy bất cứ thứ gì để không đoán các flag.
google-cloud-recipe-auth
22kHướng dẫn agent của bạn qua quản lý danh tính và quyền truy cập của Google Cloud, gồm cách con người và dịch vụ đăng nhập và những quyền họ nhận được.
google-cloud-recipe-onboarding
22kHướng dẫn một lập trình viên mới qua các bước đầu tiên trên Google Cloud, gồm chọn dự án, liên kết thanh toán và triển khai tài nguyên đầu tiên.
Skill tương tự
api-connector-builder
280kGiúp agent của bạn xây dựng kết nối API mới theo đúng mẫu đã có, dùng khi bạn cần thêm một tích hợp mà không tạo cách làm mới.
api-design
280kGiúp agent của bạn thiết kế REST API theo các thực hành tốt nhất, hữu ích để định nghĩa cách API giao tiếp, hiển thị lỗi và tổ chức dữ liệu.
backend-patterns
280kGiúp agent của bạn với các mẫu kiến trúc phía máy chủ và tối ưu cơ sở dữ liệu, hữu ích khi xây dựng hoặc rà soát code chạy trên máy chủ.