
Question 1: Install Terraform 1.8.3 and Verify the Version
The lab environment doesn’t include Terraform by default. Let’s confirm:| Step | Command / Action |
|---|---|
| 1. | Download the Terraform 1.8.3 ZIP (linux_amd64):wget https://releases.hashicorp.com/terraform/1.8.3/terraform_1.8.3_linux_amd64.zip |
| 2. | Ensure unzip is installed:apt update && apt install -y unzip |
| 3. | Unpack the archive:unzip terraform_1.8.3_linux_amd64.zip |
| 4. | Make the binary executable and move it to /usr/bin:chmod +x terraform && mv terraform /usr/bin/ |
| 5. | Remove the ZIP file:rm terraform_1.8.3_linux_amd64.zip |
| 6. | Verify the installation:terraform version |
Question 2: Install Terragrunt 0.58.8 and Verify the Version
Next, install Terragrunt. First, confirm it’s missing:- Navigate to the Terragrunt GitHub releases page and locate v0.58.8.
- Under Assets, copy the link for terragrunt_linux_amd64.

- Download, make executable, and move it into your PATH:
Question 3: Beautify Terraform Code with Terragrunt
Terragrunt can wrap and extend Terraform commands. To format all.tf files in your directory:
Question 4: Beautify Terragrunt HCL Configuration
To format a Terragrunt HCL file (.hcl), use:
*.hcl configuration, making it easier to read and maintain.
Congratulations—Lab 1 is now complete!