Interview Prep/Terraform/IaC and Terraform Fundamentals

What exactly happens during `terraform plan`?

AdvancedConceptIaC and Terraform Fundamentals
Answer

Terraform reads state, refreshes each managed resource by calling the provider's read function, then compares the refreshed state with the configuration to propose a diff. Providers validate the config (ValidateResourceConfig) and compute PlanResourceChange, which marks attributes that depend on unknown inputs as "known after apply". The result is a plan graph; nothing is changed remotely.

All Terraform questions Roadmap: Terraform

More on IaC and Terraform Fundamentals