Atlantis migration
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 😄
What's new?​
With the v0.10 release, we'll support two ways to run Infracost with Terraform via --path
:
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 /codeParsing 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-atlantis
Docker image update the tag to use v0.10 of Infracost. For examples if you were usinginfracost/infracost-atlantis:atlantis0.19-infracost0.9
Docker image you should update toinfracost/infracost-atlantis:atlantis0.19-infracost0.10
.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=$PLANFILE
you should change this to--plan=$SHOWFILE
to 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 ashow
step after theplan
step of the workflow, e.g:workflows:
terraform-infracost:
plan:
steps:
- init
- plan
- 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.