1. Infrastructure as code and where Terraform fits
What infrastructure as code is, why teams adopt it, how Terraform works, and how it compares with Bicep, CloudFormation, Pulumi, Ansible and OpenTofu.
6 lessons · about 102 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.
Everything you need to write and run Terraform with confidence: what infrastructure as code is for, providers and version pinning, resources and data sources, typed variables and outputs, dynamic expressions, and state with remote backends and locking.
Before you start: Basic command line and Git. Course 2 (Azure) helps for the examples.
What infrastructure as code is, why teams adopt it, how Terraform works, and how it compares with Bicep, CloudFormation, Pulumi, Ansible and OpenTofu.
Install Terraform, declare and constrain providers, configure several providers and aliases, and keep every machine on the same versions with .terraform.lock.hcl.
Write resources and data sources, reference attributes across them, and understand how Terraform builds its dependency graph, including when depends_on is needed.
Make configurations reusable and safe with typed input variables, defaults, validation rules, sensitive and ephemeral values, locals, outputs and variable files.
Write dynamic configuration: for expressions, conditionals, built-in functions, count versus for_each, splat expressions and dynamic blocks, plus how to test them in terraform console.
What state is and why it matters, local versus remote backends on Azure and AWS, locking, the state commands, and keeping secrets in state safe.
A state file and a provider plugin download (init).
>= 1.16 and < 2.0.
azurerm_subnet.aks
Any three of list, set, map, object, tuple.
count = var.enabled ? 1 : 0, then refer to it with [0] or one().
terraform state list