Terraform Infrastructure Score Calculator
Score overall Terraform infrastructure health from drift, plan success rate, apply time and module reuse.
Inputs
Percent of resources currently drifted from state.
Percent of plan/apply runs that complete without error.
Average time for a `terraform apply` to complete.
Percent of resources provisioned via shared/reusable modules vs. one-off inline resources.
Infrastructure Score
82.7/100
Grade
Good
Drift Score
88/100
Plan Success Score
92/100
Apply Time Score
83/100
Module Reuse Score
65/100
Step by step
Drift score (30%)
100 - 6 × 2
= 88
Plan success score (30%)
92
= 92
Apply time score (15%)
100 - (6 - 1) / 29 × 100
= 83
Module reuse score (25%)
65
= 65
Weighted infrastructure score
0.3D + 0.3S + 0.15A + 0.25R
= 82.7
How it works
Infrastructure score blends four weighted signals: drift (30%, penalizing resources that diverge from state), plan/apply success rate (30%, reliability of the core workflow), apply time (15%, operational efficiency), and module reuse (25%, a proxy for consistency and maintainability). Each is normalized to 0-100 before weighting, mirroring the structure of the Git repository health score for a comparable DevOps maturity view.
Formula
score = drift_score × 0.30 + success_score × 0.30 + apply_time_score × 0.15 + reuse_score × 0.25
- drift_score
- clamp(100 - drift_percent × 2, 0, 100)
- success_score
- Plan/apply success rate percentage
- apply_time_score
- clamp(100 - (avg_apply_min - 1) / 29 × 100, 0, 100)
- reuse_score
- Module reuse percentage
Frequently Asked Questions
Why do drift and success rate carry equal, highest weight?
Both directly reflect whether your infrastructure-as-code can be trusted as the source of truth — high drift means your code lies about reality, and low success rate means the core workflow (plan/apply) itself is unreliable, undermining confidence in every other metric.
How is module reuse measured in practice?
Divide resources provisioned through calls to shared/versioned modules by total managed resources — a high ratio indicates standardized, DRY infrastructure patterns rather than repeated inline resource blocks per environment.
Can a fast-applying configuration still score poorly overall?
Yes — apply time only carries 15% weight, so a fast but heavily drifted or unreliable (low success rate) configuration will still score low overall, correctly reflecting that speed doesn't offset trustworthiness issues.
How should I act on a low infrastructure score?
Start with whichever sub-score is lowest: schedule drift remediation if drift is high, investigate flaky providers/modules if success rate is low, or invest in a shared module library if reuse is low.
You might also need
- Terraform Drift CalculatorCommonly used together
- Terraform Plan Complexity CalculatorCommonly used together
- Terraform Cloud Cost CalculatorCommonly used together
- Terraform Module Dependency CalculatorCommonly used together
- Git Repository Health Score CalculatorCommonly used together
- Terraform Apply Time CalculatorAlso in Terraform