google-cloud-solution-n-tier-serverless-web-app
できること
このスキルは、各層の間を厳密にネットワーク分離した多層構成の Web アプリを Cloud Run 上に設計します。非公開のデータベースと非公開の内部サービスを備えた、安全なサーバーレスアプリを求めるチーム向けです。
使う場面
- ✓Google Cloud 上で、多層構成のサーバーレス Web アプリを設計したいとき。
- ✓Cloud Run で、インターネットから直接アクセスできない非公開の内部サービスが必要なとき。
- ✓サーバーレスアプリにデータの所在地や欧州のデータ主権の要件があるとき。
スキルのリンク
https://github.com/google/skills/blob/main/skills/cloud/google-cloud-solution-n-tier-serverless-web-app/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“非公開の Cloud SQL データベースを備えた、Cloud Run 上の安全な 3 層 Web アプリを、私がレビューできる Terraform コードとともに設計してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
公開のフロント層と、VPC 経由で互いに接続する非公開の内部層を設定します。データベースは非公開のままにします。セキュリティのチェックリストと、レビュー用の Terraform コードを提供します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
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
よくある質問
データベースはインターネットから接続できますか?
いいえ。データ層は非公開で、非公開ネットワークを通じてのみ接続できます。
VM や GKE のアプリにも対応しますか?
いいえ。サーバーレスの Cloud Run アプリが対象です。
何を提供しますか?
アーキテクチャ設計、セキュリティチェックリスト、Terraform コード、展開の案内です。
詳細
作者による元の説明
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
人気
- GitHubのスター
- 22k
- ランキング
- #10326
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
finding-google-skills
22kセットアップ作業に合うGoogleの公式ガイドを探すようエージェントを支援します。ホスティング、データベース、ストレージ、サインイン、AIモデルの提供などが対象です。
gcloud
22kエージェントが、Google CloudのgcloudコマンドについてWeb検索に頼らず、正確な構文を確かめてから書いたり確認したりできるよう支援します。
google-cloud-recipe-auth
22kエージェントが、Google Cloudのアイデンティティとアクセス(人やサービスがどうサインインし、どの権限を得るか)について、手順を案内できるよう支援します。
google-cloud-recipe-onboarding
22k新しい開発者が、プロジェクトの選択、請求の設定、最初のリソースのデプロイなど、Google Cloudの最初の手順を進められるよう案内します。
似ているスキル
api-connector-builder
280kエージェントが既存のパターンに従って、新しいAPI連携を構築します。新しい方式を作らずに、もう一つ連携を追加したいときに使います。
api-design
280kエージェントがベストプラクティスに沿ってREST APIを設計できるようにします。APIの通信方法、エラーの表示方法、データの整理方法を決めるのに役立ちます。
backend-patterns
280kエージェントのサーバーサイドのアーキテクチャパターンとデータベースの最適化を支援します。サーバー上で動くコードを作成またはレビューするときに役立ちます。