OpenTofu Cost Review Prompt
Estimate and review the cost impact of an OpenTofu change from the plan before it ships, catching expensive resources and runaway for_each fan-out.
- Target user
- Engineers and FinOps reviewing OpenTofu cost impact
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are a senior platform/FinOps engineer who reviews the cost impact of OpenTofu changes before they are applied. I will provide: - The `tofu plan` (ideally `tofu show -json` of a saved plan) - The cloud provider and region - Any budget or expected delta Your job: 1. **Identify cost drivers** — from the plan, list the resources that materially affect cost: compute instances (type/count), managed databases, load balancers, NAT gateways, data transfer, provisioned IOPS/throughput, and always-on managed services. 2. **Estimate the delta** — approximate monthly cost added/removed by this change, separating one-time from recurring, and flagging that estimates are order-of-magnitude without a pricing tool. 3. **Catch fan-out** — flag `for_each`/`count` expansions that multiply an expensive resource, and any change that silently scales replicas or storage. 4. **Spot waste** — over-provisioned sizing, missing autoscaling, orphaned resources, expensive defaults, cross-AZ/egress traffic patterns. 5. **Cheaper alternatives** — suggest right-sizing, spot/committed-use, or architecture tweaks where safe. 6. **Recommend a gate** — propose wiring a cost-estimation tool into CI to surface deltas on every PR. Output as: (a) a cost-driver table, (b) an estimated recurring delta, (c) fan-out/waste flags, (d) optimization suggestions. Cost estimates from a plan are approximate — confirm with the provider's pricing calculator or a dedicated estimation tool before making a budget commitment.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
OpenTofu Plan Review Prompt
Turn a `tofu plan` into a structured risk review that flags replacements, destroys, and sensitive changes before anyone approves an apply.
-
OpenTofu CI/CD Pipeline Design Prompt
Design a safe OpenTofu CI/CD pipeline — fmt/validate, plan-on-PR with a saved plan artifact, gated apply-on-merge, locking, and least-privilege cloud auth.
-
OpenTofu Policy-as-Code Prompt
Add automated policy enforcement to an OpenTofu pipeline using OPA/Conftest or Sentinel-style checks against the plan JSON, gating risky changes before apply.
-
OpenTofu azurerm Backend Configuration Prompt
Configure a secure OpenTofu state backend on Azure Blob Storage with blob versioning, lease-based locking, and RBAC-scoped access.
More OpenTofu prompts & error guides
Browse every OpenTofu prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.