liatrio / image-builder-terraform

image-builder-terraform repository

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What is the image for?

The intended purpose of this image is for it to be used as a Jenkins agent. By using the installed features the user is able to create Jenkins pipelines that can trigger Terraform scripts to deploy and update infrastructure. Additionally, Terragrunt gives the ability to use extra tools for Terraform. An example of using this image as a Jenkins agent via Kubernetes can be seen below.

First, an example of configuring the pod template in yaml to create the agent.

jenkins:
  clouds:
    - kubernetes:
        name: "kubernetes"
        templates:
          - name: "image-builder-terraform"
            label: "image-builder-terraform"
            nodeUsageMode: NORMAL
            containers:
              - name: "image-terraform"
                image: "ghcr.io/liatrio/image-builder-terraform:${builder_images_version}"

And then specifying the agent in the Jenkinsfile for an example step.

stage('Build') {
  agent {
    label "image-builder-terraform"
  }
  steps {
    container('image-terraform') {
      sh "terragrunt plan"
      sh "terragrunt apply"
    }
  }
}

What is installed on this image?

  • Version 1.18 of the Go programming language
  • Version 1.2.5 of infrastructure as code tool Terraform
  • Version 0.38.4 of Terraform wrapper Terragrunt

About

image-builder-terraform repository

License:MIT License


Languages

Language:Dockerfile 100.0%