Case 03's request once each way, both at 100%. Opted in, a module was used for private Cloud SQL only and 14 Checks were met through its inputs. The difference in time and cost between the two runs is their Revisions, not the modules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3.3 KiB
3.3 KiB
Plan Map
Iteration: 8, Terraform modules Intent: Let generated infrastructure code call a published Terraform module where one replaces several resources that must be wired together, without losing the Requirements chain or opening a way for arbitrary code to be downloaded. Status: steps 1 to 5 built and run once each way on 2026-10-09; steps 6 and 7 wait on those Cloud providers This directory covers: steps 1 to 7
The owner's request (2026-10-09)
Use modules, when necessary, from three organisations:
| Cloud provider | Source | Here |
|---|---|---|
| Google Cloud | https://github.com/terraform-google-modules | built: the terraform-google-modules registry namespace is allowed in providers/gcp.yaml |
| Azure | https://github.com/aztfm | recorded for step 6: there is no Azure provider bundle |
| AWS | https://github.com/terraform-aws-modules | recorded for step 7: there is no AWS provider bundle |
The owner's decision, 2026-10-09: plain resources by default, with an opt-in to known approved sources.
- Opt-in per Execution. A caller sets
terraform_modules; the deployment's default isTERRAFORM_MODULES, off. A Change request does as its Baseline did unless told otherwise. - Approved sources are the provider bundle's list. Opted in, a module is still used only from the tested catalogue and only where it replaces three or more resources that depend on each other.
- Google now. The tooling names no Cloud provider; the bundle and a Skill do (ADR-0002).
What was found first
terraform initdownloads and evaluates whatever asourcenames. Before this iteration nothing stopped generated code naming any Git URL.- A module carries its own provider requirements. Of 23 modules in the Google organisation looked at, these require
googlebelow 8 and cannot be used with the pinned 8.6.0:lb-http,pubsub,bigquery,kubernetes-engine,log-export,event-function,scheduled-function,bastion-host. So a catalogue has to be tested, whichever rule decides when a module is used. - Code using two modules validated in 11 seconds against the pinned provider, modules downloaded.
Status
| Step | What | Status |
|---|---|---|
| 1 | Allow modules only from namespaces the bundle lists, at one exact version | built: check_module_sources in app/tools/modules.py, run before every validate and plan |
| 2 | A lookup of what a module accepts | built: the terraform_module tool, from the public registry, for the IaC author and the validator |
| 3 | A Skill with the catalogue and the rule for when to use one | built: skills/google-cloud-iac-modules/, four references, each validated by a test |
| 4 | Checks through a module | built as guidance: implementation.json names the module input; the validator confirms what the input sets |
| 5 | Opt-in per Execution, plain resources by default | built: terraform_modules on a start, /generate, A2A metadata and an evaluation case; recorded in execution.json |
| 5a | Run a case each way and see what the agents do with it | run once each way on 2026-10-09, both at 100%; a module was used for private Cloud SQL only |
| 6 | Azure: aztfm |
waits on an Azure provider bundle |
| 7 | AWS: terraform-aws-modules |
waits on an AWS provider bundle |
Detail: steps/step-1-to-5.md.