- Linux workstation.
wget
package installed on your workstation.
- Download terraform package from terraform.io/downloads.
- Version for amd64
wget https://releases.hashicorp.com/terraform/1.2.5/terraform_1.2.5_linux_amd64.zip -O /tmp/terraform.zip
- Version for arm64
wget https://releases.hashicorp.com/terraform/1.2.5/terraform_1.2.5_linux_arm64.zip -O /tmp/terraform.zip
- Unzip the terraform binary to a directory which is included in your system
PATH
.
sudo unzip /tmp/terraform.zip -d /usr/local/bin/
- Reload your shell.
exec -l $SHELL
- Verify installation.
terraform --help
-
Navigate to terraform project directory.
-
Make some changes in
terraform.tfvars
-
Fill the code where mentioned
Update:
-
Initialize terraform project.
terraform init
- Generate terraform execution plan.
terraform plan
- Run terraform apply, if plan looks good.
terraform apply
- For check your droplets.
terraform show
- For clean-up, destroy all the resources created by terraform.
terraform destroy