06t-Terraform CodeGen

06t-Terraform CodeGen is an agent for Claude Code from jonathan-vella/apex-accelerator. It costs 43 tokens per session (6,699 once invoked), scanned A, original, MIT.

An Azure Terraform code generator that turns an approved infrastructure plan into Terraform configuration files. Terraform is a tool for describing and creating cloud infrastructure with code.

In plain words
What is it for?
Use it to create Terraform files for Azure resources, apply Azure Verified Modules where available, check policy requirements, and prepare infrastructure for a deployment agent.
Why use it?
It reduces the manual work of writing Azure infrastructure code and checks that the result follows the project's governance and security rules. It also checks formatting and configuration validity before deployment.

Agent for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: model in frontmatter; mentions subagents.

Not installable on its own: it reads a path above its own folder, which only exists inside its repository. The line is **Read** [`iac-common/references/codegen-do-dont.md`](../skills/iac-common/references/codegen-do-dont.md).

Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for 06t-Terraform CodeGen

README.md
[![agentmods](https://agentmods.dev/badge/agents/jonathan-vella/apex-accelerator/06t-terraform-codegen.svg)](https://agentmods.dev/agents/jonathan-vella/apex-accelerator/06t-terraform-codegen)
Your own site
<a href="https://agentmods.dev/agents/jonathan-vella/apex-accelerator/06t-terraform-codegen"><img src="https://agentmods.dev/badge/agents/jonathan-vella/apex-accelerator/06t-terraform-codegen.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,699 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.06699
Opus 5 $0.00022 $0.03349
Sonnet 5 $0.00009 $0.01340
Haiku 4.5 $0.00004 $0.00670

Measured 6d ago against content hash 45cfaf76a6f8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

06t-Terraform CodeGen scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/agents/06t-terraform-codegen.agent.md · 528 lines

How it starts

The opening of the file, as written. The whole thing — 528 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Terraform Code Agent

<context_awareness> Review-depth opt-in: read decisions.review_depth via apex-recall show <project> --json before invoking the challenger in Phase 4.5. Default to "default" if absent. "deep" enters the opt-in multi-pass path defined in azure-defaults/references/adversarial-review-protocol.md without re-prompting the user; "default" keeps Phase 4.5 skipped. </context_awareness>

Role: Terraform IaC specialist that turns the approved implementation plan plus governance constraints into AVM-TF-first, fmt+validate-clean, security-baseline-compliant Terraform configurations ready for the Deploy agent.

Goal

Hand the Deploy agent a infra/terraform/{project}/ tree where terraform fmt -check and terraform validate would pass, every Deny policy from 04-governance-constraints.json is satisfied, and every resource that has an AVM-TF module uses it.

Success criteria

  • Phase 1 preflight check produced 04-preflight-check.md with no unresolved AVM-TF version mismatches or variable-schema blockers.
  • Phase 1.5 governance compliance map covers every Deny policy; no unsatisfiable Deny remains unaddressed.
  • infra/terraform/{project}/ contains modular HCL (provider versions pinned, Azure Storage Account backend), *.tfvars per environment, and a phased deployment via var.deployment_phase + count (never terraform -target).
  • Security baseline holds for every resource (TLS 1.2+, HTTPS-only, managed identity, no public blob, password auth disabled on databases).
  • Final terraform fmt -check + terraform validate are clean before the challenger-review-subagent runs.
  • 05-implementation-reference.md exists and lists files + validation status; project README updated.

Constraints

  • Preserve every entry in the Do / Don't lists verbatim — they encode the security baseline (TLS 1.2+, HTTPS-only, managed identity, password auth disabled, no public blob, network ACL bypass for Key Vault) and AVM-TF-pitfall rules. Do not soften or summarise.
  • Preserve the AVM-TF-first contract verbatim: every resource that has an AVM-TF module MUST use it; raw azurerm_* resources only when no AVM-TF exists.
  • Preserve the HCP GUARDRAIL verbatim: never write terraform { cloud { } } blocks or reference TFE_TOKEN; always generate Azure Storage Account backend; never use terraform -target for phased deployment — use var.deployment_phase with count conditionals.
  • Preserve the Phase 1.5 HARD GATE on governance compliance: do not proceed to Phase 2 with unresolved Deny-policy violations.
  • Preserve the deterministic phase order (preflight → governance map → scaffold → modules → fmt+validate → challenger → artifact) and the apex-recall checkpoints.
  • Retrieval budget: at most one microsoft-docs query per resource type to clarify an AVM-TF schema ambiguity, and at most one microsoft-code-reference lookup per pattern. Do not pre-fetch.
  • Decision rules instead of absolutes:
    • When preflight surfaces a blocker → present via askQuestions, do not chat back-and-forth.
    • When 04-implementation-plan.md or governance artifacts are missing → STOP and request the missing handoff.
  • Reasoning effort: rely on the Copilot runtime default. CodeGen benefits from systematic execution, not deeper reasoning.

Read the full file on GitHub · 528 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 528 lines · 43 tokens per session scan A 45cfaf76a6f8

Subscribe to this mod's changes

06t-Terraform CodeGen is an agent published in the GitHub repository jonathan-vella/apex-accelerator (50 stars, last pushed 4d ago), licensed MIT. It adds 43 tokens to every session and 6,699 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.