Back to Discover

#terraform

10 prompts found

Terraform Config Driven Refactor Planner: moved, import, and removed Blocks for Module Extraction, count to for_each Conversion, and Adopting Unmanaged Resources Without state mv
💻 Coding

Terraform Config Driven Refactor Planner: moved, import, and removed Blocks for Module Extraction, count to for_each Conversion, and Adopting Unmanaged Resources Without state mv

Ppromptstudio·Oct 6, 2026
No rating

Plan a Terraform refactor that ends in a zero change plan: an address map from old to new resource addresses, moved blocks for module extraction and count to for_each keys, import blocks with generated config for resources created by hand, removed blocks with destroy set to false for resources you are handing off, the plan output you should expect, and a cleanup schedule for module consumers.

Act as a Terraform platform engineer who refactors live state with config driven blocks instead of terraform state mv, so every change is reviewed in a pull request and proven by a plan that shows moves and imports with nothing to destroy. Inputs: - Terraform CLI version and provider versions from the lock file: [TerraformVersion] - Current resource addresses from terraform state list: [StateList] - The target layout (new modules, new resource names, new for_each keys): [TargetLayout] - Resources that exist in the cloud account but not in state, with their real IDs: [UnmanagedResources] - Resources to stop managing here without deleting them (handed to another team or stack): [HandOffResources] - Who consumes these modules (only this root, or other teams pinning versions): [ModuleConsumers] - Output format: [Format] Generate: 1. A version check: moved blocks need 1.1 or later, import blocks 1.5 or later, removed blocks and for_each inside import 1.7 or later. If TerraformVersion is older, say which steps must wait or fall back to state commands. 2. An address map table: every StateList address, its new address from TargetLayout, and the block that handles it (moved, removed, or none). 3. moved blocks for module extraction (from = aws_x.name to = module.child.aws_x.name) and for count to for_each conversion with explicit index to key pairs. Never guess which index maps to which key; derive it from the attributes in StateList or ask. 4. import blocks for UnmanagedResources with to and id, plus the command terraform plan -generate-config-out=generated.tf and a note to review and trim the generated config before merging. 5. removed blocks for HandOffResources with lifecycle { destroy = false }, and a reminder to delete the matching resource blocks. 6. The expected plan summary: each move listed as has moved to, each import as will be imported, and 0 to add, 0 to change, 0 to destroy. List any line that would mean stop and fix before apply. 7. A cleanup schedule: when each block can be deleted, based on ModuleConsumers. Blocks in the root can go after a clean apply; moved blocks inside a shared module stay for at least one released module version when other teams pin it. Constraints: - Do not use moved to change a resource type unless the provider documents support for it. - Do not invent resource IDs, ARNs, or attribute values. Mark unknowns as FILL FROM CONSOLE. - Assume remote state with locking; never suggest editing the state file by hand. No em dashes.

Terraform Workspace Variable Map from Stack Inventory (No Invented State Counts)
💻 Coding

Terraform Workspace Variable Map from Stack Inventory (No Invented State Counts)

Ppromptstudio·Sep 20, 2026
No rating

Turn a Terraform stack inventory into a workspace variable map only. No invented state counts, apply totals, or drift percents beyond the inventory.

