Cost estimation is a tool that can be used to help reviewers of deployment plans. Once activated for a project, every deployment plan would trigger a cost estimation calculation. This way, you can view a plan and its cost estimation, and decide whether or not to deploy this plan.
We are using the infracost open-source in order to make to cost estimation
In order to activate cost estimation for your project, go to "Project Settings", and then to the "Policies" tab. There, check the "Cost estimation" checkbox, and save.
Cost estimation is supported in self-hosted agents of version 0.2.82+. In order to activate cost estimation in a self-hosted agent, you'll need to create your own secret API KEY for infracost in order to use cost estimation.
In order to do so, you'll need to:
- Create an API key for infracost - see infracost docs on how to do so
- Save that API key in your AWS Secrets Manager
- Create an
INFRACOST_API_KEYsecret environment variable in env0 referencing the API key stored in Secrets Manager
Updated 12 days ago