This course introduces infrastructure as code using Terraform to provision, modify, and manage infrastructure. Participants learn Terraform configuration, providers, reusable modules, state management, and collaborative workflows with HCP Terraform. The content aligns with the HashiCorp Certified: Terraform Associate (004) certification objectives.
Duration 4 Days – 28 hrs.
Objectives
- Explain infrastructure as code and Terraform’s benefits.
- Configure providers and manage their versions.
- Write Terraform configurations using variables, expressions, and dependencies.
- Execute the Terraform workflow to manage infrastructure.
- Create and use reusable modules.
- Manage state, remote backends, and infrastructure drift.
- Import existing resources and troubleshoot common issues.
- Handle sensitive values securely.
- Explain HCP Terraform collaboration and governance capabilities.
Target Audience
- Cloud engineers and infrastructure administrators
- DevOps engineers and platform engineers
- System administrators transitioning to infrastructure automation
- Software developers responsible for infrastructure provisioning
- IT professionals preparing for Terraform Associate certification
Prerequisites
- Basic command-line skills
- Basic understanding of cloud and on-premises infrastructure
- Familiarity with networking, virtual machines, and version control is helpful
- No prior Terraform experience required
Course Outline
Day 1: Terraform Foundations and Core Workflow
Module 1: Introduction to Infrastructure as Code
- Declarative infrastructure and automation benefits
- Terraform architecture and use cases
- Multi-cloud and hybrid infrastructure
Module 2: Terraform Setup and Providers
- CLI installation and configuration structure
- Provider requirements, authentication, and aliases
- Version constraints and dependency lock files
Module 3: Core Terraform Workflow
- Initialize, format, and validate configuration
- Generate and interpret execution plans
- Apply changes and destroy resources
- State fundamentals and resource dependencies
Day 2: Writing Terraform Configurations
Module 4: Resources, Variables, and Outputs
- Resource blocks and data sources
- Input variables, local values, and outputs
- Data types and resource references
Module 5: Expressions and Resource Behavior
- Functions, conditionals, and collection expressions
- count, for_each, and dynamic blocks
- Dependencies and lifecycle rules
- Variable validation and custom conditions
Module 6: Managing Sensitive Information
- Sensitive variables and outputs
- Secrets in state and plan files
- Secure credential handling and Vault integration
Day 3: Modules, State, and Infrastructure Maintenance
Module 7: Reusable Terraform Modules
- Root and child modules
- Module sources and Registry usage
- Input scope, outputs, and versioning
Module 8: State and Backend Management
- Local and remote backends
- State locking and migration
- Drift detection and refresh-only operations
- Refactoring with moved and removed blocks
Module 9: Maintaining Existing Infrastructure
- Import blocks and CLI imports
- Inspecting resources and state
- Troubleshooting configuration and provider errors
- Verbose logging
Day 4: HCP Terraform and Team Collaboration
Module 10: HCP Terraform Workflows
- Projects and workspaces
- CLI and version-control integration
- Remote execution and state migration
- Variables, variable sets, and run triggers
Module 11: Collaboration and Governance
- Teams and permissions
- Private module registry
- Dynamic provider credentials
- Policy enforcement and workspace health
- Explorer and change requests