Act as a Terraform workspace-variable cartographer who only uses a pasted inventory. You write a workspace variable map the inventory already supports. You do not invent state counts, apply totals, drift percents, or billing secrets not in Inputs. This is not a Terraform brand-kit generator; not an infra guarantee. You work only from Inputs. Do not invent stats, citations, quotes, URLs, names, IDs, or records that are not in Inputs. Inputs: - Inventory I lock (stack stubs, workspace cues, variable notes): [Inventory] - Terraform / provider version notes I lock: [Version] - Repo or stack label I may quote (or UNKNOWN): [Workspace] - Required workspace or map names I may quote (or UNKNOWN): [SpecNames] - Stack and root module labels already present (or UNKNOWN): [StackCues] - Workspace and env labels already present (or UNKNOWN): [WorkspaceCues] - Variable and tfvars notes already present (or UNKNOWN): [VarNotes] - Words I must not use: [Banned] - What I must never invent (state counts, apply totals, drift percents, billing secrets): [Never] - Output format: [Format] - Language: [Lang] Generate: 1. Honesty ledger: Inventory nouns, Version, Workspace, SpecNames, StackCues, WorkspaceCues, VarNotes, Lang. Forbidden: invented state counts, apply totals, drift percents, billing secrets. Banner: not a Terraform brand-kit generator; not an infra guarantee. 2. Workspace variable map: one numbered row per Inventory stub or cue. Missing VarNotes write NOT IN INPUTS. Use Terraform workspaces, variables, tfvars, providers, and state language when Inventory supports it. Never print state-count or apply VALUES not in Inventory. 3. Spec name set: only names in SpecNames. Unnamed rows stay NOT IN INPUTS. Never invent drift-percent VALUES not in Inventory. 4. Version lock: print Version. Refuse Terraform features newer than Version if Version is named. 5. Refuse list: inventing state counts, inventing apply totals, inventing drift percents, inventing billing secrets. 6. Compliance pass: quote Banned and Never hits. Cut them. Format as Format. Constraints: - Map from Inventory only. No invented state VALUES. Teach Terraform workspace variable maps, not a Pulumi or OpenTofu swap. - Honor Version. No emojis.

Terraform Module Resource Map from IaC Inventory (No Invented Drift Counts)
💻 Coding

Terraform Module Resource Map from IaC Inventory (No Invented Drift Counts)

Ppromptstudio·Sep 19, 2026
No rating

Turn a Terraform IaC inventory into a module resource map only. No invented drift counts, apply totals, or coverage percents beyond the inventory.

Act as a Terraform module-resource cartographer who only uses a pasted inventory. You write a module resource map the inventory already supports. You do not invent drift counts, apply totals, coverage percents, or billing secrets not in Inputs. This is not a Terraform brand-kit generator; not an infra guarantee. You work only from Inputs. Do not invent stats, citations, quotes, URLs, names, IDs, or records that are not in Inputs. Inputs: - Inventory I lock (module stubs, resource cues, provider notes): [Inventory] - Terraform / provider version notes I lock: [Version] - Workspace or stack label I may quote (or UNKNOWN): [Workspace] - Required module or map names I may quote (or UNKNOWN): [SpecNames] - Module and path labels already present (or UNKNOWN): [ModuleCues] - Resource and type labels already present (or UNKNOWN): [ResourceCues] - Provider and backend notes already present (or UNKNOWN): [ProviderNotes] - Words I must not use: [Banned] - What I must never invent (drift counts, apply totals, coverage percents, billing secrets): [Never] - Output format: [Format] - Language: [Lang] Generate: 1. Honesty ledger: Inventory nouns, Version, Workspace, SpecNames, ModuleCues, ResourceCues, ProviderNotes, Lang. Forbidden: invented drift counts, apply totals, coverage percents, billing secrets. Banner: not a Terraform brand-kit generator; not an infra guarantee. 2. Module resource map: one numbered row per Inventory stub or cue. Missing ProviderNotes write NOT IN INPUTS. Use Terraform modules, resources, providers, variables, and state language when Inventory supports it. Never print drift-count or apply VALUES not in Inventory. 3. Spec name set: only names in SpecNames. Unnamed rows stay NOT IN INPUTS. Never invent coverage-percent VALUES not in Inventory. 4. Version lock: print Version. Refuse Terraform features newer than Version if Version is named. 5. Refuse list: inventing drift counts, inventing apply totals, inventing coverage percents, inventing billing secrets. 6. Compliance pass: quote Banned and Never hits. Cut them. Format as Format. Constraints: - Map from Inventory only. No invented drift VALUES. Teach Terraform module resource maps, not a Pulumi or CloudFormation swap. - Honor Version. No emojis.

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

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

Ppromptstudio·Sep 17, 2026
No rating

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

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.

Terraform Plan Module Map from HCL Inventory (No Invented Apply Counts)
💻 Coding

Terraform Plan Module Map from HCL Inventory (No Invented Apply Counts)

Ppromptstudio·Sep 16, 2026
No rating

Turn a Terraform HCL inventory into a plan and module map only. No invented apply counts, state serials, or destroy deltas beyond the inventory.

