Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(DEVOPS-116): add Infracost to image #11

Merged
merged 3 commits into from
Mar 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ That custom `atlantis` docker image was created in order to install few helpful
- `yq` (via asdf) - command like YAML parser
- `glab` (via asdf) - GitLab CLI client
- `az-cli` (via pip) - Azure CLI
-
- `Infracost` - cloud cost estimates

Files found in the repo:
- `Dockerfile` is based on an official atlantis docker file (<https://github.com/runatlantis/atlantis/blob/v0.17.3/Dockerfile>) with some additional tweaks (asdf installation and configuration)
- `docker-entrypoint.sh` is based on original file from atlantis repo <https://github.com/runatlantis/atlantis/blob/v0.19.8/docker-entrypoint.sh> with additional tweaks like invoking `bash` to run `atlantis` (due to `asdf` needs)
Expand Down
8 changes: 8 additions & 0 deletions app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ARG JQ_VERSION=1.6
ARG YQ_VERSION=4.9.8
ARG AZURE_CLI_VERSION=2.44.1
ARG CHECKOV_VERSION=2.1.244
ARG INFRACOST_VERSION=v0.10.17
ARG TFLINT_VERSION=0.43.0
ARG TERRAFORM_DOCS_VERSION=0.16.0

Expand All @@ -33,6 +34,13 @@ RUN set -ex && \
pip install --upgrade setuptools && \
pip install checkov==${CHECKOV_VERSION}

# Download and install Infracost
RUN curl -LOs https://github.com/infracost/infracost/releases/download/${INFRACOST_VERSION}/infracost-linux-amd64.tar.gz && \
tar xzf infracost-linux-amd64.tar.gz && \
mv infracost-linux-amd64 /usr/bin/infracost && \
chmod a+x /usr/bin/infracost && \
rm -rf infracost-linux-amd64*

###
### Ensure Azure cli version is present and validated
###
Expand Down