
Terraform Foundations
Understand infrastructure as code, providers, plans, state, variables, outputs, and reusable configuration using static Terraform examples.
IntermediateTerraform~70 min
Start learningInfrastructure as code
Learn how Terraform describes and plans infrastructure changes.
- 1Desired infrastructure and providersTerraform uses configuration files to describe infrastructure. A provider lets Terraform interact with a platform or service. Terraform compares configuration with its recorded
- 2Plan before applyingTerraform’s workflow commonly includes initialization, planning, review, and applying. A plan previews the actions Terraform proposes. Read the plan carefully, especially when it c
Configuration and state
Use variables, outputs, and state carefully.
- 1Resources, variables, and outputsA resource describes an object Terraform can manage. Variables let configuration accept values; outputs expose useful results after Terraform evaluates the configuratio
- 2State and change trackingTerraform state records the relationship between configuration and managed objects. State can contain sensitive data, so protect it with appropriate access controls, encryption
Repeatable team workflows
Make configuration changes reviewable and reusable.
- 1Format and validate configurationConsistent formatting and validation catch common configuration problems early. They do not prove that a change is safe or that a provider will create the intended result.
- 2Modules and a team case studyA Terraform module is a collection of configuration files managed together. Modules can package repeated patterns behind inputs and outputs. Use clear interfaces and versioning