Skip to main content

Learning Resources

This module is docs-first. The primary authority on Terraform is the HashiCorp developer documentation -- not books, not blog posts, not videos. Local book chunks in library/raw/semester-09-cloud-devops/books/ cover Git and the Linux CLI and are peripheral here; we use them only when PR and review culture needs grounding.

Source Stack

SourceRoleHow to use it in this module
HashiCorp Terraform Developer DocsPrimaryDefault authority for every Terraform concept: language, CLI, backends, modules, providers, lifecycle
Terraform Best Practices (terraform-best-practices.com)SecondaryCommunity-maintained conventions for modules, naming, environments, CI
Open Policy Agent docsPrimary (Cluster 5)Rego language, testing, CI integration
HashiCorp Sentinel docsSecondary (Cluster 5)Sentinel policy language reference
tfsec (migrating to Trivy)Secondary (Cluster 5)Static scanner for Terraform; rules catalog
Ansible DocumentationSecondary (Cluster 5)Config-management reference; modules and inventory
AWS CDK v2 Developer GuideSecondary (Cluster 5)CDK constructs, synth, deploy
Pulumi documentationSecondary (Cluster 5)Pulumi concepts, programming-model vs Terraform
Pro Git, The Linux Command Line, Git from the bottom up (local chunks)PeripheralPR-review mechanics only; useful for Cluster 4

Resource Map by Cluster

Cluster 1: The IaC Mindset

NeedBest external sourceWhy
What IaC is, why it existsTerraform: What is Infrastructure as Code?Vendor-neutral framing of the problem
Declarative vs imperativeTerraform IntroExplicit contrast with scripts
State modelTerraform: StateCanonical explanation of state
State lockingTerraform: State and backends -- lockingLocking semantics
Idempotency and the apply loopTerraform Intro + Resource lifecycleTogether: why the same apply is safe twice

Cluster 2: Terraform Core

NeedBest external sourceWhy
ProvidersTerraform Language: ProvidersProvider block, required_providers, versions
ResourcesTerraform Language: ResourcesSyntax, meta-arguments, lifecycle
Data sourcesTerraform Language: Data sourcesRead-only queries
VariablesTerraform Language: Input VariablesTypes, validation, sensitivity
Local valuesTerraform Language: Local ValuesPurpose and pitfalls
OutputsTerraform Language: Output ValuesHow modules expose state
PlanCommand: terraform planPlan symbols, saved plans
ApplyCommand: terraform applyApply-from-plan

Cluster 3: Modularity and Reuse

NeedBest external sourceWhy
Writing a moduleTutorial: Create a Terraform moduleEnd-to-end module creation
Module conventionsTerraform Best Practices: module structureOpinionated community guidance
WorkspacesTerraform Language: WorkspacesPurpose and limits of CLI workspaces
Backend blockTerraform Language: BackendsBackend configuration
Remote stateTerraform Language: Remote StateCross-team state access
EnvironmentsTerraform Best Practices: environment separationDir-per-env and repo-per-env patterns

Cluster 4: Managing Change

NeedBest external sourceWhy
Plan review disciplineCommand: terraform plan + Best Practices: PR flowPlan as the unit of review
moved blocksTerraform Language: Refactoring with movedCanonical docs
import blocksTerraform Language: Importing infrastructureModern import block workflow
terraform state CLICommand: terraform stateLast-resort state surgery
Lifecycle meta-argumentsTerraform Language: lifecycleprevent_destroy, create_before_destroy, ignore_changes
PR review mechanicsPro Git: Distributed Workflows (local chunks)Git-side of the review loop

Cluster 5: IaC Beyond Terraform

NeedBest external sourceWhy
AnsibleAnsible: Getting startedInventory, playbooks, idempotency
CDKAWS CDK v2: Developer GuideConstructs, App/Stack model
PulumiPulumi: ConceptsProgramming-model IaC
OPA / RegoOPA: DocumentationPolicy engine home
SentinelSentinel: DocumentationHCP Terraform policy engine
tfsec / Trivytfsec docs (migrating to Trivy)Static Terraform scanning

Concept-to-Source Map (Primary Concepts)

Primary conceptBest external sourceWhy this source
Declarative vs imperativeTerraform IntroVendor-neutral contrast
State and its hazardsTerraform: StateAuthoritative on the model
Idempotency and convergenceTerraform Intro + Resource lifecycleModel + mechanism
Providers / resources / data sourcesTerraform Language: ProvidersAuthoritative
Variables / outputs / localsInput VariablesPrimary reference
Plan / apply / driftCommand: terraform planAuthoritative on lifecycle commands
Reusable modulesTutorial: Create a moduleEnd-to-end worked example
Workspaces, envs, monorepo/polyrepoWorkspaces + Best PracticesOfficial + community
Remote state and lockingBackendsAuthoritative
Plan review as PR cultureterraform planSaved-plan semantics
Refactoring: moved, import, stateRefactoring with moved + Importing infrastructureThe two canonical docs
Blast radius and safe defaultslifecycle meta-argumentsAuthoritative
Policy as codeOPA docs + Sentinel docsTwo canonical policy engines

External Resources (Validated)

All URLs below were checked against official or canonical sources during curriculum curation. Use them in preference to third-party blog posts unless you are already fluent and want a second exposition.

Use Rules -- Docs-First Discipline

  • Go to developer.hashicorp.com/terraform/language first, for every Terraform language question. The docs are the source of truth; blog posts are often out of date, especially since Terraform 1.1's addition of moved and 1.5's import block.
  • When stuck on a provider's resource attributes, go to the provider's page in the Terraform Registry. Do not trust examples from blog posts written before 2023.
  • For backends and state: read the backend-specific page (S3, GCS, HCP Terraform) before you configure one. Subtle differences (server-side encryption, KMS keys, IAM) live only in those pages.
  • For refactors, read the moved and import pages before the PR. Every month saved guessing is a PR that does not destroy production.
  • For policy, read the OPA tutorial and write your first policy the same day. Policy skills are muscle; they do not accumulate from reading alone.
  • Book chunks (Pro Git, Linux Command Line, Git from the bottom up) are here for Cluster 4's PR-review context and for general shell fluency. They are not IaC sources -- do not escalate to them for Terraform questions.