Terraform how-tos
Harness has first-class support for HashiCorp Terraform as an infrastructure provisioner.
See the following Terraform How-tos:
- Provision Target Deployment Infra Dynamically with Terraform
- Plan Terraform Provisioning with the Terraform Plan Step
- Provision with the Terraform Apply Step
- Remove Provisioned Infra with the Terraform Destroy Step
- Rollback Provisioned Infra with the Terraform Rollback Step
For a conceptual overview of Harness Terraform integration, see Terraform Provisioning with Harness.
Important: Install Terraform on Delegates
Terraform must be installed on the Delegate to use a Harness Terraform Provisioner. You can install Terraform manually or use the INIT_SCRIPT
environment variable in the Delegate YAML.
See Install Software on the Delegate with Initialization Scripts.
# Install TF
microdnf install unzip
curl -O -L https://releases.hashicorp.com/terraform/1.3.5/terraform_1.3.5_darwin_amd64.zip
unzip terraform_1.3.5_darwin_amd64.zip
mv ./terraform /usr/bin/
# Check TF install
terraform --version
See also: Download Terraform from Hashicorp.