Skip to the content.

Terraform Certification Exercises

This directory contains hands-on exercises to help you prepare for the HashiCorp Terraform Associate certification. Each exercise focuses on specific Terraform concepts that are covered in the exam.

Exercise Structure

Each exercise directory contains:

  1. A README.md file with detailed instructions
  2. A solution directory with working example code
  3. AWS and GCP implementations for comprehensive learning

Available Exercises

  1. First Configuration
    • Learn how to create basic Terraform configurations
    • Understand provider setup and resource creation
    • Execute the Terraform workflow
  2. Variables and Outputs
    • Work with different variable types
    • Implement variable validation
    • Create useful outputs
    • Use local values
  3. Resource Dependencies
    • Understand implicit and explicit dependencies
    • Use the depends_on meta-argument
    • Manage resource creation order
    • Handle resource replacement
  4. Working with State
    • Manage Terraform state
    • Use state commands
    • Implement remote state
    • Handle state locking
  5. Modules
    • Create and use Terraform modules
    • Pass inputs and receive outputs
    • Implement module versioning
    • Use modules from the registry
  6. Meta-Arguments
    • Use count and for_each
    • Implement lifecycle rules
    • Configure multiple providers
    • Use dynamic blocks

Prerequisites

How to Use

  1. Start with Exercise 1 and work your way through sequentially
  2. Choose your preferred cloud provider (AWS or GCP)
  3. Read the README.md in each exercise directory
  4. Complete the tasks and additional challenges
  5. Check the solution for reference

Happy learning!