💻 Coding

Terraform Module Dependency Map from HCL Inventory (No Invented Resource Counts)

Turn a Terraform HCL inventory into a module dependency map only. No invented resource counts, state serials, or apply-duration figures beyond the inventory.

0.0
0Reviews
P
September 17, 2026

Prompt

Act as a Terraform module dependency cartographer who only uses a pasted HCL inventory. You write a module dependency map the inventory already supports. You do not invent resource counts, state serials, apply-duration figures, or billing secrets not in Inputs. This is not a Terraform cost estimate and not a cloud capacity forecast.
You work only from Inputs. Do not invent stats, citations, quotes, URLs, names, IDs, or records that are not in Inputs.

Inputs:
- HCL inventory I lock (module stubs, source cues, variable notes): [Inventory]
- Terraform / provider version notes I lock: [Version]
- Workspace or org label I may quote (or UNKNOWN): [Workspace]
- Required module or map names I may quote (or UNKNOWN): [SpecNames]
- Module path names already present (or UNKNOWN): [ModuleCues]
- Source and depends_on labels already present (or UNKNOWN): [SourceCues]
- Variable and output notes already present (or UNKNOWN): [VarNotes]
- Words I must not use: [Banned]
- What I must never invent (resource counts, state serials, apply-duration figures, billing secrets): [Never]
- Output format: [Format]
- Language: [Lang]

Generate:
1. Honesty ledger: Inventory nouns, Version, Workspace, SpecNames, ModuleCues, SourceCues, VarNotes, Lang. Forbidden: invented resource counts, state serials, apply-duration figures, billing secrets. Banner: not a Terraform cost estimate; not a cloud capacity forecast.
2. Module dependency map: one numbered row per Inventory module stub or source cue. Missing VarNotes write NOT IN INPUTS. Use Terraform module, source, depends_on, and outputs language when Inventory supports it. Never print resource-count or state-serial VALUES not in Inventory.
3. Spec name set: only names in SpecNames. Unnamed modules stay NOT IN INPUTS. Never invent apply-duration VALUES not in Inventory.
4. Version lock: print Version. Refuse Terraform features newer than Version if Version is named.
5. Refuse list: inventing resource counts, inventing state serials, inventing apply-duration figures, inventing billing secrets.
6. Compliance pass: quote Banned and Never hits. Cut them. Format as Format.

Constraints:
- Map from Inventory only. No invented resource-count VALUES. Teach Terraform module dependency maps, not a Pulumi or CloudFormation swap.
- Honor Version. No emojis.

Instructions

Replace every [bracket] with your details before running. Works on ChatGPT, Claude, and Gemini.

Generated Output

This image was generated using the prompt above.

Terraform Module Dependency Map from HCL Inventory (No Invented Resource Counts) - Result

Examples

Example Input

Inventory: module Harbor Quay network as pasted source cue ./modules/vpc as pasted var notes cidr listed as pasted; module River Ops app as pasted source cue ./modules/ecs as pasted. Resource invent NONE. State invent NONE.
Version: Terraform 1.7 as pasted (do not invent unreleased AI plan pack)
Workspace: Harbor Quay staging org as pasted
SpecNames: network dep map as pasted; app dep map as pasted. Apply duration UNKNOWN.
ModuleCues: modules/vpc as pasted; modules/ecs as pasted. modules/db UNKNOWN.
SourceCues: ./modules/vpc as pasted; ./modules/ecs as pasted. registry UNKNOWN.
VarNotes: cidr listed as pasted. Resource VALUES NOT IN INPUTS.
Banned: guaranteed resources, resource invent, state invent, apply invent
Never: invent resource counts, invent state serials, invent apply-duration figures, invent billing secrets
Format: ledger + table + specs + version + refuse + compliance
Lang: English

Example Output

1. Ledger. Inventory: module Harbor Quay network source cue ./modules/vpc var notes cidr listed; module River Ops app source cue ./modules/ecs. Resource invent NONE. State invent NONE. Version Terraform 1.7. Workspace Harbor Quay staging org. SpecNames network dep map; app dep map; Apply duration UNKNOWN. ModuleCues modules/vpc; modules/ecs; modules/db UNKNOWN. SourceCues ./modules/vpc; ./modules/ecs; registry UNKNOWN. VarNotes cidr listed; Resource VALUES NOT IN INPUTS. Lang English. Banner: not a Terraform cost estimate; not a cloud capacity forecast. Forbidden: invented resource counts, state serials, apply-duration figures, billing secrets, guaranteed resources, resource invent, state invent, apply invent.

2. Module dependency map.
1. Harbor Quay network | ModuleCues modules/vpc as pasted | SourceCues ./modules/vpc as pasted | VarNotes cidr listed as pasted | resource VALUES NONE | state NONE | Terraform module dependency map only.
2. River Ops app | ModuleCues modules/ecs as pasted | SourceCues ./modules/ecs as pasted | VarNotes beyond cidr listed NOT IN INPUTS | resource VALUES NONE | state NONE.
Apply duration UNKNOWN so write apply-duration VALUES NOT IN INPUTS. modules/db not invented beyond ModuleCues.

3. Spec name set. network dep map; app dep map as SpecNames. Unnamed modules NOT IN INPUTS. Never invent apply-duration VALUES.

4. Version lock. Terraform 1.7 as pasted. Refuse unreleased AI plan pack.

5. Refuse list. inventing resource counts; inventing state serials; inventing apply-duration figures; inventing billing secrets.

6. Compliance. Quoted Banned: guaranteed resources, resource invent, state invent, apply invent. Cut. Quoted Never: invent resource counts, invent state serials, invent apply-duration figures, invent billing secrets. Cut. Format ledger + table + specs + version + refuse + compliance.

Missing-data policy: if a field was blank, write NOT IN INPUTS rather than guessing. Lock any tool version named in Inputs; if unnamed, write unknown. No invented testimonials, star ratings, or press logos. If legal, clinical, insurance, HR, education-plan, or veterinary content appears, add a one-line not-advice and de-identify banner. Quote banned-word hits and cut them. End with a gaps list of five bullets the user still owes you. Character and byte caps in the job are hard; print counts when relevant. Refuse to backfill DOIs, exam dumps, PHI, PII, or compensation promises not in Inputs.

Reviews (0)

Please login to leave a review.
Loading reviews...