Chuyển đến nội dung
Skillpedia
API và máy chủ (backend)22k · #10326

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.md

Sao 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

Hãy dùng skill này để giúp tôi: https://github.com/google/skills/blob/main/skills/cloud/google-cloud-solution-n-tier-serverless-web-app/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

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.

<!-- disableFinding(all) --> <!-- mdlint off -->

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.app URLs).
  • 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_dir chains down workspace directories to discover these files.
  • No Search Thrashing on Local Files: Do NOT run code_search or find_by_name queries to look inside assets/main.tf. Read the file directly using view_file once and reuse the context.
  • No Redundant Skill Searches: Do NOT call skill_search for serverless or n-tier architecture skills while executing this skill.

2. Direct Inline Generation (No Subagent Delegation)

  • Perform all architecture compilation, Terraform drafting, gcloud command 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 in assets/main.tf and references/.

3. One-Shot Clean Artifact Writing

  • Generate complete, fully-rendered, and valid HCL blocks and Markdown reports in a single write_to_file call.
  • Avoid leaving placeholders or malformed code fences that require multi-turn replace_file_content and grep_search patch 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

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự