Cost Estimation (Infracost Integration)
Cost Estimation
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. Cost estimation is provided by Infracost.
Temporary API key
For the first 30 days, env0 supplies an infracost API key so you can try out cost estimation feature. Please make sure to create your dedicated API key as soon as possible.
Set Up Infracost Integration
Infracost integration can be set for both SaaS and Self-hosted agents.
SaaS
- Create an API key for infracost - see infracost documentation.
- Go to organization variables and create an
INFRACOST_API_KEY
secret environment variable in env0
Self Hosted Agent
- Create an API key for infracost - see infracost documentation.
- Base64 encode the API key and deploy it with your agent configuration. See self-hosted agent documentation for more details, or
- Save that API key in your AWS Secrets Manager as plaintext, and
- Go to organization variables and create an
INFRACOST_API_KEY
secret environment variable in env0, referencing the API key stored in Secrets Manager
Enable Cost Estimation for your Project
To activatate cost estimation for your project, go to "Project Settings", and then to the "Policies" tab. Check the "Cost estimation" checkbox, and save.
Updated 5 months ago