Skip to content
DevOps AI ToolKit
Newsletter
All prompts
AI for OpenTofu Difficulty: Intermediate ClaudeChatGPT

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

More OpenTofu prompts & error guides

Browse every OpenTofu prompt and troubleshooting guide in one place.

Free download · 368-page PDF

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.