Interview Prep/Terraform/Workflow and CLI

Which `terraform init` flags matter and when do you use them?

IntermediateConceptWorkflow and CLI
Answer

-upgrade re-resolves provider and module versions; -reconfigure ignores previous backend config; -migrate-state copies state to a new backend; -backend-config=file_or_key=value supplies partial backend config such as bucket names; -input=false for CI; -lockfile=readonly to fail rather than modify the lock file.

All Terraform questions Roadmap: Terraform

More on Workflow and CLI