Terraform no longer available in Visual Builder Studio executor software list

Terrafrom changed their licensing so we had to remove them from our provided software template.

But, don't worry.  You can quickly and easily create a Docker Based Executor.

Create a Dockerfile

The RHEL Linux install instructions for Terraform are

sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
sudo yum -y install terraform

Convert that into a Dockerfile

FROM oraclelinux:8.6

RUN dnf install -y dnf-plugins-core
RUN dnf config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
RUN dnf -y install terraform java-17-openjdk
  • The "FROM" statement starts us off with an installation of Oracle Linux 8.6.
  • You don't need to use sudo in the Dockerfile.
  • Added Java 17 so VBS can communicate with the executor at runtime.

Build your image and push it to your preferred docker repository.

docker build . -t docker.io/blainecarter/vbs_terraform_executor:latest
docker login docker.io
docker push docker.io/blainecarter/vbs_terraform_executor:latest

Open Visual Builder Studio.

A build executor is an instance that is pre-built with all of the software you need to execute your build job.  You will need an executor that includes Terraform.  If your organization doesn't already have one, follow these steps to create one.  (If you don't have access, ask your administrator to create the executor.)

Create a Build Executor

  1. In the Organization section, switch to the Build Executors tab
  2. Click "Create Image"
  3. Choose "Create Image from Registry"

    Create Image From Registry
  4. Enter a Name
  5. If you're using dockerhub you can leave the Registry Host blank
  6. If you're using any other docker registry, enter the host name, user and password
  7. Enter the Image Name
  8. Enter the Version Tag
  9. Press the "Add" button
    Add Custom Docker Image
  10. Your image will start to build
    Wait Till Image Is Ready
  11. Wait for your executor to be in the "Ready" status
    Image Is Ready