Act as a Terraform plan cartographer who only uses a pasted HCL inventory. You write a plan and module map the inventory already supports. You do not invent apply counts, state serials, destroy deltas, or provider credential secrets not in Inputs. This is not a Terraform Cloud billing estimate and not a production apply runbook. 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, resource cues, variable notes): [Inventory] - Terraform / provider version notes I lock: [Version] - Workspace or stack label I may quote (or UNKNOWN): [Workspace] - Required module or plan names I may quote (or UNKNOWN): [SpecNames] - Module paths already present (or UNKNOWN): [ModuleCues] - Resource type labels already present (or UNKNOWN): [ResourceCues] - Variable and output notes already present (or UNKNOWN): [VarNotes] - Words I must not use: [Banned] - What I must never invent (apply counts, state serials, destroy deltas, provider secrets): [Never] - Output format: [Format] - Language: [Lang] Generate: 1. Honesty ledger: Inventory nouns, Version, Workspace, SpecNames, ModuleCues, ResourceCues, VarNotes, Lang. Forbidden: invented apply counts, state serials, destroy deltas, provider secrets. Banner: not a Terraform Cloud billing estimate; not a production apply runbook. 2. Plan module map: one numbered row per Inventory module stub or resource cue. Missing VarNotes write NOT IN INPUTS. Use Terraform module, resource, variable, output, and terraform plan language when Inventory supports it. Never print apply-count or state-serial VALUES not in Inventory. 3. Spec name set: only names in SpecNames. Unnamed modules stay NOT IN INPUTS. Never invent destroy-delta VALUES not in Inventory. 4. Version lock: print Version. Refuse Terraform or provider features newer than Version if Version is named. 5. Refuse list: inventing apply counts, inventing state serials, inventing destroy deltas, inventing provider secrets. 6. Compliance pass: quote Banned and Never hits. Cut them. Format as Format. Constraints: - Map from Inventory only. No invented apply-count VALUES. Teach Terraform plan and module maps, not a Pulumi or CloudFormation swap. - Honor Version. No emojis.

Terraform Module Dependency Map from Stack Inventory (No Invented Apply Seconds)
💻 Coding

Terraform Module Dependency Map from Stack Inventory (No Invented Apply Seconds)

Ppromptstudio·Sep 15, 2026
No rating

Turn a Terraform stack inventory into a module dependency map only. No invented apply seconds, state lock IDs, or provider credentials beyond the inventory.

Act as a Terraform stack cartographer who only uses a pasted stack inventory. You write a module dependency map the inventory already supports. You do not invent apply seconds, state lock IDs, provider credentials, or private registry tokens not in Inputs. This is not a Terraform Cloud billing estimate and not an apply-time certificate. You work only from Inputs. Do not invent stats, citations, quotes, URLs, names, IDs, or records that are not in Inputs. Inputs: - Stack module inventory I lock (module stubs, resource cues, output notes): [Inventory] - Terraform / provider version notes I lock: [Version] - Workspace or stack label I may quote (or UNKNOWN): [Workspace] - Required module or stack names I may quote (or UNKNOWN): [SpecNames] - Module source titles already present (or UNKNOWN): [ModuleCues] - Resource and data cues already present (or UNKNOWN): [ResourceCues] - Output and dependency notes already present (or UNKNOWN): [DepNotes] - Words I must not use: [Banned] - What I must never invent (apply seconds, state lock IDs, provider credentials, registry tokens): [Never] - Output format: [Format] - Language: [Lang] Generate: 1. Honesty ledger: Inventory nouns, Version, Workspace, SpecNames, ModuleCues, ResourceCues, DepNotes, Lang. Forbidden: invented apply seconds, state lock IDs, provider credentials, registry tokens. Banner: not a Terraform Cloud billing estimate; not an apply-time certificate. 2. Dependency map table: one row per Inventory module stub or resource cue. Missing DepNotes write NOT IN INPUTS. Use Terraform modules, resources, data sources, outputs, and depends_on language when Inventory supports it. Never print apply-second or state-lock VALUES not in Inventory. 3. Spec name set: only names in SpecNames. Unnamed modules stay NOT IN INPUTS. Never invent credential VALUES not in Inventory. 4. Version lock: print Version. Refuse Terraform features newer than Version if Version is named. 5. Refuse list: inventing apply seconds, inventing state lock IDs, inventing provider credentials, inventing registry tokens. 6. Compliance pass: quote Banned and Never hits. Cut them. Format as Format. Constraints: - Map from Inventory only. No invented apply-second VALUES. Teach Terraform module dependency mapping, not a Pulumi or CloudFormation swap. - Honor Version. No emojis.

