1. Writing and using modules
Package infrastructure as modules: structure, inputs and outputs, variable scope, sources (local, registry, Git), versioning, composition and publishing.
6 lessons · about 105 minutes of reading · Helmsman Pro
This page is the public course outline. Lessons, labs, tools and exams open after you sign in to your free account.
How teams use Terraform safely: modules with clean interfaces, lifecycle guardrails and custom conditions, importing and refactoring existing estates, drift and debugging, secrets without leaks, and HCP Terraform's workflows and governance.
Before you start: Course 47 or equivalent Terraform experience.
Package infrastructure as modules: structure, inputs and outputs, variable scope, sources (local, registry, Git), versioning, composition and publishing.
Protect and shape changes with create_before_destroy, prevent_destroy, ignore_changes and replace_triggered_by, and catch bad assumptions with preconditions, postconditions and check blocks.
Bring existing resources under Terraform with import blocks and generated configuration, find them in bulk with terraform query, and refactor safely with moved and removed blocks.
Detect and fix drift, read refresh-only plans, force replacements, debug with TF_LOG, and recover from locks, failed applies and corrupted state.
Keep secrets out of code, plans and state: workload identity for providers, sensitive and ephemeral values, write-only arguments, Key Vault and HashiCorp Vault.
What HCP Terraform adds: remote runs and state, workspaces and projects, VCS, CLI and API workflows, variable sets, policies, run tasks, private registry, agents and Stacks.
Through the child's outputs: module.<name>.<output>.
replace_triggered_by.
terraform plan -generate-config-out=<file>.
No; use terraform plan -refresh-only and apply -refresh-only, which show the change first.
1.10.
The cloud block inside terraform {}.