Infracost exists to empower engineering teams to use cloud infrastructure economically and efficiently
We must connect infracost image with terraform image via the ssh protocol. The easiest solution is to use docker compose.
So create a file docker-compose.yml with content:
version: '3.6'
services:
terraform:
image: minidocks/terraform
volumes:
- .:$PWD
working_dir: $PWD
command: sshd
infracost:
image: minidocks/infracost
depends_on:
- terraform
environment:
ALIAS_TERRAFORM: ssh -yy terraform terraform
volumes:
- .:$PWD
working_dir: $PWD
And in directory with terraform files run command:
docker-compose run --rm infracost breakdown --path .
| Tag | Size |
|---|---|
| latest |
Content type
Image
Digest
sha256:66205c426…
Size
30.8 MB
Last updated
about 15 hours ago
docker pull minidocks/infracost