Terraform & IaC
Terraform init and providers
terraform init installs the providers and modules a configuration needs and sets up its backend, and the committed lock file keeps every run on the same provider versions.
What you will be able to do
- Explain what terraform init installs and writes during setup.
- Decide when to upgrade providers, and how to review the lock file change that follows.
What is in the lesson
- A real situation where this goes wrong
- How it works, step by step
- A walkthrough with commands you can run
- How it fails in production, and how to tell
- Three quiz questions with explanations
Read this lessonFree. No account needed.
More in Terraform & IaC
- S3 remote backendBeginner · 4 min
S3 remote backend persists Terraform state in an S3 object.
- Plan approvalsBeginner · 4 min
Plan approvals gate changes before production apply.
- Dependency graphIntermediate · 4 min
Terraform builds a dependency graph from references and explicit depends_on lines, and the graph sets the order of work and decides which resources can run in parallel.
- State lockingIntermediate · 4 min
A supported backend locks Terraform state to coordinate operations that could write it.
- Remote backendsIntermediate · 5 min
A backend stores Terraform state in shared storage and can lock it so two runs cannot write the same state, and that state holds secrets that need the same protection…
- Drift detectionIntermediate · 4 min
Drift is a difference between Terraform's state and the real infrastructure, and a refresh-only plan shows it without changing anything, though a plan with refresh…