Skip to content

🐳 Docker image for running Terraform commands in an Azure Pipelines container job

License

Notifications You must be signed in to change notification settings

swissgrc/docker-azure-pipelines-terraform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Docker image for running Terraform commands in Azure Pipelines container job

License Build Quality Gate Status Pulls Stars

Docker image to run Terraform commands in Azure Pipelines container jobs.

Usage

This image can be used to run Terraform commands in Azure Pipelines container jobs.

The following software is additionally available in the image:

Software Included since
Azure Cli 0.14.6
Git 1.2.3
.NET 1.2.3
Docker CLI 1.2.5

Azure Pipelines Container Job

To use the image in an Azure Pipelines Container Job, add one of the following example tasks and use it with the container property.

The following example shows the container used for a deployment step with a Terraform command

  - stage: deploy
    jobs:
      - deployment: planTerraform
        container: swissgrc/azure-pipelines-terraform:latest
        environment: smarthotel-dev
        strategy:
          runOnce:
            deploy:
              steps:
                - bash: |
                    terraform init -backend-config=./config/dev_backend.tfvars

The following example defines a deployment with the container using az login before calling Terraform commands. Note that two secret variables (Azure.UserName and Azure.Password) are passed to the task by the env block.

  - stage: deploy
    jobs:
      - deployment: planTerraform
        container: swissgrc/azure-pipelines-terraform:latest
        environment: smarthotel-dev
        strategy:
          runOnce:
            deploy:
              steps:
                - bash: |
                    az login -u $AZURE_USERNAME -p $AZURE_PASSWORD
                    terraform init -backend-config=./config/dev_backend.tfvars
                    terraform plan -var-file=./config/dev.tfvars
                  env:
                    AZURE_USERNAME: $(Azure.UserName)
                    AZURE_PASSWORD: $(Azure.Password)

Tags

