feat: opt-in published Terraform modules from approved sources (iteration 8)
Infrastructure code is plain resources by default. An Execution may opt in with terraform_modules; the deployment default is TERRAFORM_MODULES, off. - A module is accepted only from the registry namespaces the provider bundle lists (terraform-google-modules), at one exact version. Any other source is refused before Terraform runs; until now nothing stopped generated code naming any source for terraform init to download. - terraform_module looks up a module's inputs, outputs and submodules from the registry and says when it cannot be used with the pinned provider. - skills/google-cloud-iac-modules: when a module fits, and four modules with examples a test validates against hashicorp/google 8.6.0. - Opted in, the IaC author and validator get the Skill and the lookup. Not opted in, they get neither and a module block is refused in code. - A Change request follows its Baseline. execution.json records the choice. - case-07 runs case 03's request with modules opted into. Azure (aztfm) and AWS (terraform-aws-modules) sources are recorded in the plan for when those Cloud providers are added. No case has run with this. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -64,7 +64,7 @@ pillar_skills:
|
||||
sustainability: google-cloud-waf-sustainability
|
||||
|
||||
tools:
|
||||
general: [mermaid_check, terraform_fmt, terraform_validate, terraform_schema]
|
||||
general: [mermaid_check, terraform_fmt, terraform_validate, terraform_schema, terraform_module]
|
||||
cloud_read: [terraform_plan]
|
||||
|
||||
# The Terraform providers generated code is written for. One exact version, so the
|
||||
@@ -75,6 +75,15 @@ terraform:
|
||||
google:
|
||||
source: hashicorp/google
|
||||
version: 8.6.0
|
||||
# Published modules. Generated code is plain resources unless an Execution opts
|
||||
# into modules; then a `module` may come only from these registry namespaces, at
|
||||
# one exact version. `terraform init` downloads and evaluates whatever a source
|
||||
# names, so anything else is refused before Terraform runs. `skill` holds the
|
||||
# modules known to work with the provider pinned above, and is given, with the
|
||||
# terraform_module tool, only to an Execution that opted in.
|
||||
modules:
|
||||
namespaces: [terraform-google-modules]
|
||||
skill: google-cloud-iac-modules
|
||||
|
||||
mcp_auth:
|
||||
kind: google_adc # Application Default Credentials bearer token; sends X-Goog-User-Project
|
||||
|
||||
Reference in New Issue
Block a user