Interview Prep/Terraform/Workflow and CLI

What do `terraform fmt` and `terraform validate` check?

BeginnerConceptWorkflow and CLI
Answer

fmt rewrites files into canonical style (use fmt -check -recursive in CI). validate checks syntax, types and references offline, without contacting the cloud or reading state. It needs init first because it needs provider schemas.

All Terraform questions Roadmap: Terraform

More on Workflow and CLI