This project demonstrates how to use Terraform. Follow the instructions below to prepare your environment and execute the Terraform scripts.
sudo apt update
sudo apt install -y unzip curl
curl -fsSL https://releases.hashicorp.com/terraform/1.12.2/terraform_1.12.2_linux_amd64.zip -o terraform.zip
unzip terraform.zip
sudo mv terraform /usr/local/bin/
terraform -versioncurl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
aws --versionaws configureProvide the following:
- AWS Access Key ID
- AWS Secret Access Key
- Default region name (e.g., eu-central-1)
- Default output format (e.g., json)
Unzip the project files and change into the directory:
unzip terraform-demo.zip
cd terraform-demoThen execute the following Terraform commands:
terraform init
terraform plan
terraform applyConfirm the apply step with yes when prompted.
terraform destroyThis project is intended for educational use. For real-world deployments, consider using backend configuration, remote state, modules, and workspaces.