Join our Newsletter — 33% off our NHI Course
Home› FAQ› Governance, Ownership & Risk› Should cost review happen before or after Terraform…
Governance, Ownership & Risk

Should cost review happen before or after Terraform deployment?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated October 10, 2026 Domain: Governance, Ownership & Risk

Before deployment. Once resources exist, the cost decision has already been made and the control becomes reactive. Pre-deployment cost diffs and approval gates are more effective because they stop unnecessary spend from entering the environment in the first place.

Why the cost decision belongs before Terraform applies

Cost review should happen before deployment because Terraform is an execution step, not a budgeting step. Once the plan is applied, infrastructure exists, bills can start accruing, and the team has already crossed from evaluation into consumption. The useful control point is the plan stage, where the diff is visible, reversible, and still cheap to reject.

That timing matters because infrastructure as code makes spend easy to create at scale. A small configuration change can expand instance counts, storage, network paths, or managed services in one apply, so pre-deployment review needs to look at the whole change set, not just the intended feature. For teams running multi-account or multi-environment estates, even minor drift in module inputs can create material cost leakage.

A Terraform-related supply chain incident is a useful reminder that Terraform workflows can sit inside broader release and dependency risk. Even when the issue is not cost-related, the same discipline applies, review the change before it lands, because post-apply cleanup is always slower than pre-apply rejection.

What pre-deployment cost review should actually examine

Cost review is not only about total monthly estimate. It should check whether the change introduces a new service class, changes sizing, creates always-on resources, or removes lifecycle guards such as auto-shutdown, retention limits, or environment-specific scoping. A configuration that looks harmless in code can still be expensive if it turns on durable storage, public endpoints, cross-region replication, or larger-than-expected compute.

The strongest review method is to compare the planned state against the current state and ask what new billing surfaces appear. That includes direct charges, but also indirect cost effects such as logging volume, data transfer, backup growth, support plan thresholds, and duplicated environments. The right question is not “is this feature worth it?” but “what spend becomes unavoidable if we approve this diff?”

This is why the configuration management and governance functions matter here. A mature Terraform process treats cost as part of controlled change, not a separate finance afterthought, because the approved configuration is what creates the spend profile.

How teams should gate Terraform changes without slowing delivery

The practical pattern is to make cost review a pre-merge or pre-apply gate, not a post-deploy report. That can be as lightweight as a policy check on the plan output, or as strict as requiring approval for changes that exceed a cost threshold or introduce a new class of resource. The key is that the approval happens while the environment is still hypothetical.

Good teams separate routine, low-risk changes from changes that alter spend shape. For example, tag-only updates or small variable refinements may not need human finance review, while new clusters, larger node pools, replicated data stores, or internet-facing managed services should trigger a cost sign-off. Cost-impact review before release is a sensible control model because it keeps the decision close to the change request, where context is richest.

The same principle appears in the OWASP Non-Human Identity Top 10 discussion of long-lived automation and overprivilege: once a control is deployed, the blast radius is already in motion. Terraform cost approval is similar, once the apply runs, the budget decision is no longer theoretical.

Risk and Threat Considerations

When cost review happens after deployment, the main risk is uncontrolled spend accumulation. Teams can create permanent or hard-to-dismantle resources before anyone notices the financial impact, especially in fast-moving CI/CD environments where applies are frequent and distributed across many engineers.

Failure mechanism: Terraform applies commit the environment to the cloud provider, so cost-bearing resources, especially always-on or usage-amplifying services, begin generating charges before a post-deploy review can intervene.

Impact: The organisation absorbs avoidable spend, loses the chance to prevent waste up front, and may also inherit secondary risk such as quota pressure, budget overruns, or pressure to undo production-safe infrastructure changes too late.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

CIS Controls v8 and NIST CSF 2.0 set the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.

FrameworkControl / ReferenceRelevance
CIS Controls v8CIS-4 — Secure Configuration of Enterprise Assets and SoftwareTerraform cost gates rely on controlled, approved configuration changes.
Recommendation — Enforce pre-apply approval for infrastructure changes that increase recurring spend.
NIST CSF 2.0GV.RM-01 — Risk Management StrategyPre-deployment cost review is a change-risk decision tied to governance and spend exposure.
Recommendation — Require cost-impact review before approving infrastructure changes.
ISO/IEC 27001:2022A.8.9 — Configuration managementInfrastructure-as-code changes should be reviewed before activation to control resulting exposure and cost.
Recommendation — Review Terraform plans before deployment and approve only controlled, intended changes.

Practitioner Guidance

What to prioritise: Put cost review at the same control point as plan approval, not after the apply. If the diff introduces a new resource class or increases capacity, treat it as a change-management event, not a routine deployment detail.

What to verify: Make sure the review sees the rendered plan, the environment target, and the cost delta. A meaningful gate should answer whether the change is additive, whether it is reversible, and whether the resulting spend is expected in the intended environment.

Decision rule: If the plan creates new recurring spend, require pre-apply approval; if the change only adjusts non-billing metadata, keep the gate lightweight. The more durable the cost, the earlier the decision should happen.

Practitioner takeaway: Terraform is the moment you buy the infrastructure, so the cost question has to be answered before apply if you want the control to prevent waste instead of documenting it.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 10, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org