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
- In the Organization section, switch to the Build Executors tab
- Click "Create Image"
- Choose "Create Image from Registry"
- Enter a Name
- If you're using dockerhub you can leave the Registry Host blank
- If you're using any other docker registry, enter the host name, user and password
- Enter the Image Name
- Enter the Version Tag
- Press the "Add" button
- Your image will start to build
- Wait for your executor to be in the "Ready" status
