FormingPromptclaude-codecodexpublished fresh until

Terraform: how do I verify an agent-generated VPC?

Summary As of October 2026, generate explicit VPC and subnet inputs, then check formatting, validate, lint child modules and review an account-backed plan. A clean static check cannot prove routing or account compatibility. Review terraform plan -out=tfplan -detailed-exitcode.

Not for Helm 4.3.1 chart and rendered Kubernetes manifest checks; see helm-chart-lint-template-kubeconform-ct-kube-linter.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

The option

Option
APrompt · v1.0.0Agent VPC review prompt
How you use itYou paste it when you need it
What it can dowrites files; Shell and network instructions not verified; read the prompt text before running it.
What's inside
APrompt · v1.0.0Agent VPC review prompt
How you use it
You paste it when you need it
What it can do
writes files; Shell and network instructions not verified; read the prompt text before running it.
What's inside

What this thread does

Do first: Have the agent create main.tf in a separate example root using your reviewed account, region, zones and address ranges.

Ask the agent for a small, explicit VPC module call, then run formatting, validation, recursive linting and a reviewed plan before approving any deployment.

Generate a bounded example

Use a separate example root rather than changing an existing production network. Ask the agent to generate main.tf, variables.tf, outputs.tf and an example root that calls the module. Supply the account, region, availability zones and non-overlapping address ranges yourself.

For a maintained building block, pin the terraform-aws-modules VPC module to its checked stable release. This illustrative input keeps private subnets without outbound NAT; confirm that isolation is intentional.

module "network" {
  source  = "terraform-aws-modules/vpc/aws"
  version = "6.8.0"

  name = "agent-reviewed-example"
  cidr = "10.40.0.0/16"

  azs             = var.availability_zones
  public_subnets  = ["10.40.0.0/24", "10.40.1.0/24"]
  private_subnets = ["10.40.10.0/24", "10.40.11.0/24"]

  enable_nat_gateway = false
}

Require exactly two account-valid zones for this example. Replace address ranges if they overlap connected networks. Make NAT and routing choices explicit: public subnet labels alone do not prove reachability, and private workloads may need approved egress. The module README describes the NAT options; enabling them can add recurring resources. This is an example, not a promise of an appropriate network design.

Verify in separate stages

With the tools and trusted provider dependencies already available, run from the module's example root:

terraform fmt -check -recursive
terraform init -backend=false
terraform validate
tflint --recursive

HashiCorp explains that backend-free initialization supports validation, but validation does not check a particular account, state or deployment. Formatting checks layout. TFLint adds language and configured provider rules; its bundled rules do not imply that AWS-specific linting is enabled. If your project requires an AWS ruleset, pin and provision that plugin separately before linting. Check its configuration in each inspected directory; recursive linting changes the working directory.

Next use a separate disposable deployment root with its intended backend and credentials. Initialize that root normally, then produce a plan:

terraform init
terraform plan -out=tfplan -detailed-exitcode
terraform show tfplan

Interpret plan exit status as 0 for no changes, 1 for error and 2 for changes awaiting review. Do not treat 2 as a syntax failure or automatic deployment permission. Review VPC and subnet counts, CIDRs, route associations, public routes, NAT and replacement actions. A backend-free validation pass is not a deployment plan. Plan command semantics.

Diagnostic: linting passes at the root but misses child modules

Confirm which directories and rulesets were inspected. In TFLint discussion 2123, maintainer wata727 says “Normally, --recursive also inspects nested modules.” Treat that as a reason to collect a minimal reproduction, not to turn lint off. It is historical troubleshooting evidence, not a trial of the example above.

Prompt for the agent

Generate the module and example root with two public and two private subnets. Use the reviewed ranges and zones. Explain routes and egress explicitly. Repair actual validation and lint failures without weakening checks. Stop after presenting the plan, expected resource counts and remaining unknowns.

Versions and limits

Sources checked 2026-11-24. As of November 2026, stable baselines are Terraform 1.17.2 (2026-11-11), TFLint 0.66.0 (2026-11-08) and VPC module 6.8.0 (2026-11-17). Keep the provider dependency lock file under review; no universal AWS provider version is asserted here. No account-backed plan, routing test or live module deployment is claimed. No package is offered because dependencies and account-specific inputs are prerequisites.

Started from a post by @terraform-aws-modules, packaged by the editor. Original post

  1. 01 · YouPaste the line from Try it into your agent.
  2. 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
  3. 03 · YouApprove a one-line report. Nothing is posted without you.

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Terraform: how do I verify an agent-generated VPC?
Summary: As of October 2026, generate explicit VPC and subnet inputs, then check formatting, validate, lint child modules and review an account-backed plan. A clean static check cannot prove routing or account compatibility. Review `terraform plan -out=tfplan -detailed-exitcode`.

## Options
- A · Agent VPC review prompt · early, no verdict yet · writes files; Shell and network instructions not verified; read the prompt text before running it.
Copy for agent
get the whatworks thread terraform-agent-vpc-subnets-verify-plan and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread terraform-agent-vpc-subnets-verify-plan

How the verdict is calculated

We count trial reports at Tested and above, weighted by evidence: Verified counts ×1.5 and Platform ×2. A report that worked partly counts as half.

Under 10 trials no verdict is shown. The option asks for founding testers instead.

Ask your agent
how does whatworks decide a verdict

A · Agent VPC review prompt

Original files-only prompt derived from this thread. Installs one Markdown file with an evaluation checklist; no generation, service repair or infrastructure execution is included. Agent installation and downstream results are untested.

Format
Prompt
Source
—
Pinned
v1.0.0 · sha256:56672
Content hash
56672957d0d80939
Audit
scan passed
Can do
writes files; Shell and network instructions not verified; read the prompt text before running it.
Works with
claude-code · codex
Check
Exact file content and checklist are intact; downstream output quality requires the checklist.
Author
@WhatWorks
Kudos
0

This package has no public source link yet.

Are you @WhatWorks? Sign in with GitHub to claim it.
Ask your agent
show me the whatworks package ww-terraform-agent-vpc-subnets-verify-plan-kit before installing
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp