Skip to content

derekstraka/terraform-azure

Repository files navigation

Terraform and Azure CLI Docker image

Lint Build Publish

License Docker Pulls

Overview

The goal is to create a lightweight container image to deploy infrastructure as code (IaC) to the Azure cloud. The container can be used for interactive development, CI/CD deployments, or as a base image to extend as needed. It is based on the HashiCorp Terraform container with the addition of python3 and the Azure CLI.

What's inside?

Supported versions

Actively supported versions can be found in the supported_versions.yaml. By default, the latest 3x versions of Terraform and Azure CLI will be periodically packaged and released

The following image tag strategy is leveraged for the container builds:

  • derekstraka/terraform-azure:latest - build from main
  • derekstraka/terraform-azure:vR.S.T_terraform-UU.VV.WW_azcli-XX.YY.ZZ - build from releases
    • vR.S.T is the release tag
    • terraform-UU.VV.WWW is the included Terraform CLI version
    • azcli-XX.YY.ZZ is the included Azure CLI version

Usage

Launch the CLI

Simply launch the container and use the CLI as you would on any other platform, for instance using the latest image:

docker run -i -v $PWD:/data -w /data -t derekstraka/terraform-azure:latest /bin/bash

Building an image

You can build the image locally directly from the Dockerfile using the TERRAFORM_VERSION and AZURE_CLI_VERSION build arguments to specificy the desired version of Terrafrom and Azure command line

docker build --build-arg TERRAFORM_VERSION=1.5.1 --build-arg AZURE_CLI_VERSION=2.48 .

License

This project is under the Apache License 2.0

About

Docker image including the Terraform + Azure CLI

Resources

License

Stars

Watchers

Forks

Packages

No packages published