This repository provides a Docker image that includes both Terraform and Azure CLI, built on top of Alpine Linux. It is intended to be used as a CI/CD tool for managing Azure resources using Terraform but can be used locally as well.
Available images can be found in the GitHub Container Registry.
- Azure CLI: A command-line tool for managing Azure resources.
- Terraform: An infrastructure as code tool for building, changing, and versioning infrastructure safely and efficiently.
- Supporting Packages: Additional tools like
git
andpython3
.
- Docker installed on your machine. You can download it from here.
You can pull the pre-built image from the GitHub Container Registry:
docker pull ghcr.io/teqwerk/terraform-azure-cli:main
OR you can build the image yourself:
git clone https://github.com/teqwerk/docker-terraform-azure-cli.git && cd docker-terraform-azure-cli
docker build --build-arg TERRAFORM_VERSION=1.9.3 --build-arg AZURE_CLI_VERSION=2.62.0 .
You can run the container using the following command:
docker run -it --rm ghcr.io/teqwerk/terraform-azure-cli:main
Once inside the container, you can use terraform and az commands as you would normally:
terraform --version
az --version
The versions of Terraform and Azure CLI are managed in the versions.json
file. The GitHub Actions workflows automatically update these versions every 24 h
and rebuild the Docker image.
Tip
Attestations help you helps you protect against supply chain attacks by verifying the integrity of the image. Read more about attestation here.
You can view the attestation of the image by running the following github cli command:
gh attestation verify oci://ghcr.io/teqwerk/terraform-azure-cli:main --owner teqwerk
Replace main
with the tag you want to verify.
Nice you are thinking about contributing! Contributions are always welcome! Please feel free to open an issue or submit a pull request.