7.2 Terraform: providers, resources and state
You can create, change and destroy real infrastructure from a file in Git.
Before:06. Containers & KubernetesUnlocks:11. Projects, Certification & Portfolio
The same thing, three names
One idea, sold under a different brand by each provider. Learn it once and you can read any job advertisement.
- On AWS
- AWS provider
- On Azure
- AzureRM provider
- On Google Cloud
- Google provider
Terraform turns infrastructure into files in Git: providers, resources, variables and outputs describe what should exist, plan shows what would change, apply makes it so. This topic includes the two habits that keep it safe — reading a plan properly before applying, and destroying cleanly so a lab does not become a bill. The state file gets special attention because it is the part everyone underestimates: it records what Terraform believes exists, it must live somewhere shared and safe, and it contains secrets, which makes it sensitive in both senses.
Work through these
Providers, resources, variables and outputs
Providers connect the tool to a cloud, resources are the things you declare, and variables and outputs are how configurations take input and hand back results. These four are enough to write a working configuration.
The state file: what it is, where it must live, why it is sensitive
The state file records what the tool believes exists, which is why it must be stored safely and shared carefully. It also contains sensitive values, so treating it as an ordinary file is a mistake.
plan before apply, always; reading a plan properly
Previewing changes before applying them is the habit that separates confident infrastructure work from gambling. Reading the preview properly means checking what will be destroyed, not only what will be created.
Destroying cleanly so a lab does not become a bill
Tearing an environment down completely is what stops a learning exercise turning into a monthly charge. Practising the teardown is as important as practising the build.
Sign in to keep your progress.
Free resources
We haven't checked most of these for screen reader use yet.
Links last checked 29 Aug 2026.
Stuck here?
Ask a mentor. A real person answers, and they can see exactly which topic you're on. Usually within a couple of working days.
Checking your session…
Topics shown in module order.