Infracost is a cost estimation tool for infrastructure as code platforms. Scalr integrates with the Infracost cloud pricing server to provide estimated costs after analyzing the Terraform or OpenTofu plans.

The cost estimation feature is enabled for all environments and workspaces by default, but can be disabled on an environment to environment basis:

The estimated cost is included in the tfrun input that is sent to the Open Policy Agent integration allowing teams to create policies to review estimated cost.

  "tfrun": {
    "cost_estimate": {
      "prior_monthly_cost": 0.0,
      "proposed_monthly_cost": 5.034,
      "delta_monthly_cost": 5.034

See an OPA policy for managing cost here.