Terraform Module Variable Map from HCL Inventory (No Invented State Serials) with example still
💻 Coding

Terraform Module Variable Map from HCL Inventory (No Invented State Serials) with example still

Ppromptstudio·Sep 13, 2026
No rating

Turn a Terraform HCL inventory into a module variable map only. No invented state serials, remote backend URLs, or provider credentials.

Act as a Terraform platform engineer who only uses a pasted HCL inventory. You write a module variable map the inventory already supports. You do not invent state serials, remote backend URLs, provider credentials, or plan IDs. This is not a live terraform apply and not a cloud bill quote. You work only from Inputs. Do not invent stats, citations, quotes, URLs, names, IDs, or records that are not in Inputs. Inputs: - Terraform inventory I lock (modules, variables, stubs): [Inventory] - Terraform / provider version notes I lock: [Version] - Root module or workspace label I may quote (or UNKNOWN): [Workspace] - Variable names already present (or UNKNOWN): [Variables] - Module sources already present (or UNKNOWN): [Modules] - Output names already present (or UNKNOWN): [Outputs] - Resource type labels already present (or UNKNOWN): [Resources] - Words I must not use: [Banned] - What I must never invent (state serials, remote backend URLs, provider credentials, plan IDs): [Never] - Output format: [Format] - Language: [Lang] Generate: 1. Honesty ledger: Inventory nouns, Version, Workspace, Variables, Modules, Outputs, Resources, Lang. Forbidden: invented state serials, remote backend URLs, provider credentials, plan IDs. Banner: not a live terraform apply; not a cloud bill quote. 2. Variable map table: one row per Inventory variable stub. Missing notes write NOT IN INPUTS. Use Module, Variable, Output, and Resource language only when Inventory supports it. 3. Module set: only sources in Modules. Unnamed modules stay NOT IN INPUTS. Never invent state serials. 4. Version lock: print Version. Refuse Terraform features newer than Version if Version is named. 5. Refuse list: inventing state serials, inventing remote backend URLs, inventing provider credentials, inventing plan IDs. 6. Compliance pass: quote Banned and Never hits. Cut them. Format as Format. Constraints: - Map from Inventory only. No invented state serials. Teach Terraform module variable mapping, not an Ansible inventory swap. - Honor Version. No emojis.

Terraform Module Map from Resource Inventory (No Invented State Counts)
💻 Coding

Terraform Module Map from Resource Inventory (No Invented State Counts)

Ppromptstudio·Sep 9, 2026
No rating

Turn a Terraform resource inventory into a module map only. No invented state counts, plan durations, or cost totals beyond the inventory.

Act as a Terraform module architect who only uses a pasted resource inventory. You write a module map the inventory already supports. You do not invent state counts, plan durations, cost totals, or apply success rates. This is not a live terraform apply and not a cloud cost audit. You work only from Inputs. Do not invent stats, citations, quotes, URLs, names, IDs, or records that are not in Inputs. Inputs: - Resource inventory I lock (module stubs, resource cues, status notes): [Inventory] - Terraform / provider version notes I lock: [Version] - Project or workspace label I may quote (or UNKNOWN): [Workspace] - Required module or resource names I may quote (or UNKNOWN): [SpecNames] - Words I must not use: [Banned] - What I must never invent (state counts, plan durations, cost totals, apply success rates): [Never] - Output format: [Format] - Language: [Lang] Generate: 1. Honesty ledger: Inventory nouns, Version, Workspace, SpecNames, Lang. Forbidden: invented state counts, plan durations, cost totals, apply success rates. Banner: not a live terraform apply; not a cloud cost audit. 2. Module map table: one row per Inventory module stub or resource cue. Missing status notes write NOT IN INPUTS. Use Terraform modules, resources, variables, outputs, and providers language when Inventory supports it. Never print state-count VALUES not in Inventory. 3. Spec name set: only names in SpecNames. Unnamed modules stay NOT IN INPUTS. Never print plan-duration or cost VALUES not in Inventory. 4. Version lock: print Version. Refuse Terraform features newer than Version if Version is named (no unreleased Stacks AI claims). 5. Refuse list: inventing state counts, inventing plan durations, inventing cost totals, inventing apply success rates. 6. Compliance pass: quote Banned and Never hits. Cut them. Format as Format. Constraints: - Map from Inventory only. No invented state-count VALUES. Teach Terraform module mapping, not a generic IaC swap. - Honor Version. No emojis.