Tag Description Base Image Terraform TfLint Size
latest Latest stable release (from main branch) swissgrc/azure-pipelines-azurecli:2.65.0-net8 1.9.8 0.53.0 Docker Image Size (tag)
unstable Latest unstable release (from develop branch) swissgrc/azure-pipelines-azurecli:2.67.0-net8 1.9.8 0.54.0 Docker Image Size (tag)
0.14.6 Terraform 0.14.6 azure-cli:2.19.1 0.14.6 Docker Image Size (tag)
0.15.0 Terraform 0.15.0 azure-cli:2.22.0 0.15.0 Docker Image Size (tag)
0.15.1 Terraform 0.15.1 azure-cli:2.22.1 0.15.1 Docker Image Size (tag)
1.0.8 Terraform 1.0.8 azure-cli:2.28.0 1.0.8 Docker Image Size (tag)
1.2.2 Terraform 1.2.2 azure-cli:2.37.0 1.2.2 Docker Image Size (tag)
1.2.3 Terraform 1.2.3 debian:11.3-slim 1.2.3 Docker Image Size (tag)
1.2.4 Terraform 1.2.4 debian:11.3-slim 1.2.4 Docker Image Size (tag)
1.2.5 Terraform 1.2.5 swissgrc/azure-pipelines-azurecli:2.38.0 1.2.5 Docker Image Size (tag)
1.2.6 Terraform 1.2.6 swissgrc/azure-pipelines-azurecli:2.38.0 1.2.6 Docker Image Size (tag)
1.2.6.1 Terraform 1.2.6 swissgrc/azure-pipelines-azurecli:2.39.0.1 1.2.6 Docker Image Size (tag)
1.2.7 Terraform 1.2.7 swissgrc/azure-pipelines-azurecli:2.39.0.1 1.2.7 Docker Image Size (tag)
1.2.8 Terraform 1.2.8 swissgrc/azure-pipelines-azurecli:2.39.0.1 1.2.8 Docker Image Size (tag)
1.2.9 Terraform 1.2.9 swissgrc/azure-pipelines-azurecli:2.40.0 1.2.9 Docker Image Size (tag)
1.3.0 Terraform 1.3.0 swissgrc/azure-pipelines-azurecli:2.40.0 1.3.0 Docker Image Size (tag)
1.3.1 Terraform 1.3.1 swissgrc/azure-pipelines-azurecli:2.40.0 1.3.1 Docker Image Size (tag)
1.3.2 Terraform 1.3.2 swissgrc/azure-pipelines-azurecli:2.41.0 1.3.2 Docker Image Size (tag)
1.3.3 Terraform 1.3.3 swissgrc/azure-pipelines-azurecli:2.41.0 1.3.3 Docker Image Size (tag)
1.3.4 Terraform 1.3.4 swissgrc/azure-pipelines-azurecli:2.42.0 1.3.4 Docker Image Size (tag)
1.3.5 Terraform 1.3.5 swissgrc/azure-pipelines-azurecli:2.42.0 1.3.5 Docker Image Size (tag)
1.3.6 Terraform 1.3.6 swissgrc/azure-pipelines-azurecli:2.42.0 1.3.6 Docker Image Size (tag)
1.3.7 Terraform 1.3.7 swissgrc/azure-pipelines-azurecli:2.43.0 1.3.7 Docker Image Size (tag)
1.3.8 Terraform 1.3.8 swissgrc/azure-pipelines-azurecli:2.45.0 1.3.8 Docker Image Size (tag)
1.4.0 Terraform 1.4.0 swissgrc/azure-pipelines-azurecli:2.46.0 1.4.0 Docker Image Size (tag)
1.4.1 Terraform 1.4.1 swissgrc/azure-pipelines-azurecli:2.46.0 1.4.1 Docker Image Size (tag)
1.4.2 Terraform 1.4.2 swissgrc/azure-pipelines-azurecli:2.46.0 1.4.2 Docker Image Size (tag)
1.4.3 Terraform 1.4.3 swissgrc/azure-pipelines-azurecli:2.46.0 1.4.3 Docker Image Size (tag)
1.4.4 Terraform 1.4.4 swissgrc/azure-pipelines-azurecli:2.47.0 1.4.4 Docker Image Size (tag)
1.4.5 Terraform 1.4.5 swissgrc/azure-pipelines-azurecli:2.47.0 1.4.5 Docker Image Size (tag)
1.4.6 Terraform 1.4.6 swissgrc/azure-pipelines-azurecli:2.48.1 1.4.6 Docker Image Size (tag)
1.5.0 Terraform 1.5.0 swissgrc/azure-pipelines-azurecli:2.49.0 1.5.0 Docker Image Size (tag)
1.5.2 Terraform 1.5.2 swissgrc/azure-pipelines-azurecli:2.50.0-net6 1.5.2 Docker Image Size (tag)
1.5.3 Terraform 1.5.3 swissgrc/azure-pipelines-azurecli:2.50.0-net6 1.5.3 Docker Image Size (tag)
1.5.4 Terraform 1.5.4 swissgrc/azure-pipelines-azurecli:2.50.0-net6 1.5.4 Docker Image Size (tag)
1.5.5 Terraform 1.5.5 swissgrc/azure-pipelines-azurecli:2.50.0-net6 1.5.5 Docker Image Size (tag)
1.5.6 Terraform 1.5.6 swissgrc/azure-pipelines-azurecli:2.51.0-net6 1.5.6 Docker Image Size (tag)
1.5.7 Terraform 1.5.7 swissgrc/azure-pipelines-azurecli:2.52.0-net6 1.5.7 Docker Image Size (tag)
1.6.0 Terraform 1.6.0 swissgrc/azure-pipelines-azurecli:2.53.0-net6 1.6.0 Docker Image Size (tag)
1.6.1 Terraform 1.6.1 swissgrc/azure-pipelines-azurecli:2.53.0-net6 1.6.1 Docker Image Size (tag)
1.6.2 Terraform 1.6.2 swissgrc/azure-pipelines-azurecli:2.53.0-net6 1.6.2 Docker Image Size (tag)
1.6.3 Terraform 1.6.3 swissgrc/azure-pipelines-azurecli:2.53.1-net6 1.6.3 Docker Image Size (tag)
1.6.4 Terraform 1.6.4 swissgrc/azure-pipelines-azurecli:2.54.0-net6 1.6.4 Docker Image Size (tag)
1.6.5 Terraform 1.6.5 swissgrc/azure-pipelines-azurecli:2.54.0-net6 1.6.5 Docker Image Size (tag)
1.6.6 Terraform 1.6.6 swissgrc/azure-pipelines-azurecli:2.55.0-net8 1.6.6 Docker Image Size (tag)
1.7.0 Terraform 1.7.0 swissgrc/azure-pipelines-azurecli:2.56.0-net8 1.7.0 Docker Image Size (tag)
1.7.1 Terraform 1.7.1 swissgrc/azure-pipelines-azurecli:2.56.0-net8 1.7.1 Docker Image Size (tag)
1.7.2 Terraform 1.7.2 swissgrc/azure-pipelines-azurecli:2.56.0-net8 1.7.2 Docker Image Size (tag)
1.7.3 Terraform 1.7.3 swissgrc/azure-pipelines-azurecli:2.57.0-net8 1.7.3 Docker Image Size (tag)
1.7.4 Terraform 1.7.4 swissgrc/azure-pipelines-azurecli:2.57.0-net8 1.7.4 Docker Image Size (tag)
1.7.5 Terraform 1.7.5 swissgrc/azure-pipelines-azurecli:2.58.0-net8 1.7.5 Docker Image Size (tag)
1.8.0 Terraform 1.8.0 swissgrc/azure-pipelines-azurecli:2.59.0-net8 1.8.0 Docker Image Size (tag)
1.8.1 Terraform 1.8.1 swissgrc/azure-pipelines-azurecli:2.59.0-net8 1.8.1 Docker Image Size (tag)
1.8.2 Terraform 1.8.2 swissgrc/azure-pipelines-azurecli:2.59.0-net8 1.8.2 Docker Image Size (tag)
1.8.3 Terraform 1.8.3 swissgrc/azure-pipelines-azurecli:2.60.0-net8 1.8.3 Docker Image Size (tag)
1.8.4 Terraform 1.8.4 swissgrc/azure-pipelines-azurecli:2.61.0-net8 1.8.4 Docker Image Size (tag)
1.8.5 Terraform 1.8.5 swissgrc/azure-pipelines-azurecli:2.61.0-net8 1.8.5 Docker Image Size (tag)
1.9.0 Terraform 1.9.0 swissgrc/azure-pipelines-azurecli:2.61.0-net8 1.9.0 0.51.1 Docker Image Size (tag)
1.9.1 Terraform 1.9.1 swissgrc/azure-pipelines-azurecli:2.62.0-net8 1.9.1 0.52.0 Docker Image Size (tag)
1.9.2 Terraform 1.9.2 swissgrc/azure-pipelines-azurecli:2.62.0-net8 1.9.2 0.52.0 Docker Image Size (tag)
1.9.3 Terraform 1.9.3 swissgrc/azure-pipelines-azurecli:2.62.0-net8 1.9.3 0.52.0 Docker Image Size (tag)
1.9.4 Terraform 1.9.4 swissgrc/azure-pipelines-azurecli:2.63.0-net8 1.9.4 0.52.0 Docker Image Size (tag)
1.9.5 Terraform 1.9.5 swissgrc/azure-pipelines-azurecli:2.63.0-net8 1.9.5 0.53.0 Docker Image Size (tag)
1.9.6 Terraform 1.9.6 swissgrc/azure-pipelines-azurecli:2.64.0-net8 1.9.6 0.53.0 Docker Image Size (tag)
1.9.7 Terraform 1.9.7 swissgrc/azure-pipelines-azurecli:2.65.0-net8 1.9.7 0.53.0 Docker Image Size (tag)
1.9.8 Terraform 1.9.8 swissgrc/azure-pipelines-azurecli:2.65.0-net8 1.9.8 0.53.0 Docker Image Size (tag)