📦 New registry — please migrate. This image now lives at
bgauduch/terraform-aws-cli. The legacyzenika/terraform-aws-clirepository is frozen: update yourdocker pull/FROMreferences to the new one. Historical tags are being copied across, migration in progress — see #137.
Available image tags can be found on the Docker Hub registry: bgauduch/terraform-aws-cli
Supported versions are listed in the supported_versions.json file.
The following image tag strategy is applied:
| Tag | What it points at | Moves |
|---|---|---|
bgauduch/terraform-aws-cli:latest |
the newest release, with the latest versions in supported_versions.json |
on every release |
bgauduch/terraform-aws-cli:edge |
the tip of master, same version selection |
on every image change merged to master |
bgauduch/terraform-aws-cli:vX.Y |
the latest patch of that minor line | on every release of that line |
bgauduch/terraform-aws-cli:vX.Y.Z |
that release, with its latest Terraform and AWS CLI versions | never |
bgauduch/terraform-aws-cli:vX.Y.Z_tf-A.B.C_aws-D.E.F |
that release, fully pinned to a Terraform (A.B.C) and AWS CLI (D.E.F) combination |
never — pin this one for reproducibility |
Which one to use: vX.Y.Z_tf-A.B.C_aws-D.E.F when a build must never change
under you, latest or vX.Y for everyday use, edge only to try what is
merged but not released.
Please report to the releases page for the changelogs.
Any other tags are not supported even if available.
Version support policy: supported Terraform versions follow upstream EOL —
the latest three minor lines (the two HashiCorp still patches
plus one kept as grace), one patch per line
(see ADR-0015).
Retiring a version stops new builds only: every previously published
fully-pinned tag (vX.Y.Z_tf-A.B.C_aws-D.E.F) is immutable and stays pullable
forever — pin one of those to keep using an older combination.
Platform support policy: images are published for linux/amd64 and
linux/arm64, the platforms AWS distributes a Linux CLI v2 bundle for
(see ADR-0019). As with
versions, dropping a platform stops new builds only: tags published earlier
keep the manifests they were pushed with.
The goal is to create a minimalist and lightweight image with these tools in order to reduce network and storage impact.
This image gives you the flexibility to be used for development or as a base image as you see fits.
Tools included:
- Terraform CLI
- AWS CLI
- Git for Terraform remote module usage
- jq to process JSON returned by AWS
- OpenSSH Client to handle Terraform module clone over SSH
- This image uses a non-root user with a UID and GID of 1001 to conform with docker security best practices.
Set your AWS credentials (optional) and use the CLI as you would on any other platform, for instance using the latest image:
echo AWS_ACCESS_KEY_ID=YOUR_ACCESS_KEY
echo AWS_SECRET_ACCESS_KEY=YOUR_SECRET_KEY
echo AWS_DEFAULT_REGION=YOUR_DEFAULT_REGION
docker container run -it --rm -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" -e "AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION}" -v ${PWD}:/workspace bgauduch/terraform-aws-cli:latestThe
--rmflag will completely destroy the container and its data on exit.
The image can be built and verified locally with the validation script.
It will :
- Run the structural checks on the repository;
- Lint the Dockerfile with Hadolint;
- Build and tag the image
bgauduch/terraform-aws-cli:devfor your platform; - Execute container structure tests on the image.
# build and verify with the latest supported versions
./scripts/validate.sh --fullOptionally, it is possible to choose the tools desired versions :
# Set tools desired versions
AWS_CLI_VERSION=2.12.6
TERRAFORM_VERSION=1.5.2
# build and verify these versions
./scripts/validate.sh --full $AWS_CLI_VERSION $TERRAFORM_VERSIONBefore contributing, please read the contributing guide, the code of conduct and the security policy.
Do not hesitate to contribute by filling an issue or a PR !
- Contributing guide
- Code of conduct
- Security policy
- Publishing & registry auth
- Rollback policy
- Dependencies upgrades checklist
- Binaries verifications
- For Azure: zenika-open-source/terraform-azure-cli
This project is under the Apache License 2.0