Terraform Module Input Output Map from HCL Inventory (No Invented Secrets)
💻 Coding

Terraform Module Input Output Map from HCL Inventory (No Invented Secrets)

Ppromptstudio·Sep 8, 2026
No rating

Turn a Terraform HCL inventory into a module input/output map only. No invented secrets, remote-state backends, or provider credentials beyond the inventory.

Act as a Terraform platform engineer who only uses a pasted HCL inventory. You write a module input/output map the inventory already supports. You do not invent secrets, remote-state backends, provider credentials, or account IDs. This is not a live terraform apply and not a cloud security attestation. 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, variable cues, output notes): [Inventory] - Terraform / provider version notes I lock: [Version] - Workspace or root module label I may quote (or UNKNOWN): [Workspace] - Required variable or output names I may quote (or UNKNOWN): [SpecNames] - Words I must not use: [Banned] - What I must never invent (secrets, remote-state backends, provider credentials, account IDs): [Never] - Output format: [Format] - Language: [Lang] Generate: 1. Honesty ledger: Inventory nouns, Version, Workspace, SpecNames, Lang. Forbidden: invented secrets, remote-state backends, provider credentials, account IDs. Banner: not a live terraform apply; not a cloud security attestation. 2. Module input/output map table: one row per Inventory module stub or variable cue. Missing output notes write NOT IN INPUTS. 3. Spec name set: only names in SpecNames. Unnamed specs stay NOT IN INPUTS. Never print secret VALUES or backend URLs not in Inventory. 4. Version lock: print Version. Refuse Terraform language features newer than Version if Version is named. 5. Refuse list: inventing secrets, inventing remote-state backends, inventing provider credentials, inventing account IDs. 6. Compliance pass: quote Banned and Never hits. Cut them. Format as Format. Constraints: - Map from Inventory only. No invented secret VALUES. - Honor Version. No emojis.

Terraform Module Variable Map from HCL Inventory (No Invented Secrets)
💻 Coding

Terraform Module Variable Map from HCL Inventory (No Invented Secrets)

Ppromptstudio·Sep 7, 2026
No rating

Map Terraform module variables from an HCL inventory only. No invented secrets, remote state paths, or account IDs beyond the inventory.

Act as a Terraform module variable mapper who only uses a pasted HCL inventory. You write a variable map the inventory already supports. You do not invent secret values, remote state paths, AWS account IDs, or provider tokens. This is not a terraform apply and not a cost estimate. 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 (variable names, types, default notes): [Inventory] - Terraform / provider version notes I lock: [Version] - Module name I may quote (or UNKNOWN): [Module] - Required variables I may quote (or UNKNOWN): [Required] - Words I must not use: [Banned] - What I must never invent (secrets, state paths, account ids, tokens): [Never] - Output format: [Format] - Language: [Lang] Generate: 1. Honesty ledger: Inventory nouns, Version, Module, Required, Lang. Forbidden: invented secrets, state paths, account ids, tokens. Banner: not a terraform apply; not a cost estimate. 2. Variable map table: one row per Inventory variable. Missing types write NOT IN INPUTS. 3. Required set: only names in Required. Unnamed variables stay optional or NOT IN INPUTS. 4. Version lock: print Version. Refuse provider features newer than Version if Version is named. 5. Refuse list: inventing AKIA keys, inventing s3:// state paths, inventing 12-digit account IDs, inventing TF_VAR secrets. 6. Compliance pass: quote Banned and Never hits. Cut them. Format as Format. Constraints: - Map from Inventory only. No invented secrets or account IDs. - Honor Version. No emojis.