Terraform Installation Guide
This guide provides all the key information and getting-started instructions after a successful Terraform installation via DeploySage-CLI. This installation uses tfenv, a powerful version manager for Terraform.
Core Workflow
The standard Terraform workflow consists of three main commands:
After you are done, you can tear down all managed infrastructure with terraform destroy.
# 1. Initialize the working directory
terraform init
# 2. Review the execution plan
terraform plan
# 3. Apply the changes to create infrastructure
terraform apply
Version Management with tfenv
tfenv allows you to install and switch between different versions of Terraform seamlessly.
# List all available remote versions of Terraform
tfenv list-remote
# Install a specific version of Terraform
tfenv install 1.8.5
# Switch to use a specific version in your current shell
tfenv use 1.8.5
# List all locally installed versions
tfenv list
Key Directories and Files
| Item | Value |
|---|---|
| tfenv Installation | ~/.tfenv/ |
| Terraform Binaries | ~/.tfenv/versions/ |
| Global Config | ~/.terraformrc |