Follow this page to migrate your Infracost Atlantis integration.
If you encounter any issues while migrating, please join our community Slack channel, we'll help you very quickly 😄
With the v0.10 release, we'll support two ways to run Infracost with Terraform via
Parsing HCL code: this is the default CLI option as it has 5 key benefits.
# Terraform variables can be set using --terraform-var-file or --terraform-var
infracost breakdown --path /code
Parsing plan JSON file: this will continue to work as before and is recommended for deployment systems such as Atlantis which are already generating a plan JSON. This page describes how you can migrate to this option.
Infracost Atlantis migration guide
If you are using the
infracost-atlantisDocker image update the tag to use v0.10 of Infracost. For examples if you were using
infracost/infracost-atlantis:atlantis0.19-infracost0.9Docker image you should update to
If you already use a custom Docker image for Atlantis, change the line that's installing Infracost to download from
https://infracost.io/downloads/v0.10/infracost-linux-amd64.tar.gz. This downloads the latest 0.10.x version and lets you pick up bug fixes and new resource costs each time you build your image. You can also use lock the version using our releases.
If you are calling Infracost with
--path=$PLANFILEyou should change this to
--plan=$SHOWFILEto pass the plan JSON file instead of the plan binary file, since Infracost will be supporting that long term. This might require you to add a
showstep after the
planstep of the workflow, e.g:
- show # this writes the plan JSON to $SHOWFILE
You can see our full examples and find one that is the closest to your use-case and adapt as required.