Case 04 (interactive) - A scripted answer may name who it is for, so facts written for requirements discovery are not given to a Specialist confirming a draft. - A reply that restates what the agreed requirements already say is read as an answer, not a request for changes. - With a user present, a first submission is refused until the user has been shown a draft of that Deliverable (CONFIRM_DRAFTS). Routing and reviews - Intake: a message that starts something is read first. A question is answered and starts nothing; a change to delivered work starts as a new request with a note, until Change requests are built. - Requirements and recommendations list what infrastructure code can show (conditions) apart from what it cannot (outside_code); the latter needs no Check and validation proposes nothing for it. - A requirements review, "names no products", behind its own switch (off). - Each pillar advisor reviews its pillar's checklist; the engine writes the reviews into the design recommendations. The judged checklist check went from 9-45% a pillar to 100% in one run of case 04. Evaluation - Per-case thresholds for Revisions, seconds and tokens, set from every completed run on this build. - A progress file after every agent run, so an interrupted run keeps its time and tokens. - eval/calibrate_judge.py with a 32-question set awaiting a person's labels. Unlabelled: Jev stable at 1.00, Gemini 0.92, agreeing on 0.91. Smaller - An Execution that ends with warnings writes its Deliverables, with the warnings and each status in the manifest. - CI installs the application's dependencies before linting and testing. - A load-balancer pattern in the IaC patterns Skill. Plans record nine runs of 2026-10-08. Iteration 6 is complete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
51 lines
3.0 KiB
Markdown
51 lines
3.0 KiB
Markdown
---
|
|
name: google-cloud-iac-patterns
|
|
description: >-
|
|
Terraform patterns for Google Cloud products that validate against one pinned
|
|
version of the hashicorp/google provider: Cloud Run services and jobs,
|
|
Pub/Sub, Cloud Storage, IAM, Secret Manager, Cloud KMS, Cloud SQL,
|
|
networking, load balancing, Cloud Scheduler, Artifact Registry, Monitoring and API
|
|
enablement. Use when writing Terraform for a Google Cloud product, before
|
|
writing the resource, to start from a pattern whose arguments are known to be
|
|
in the right place.
|
|
metadata:
|
|
scope: deployment guidance
|
|
provider: hashicorp/google 8.6.0
|
|
---
|
|
|
|
# Google Cloud IaC patterns
|
|
|
|
Every pattern here passes `terraform validate` against `hashicorp/google` 8.6.0. A test runs that on each of them, so an argument you copy from a pattern is in the right block.
|
|
|
|
## How to use them
|
|
|
|
1. Write `assets/versions.tf` to your working copy as `terraform/versions.tf`, unchanged. It pins the provider version these patterns and the `terraform_schema` tool describe. Declare the `project_id` and `region` variables it uses in `terraform/variables.tf`.
|
|
2. For each Element in the Target architecture, read the reference for its product with `load_skill_resource` and start from its pattern. Read only the references for products the Target architecture uses.
|
|
3. Change the pattern to meet the Element's Checks. For a setting the pattern does not show, call `terraform_schema` with `find` set to its name before you write it.
|
|
|
|
| Product | Reference |
|
|
| --- | --- |
|
|
| Enabling APIs | `references/project-services.md` |
|
|
| Service accounts and IAM grants | `references/iam.md` |
|
|
| Cloud Run service | `references/cloud-run-service.md` |
|
|
| Cloud Run job | `references/cloud-run-job.md` |
|
|
| Pub/Sub | `references/pubsub.md` |
|
|
| Cloud Storage | `references/cloud-storage.md` |
|
|
| Secret Manager | `references/secret-manager.md` |
|
|
| Cloud KMS | `references/kms.md` |
|
|
| Cloud SQL | `references/cloud-sql.md` |
|
|
| VPC networking | `references/networking.md` |
|
|
| External Application Load Balancer, TLS policy, firewall policy, Identity-Aware Proxy | `references/load-balancer.md` |
|
|
| Cloud Scheduler | `references/cloud-scheduler.md` |
|
|
| Artifact Registry | `references/artifact-registry.md` |
|
|
| Cloud Monitoring and Logging | `references/monitoring.md` |
|
|
|
|
A product with no reference has no pattern yet: write it from `terraform_schema` and the product documentation.
|
|
|
|
## Rules that hold for every product
|
|
|
|
- A Cloud Run service and a Cloud Run job are different resource types with different arguments. A setting of one is not a setting of the other. `references/cloud-run-job.md` lists what a job lacks.
|
|
- Grant a role with an `_iam_member` resource. An `_iam_binding` or `_iam_policy` resource removes grants made elsewhere.
|
|
- Give a Google-managed service agent its role before the resource that needs it, with `depends_on`. A key, a dead-letter topic and a push subscription all need one.
|
|
- Set `deletion_protection` from a variable on the resources that have it, so a test deployment can be removed.
|