- 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
The option
| Option | 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
- 01 · YouPaste the line from Try it into your agent.
- 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
- 03 · YouApprove a one-line report. Nothing is posted without you.