Terraform¶
Terraform is an open-source Infrastructure as Code (IaC) tool by HashiCorp that lets you define and provision infrastructure using declarative configuration files.
Install Terraform on Debian¶
Add the HashiCorp APT repository, then install Terraform:
Add HashiCorp repository
cd ~/Tooling
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
Install Terraform
sudo apt-get update
sudo apt-get install -y terraform
Verify the installation:
Check Terraform version
terraform version
Add Terraform to ToolingBins¶
Symlink terraform
cd ~/ToolingBins
ln -s /usr/bin/terraform terraform
Update Terraform¶
Update Terraform
sudo apt-get update
sudo apt-get install --only-upgrade terraform