Terraform taught around state rather than syntax. The plan and apply lifecycle, providers and resource addressing, remote backends with locking, module design and versioning, workspaces and environment separation, and the lifecycle meta-arguments that decide in-place update versus destroy-and-recreate.
Topics: Declarative versus imperative, and where Terraform sits among the alternatives · CLI workflow: init, validate, plan, apply, show, destroy, console · Plan and apply lifecycle, the dependency graph and refresh behaviour · State: what the file holds, remote backends (S3, azurerm, GCS, Artifactory), locking, state surgery · Providers, the registry, required_providers, versions and upgrade strategy · Resources, resource behaviour and argument references · Meta-arguments: depends_on, count, for_each, provider, lifecycle · Input variables, output values and locals — types, precedence and scope · Data sources, HCL operators and the function library: string, collection, numeric, encoding, filesystem, date, crypto, IP network, type conversion · Provisioners: file, local-exec, remote-exec, and why they are a last resort · Templates, workspaces and environment separation · Modules: composition, versioning, registry consumption, custom modules and publishing · Tagging strategy, troubleshooting with TF_LOG, and reading common errors · HCP Terraform run workflows and multi-provider configurations in CI/CD · Drift detection, import and refactoring with moved blocks
- Assignments: (1) Migrate a local-state project to a locked remote backend with no resource churn; (2) Refactor a monolithic configuration into versioned modules using moved blocks
- Capstone: Build a CI-driven Terraform workflow with plan review, approval and audited apply