Terraform CLI Cheat Sheet/Initialize working directory

Install required providers and modules and initialize backend configuration.

Section: Getting Started

Initialize working directory

bash
bash
terraform init
Explanation

Install required providers and modules and initialize backend configuration.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Getting Started
Init and upgrade providers/modules
Upgrade providers and modules to newest allowed versions during initialization.
OpenIn sheetbashsame section
Init without backend
Initialize modules and providers without configuring remote/backend state.
OpenIn sheetbashsame section
Reconfigure backend
Reinitialize backend configuration without migrating existing state automatically.
OpenIn sheetbashsame section
Show Terraform version
Print the installed Terraform CLI version and provider versions in use.
OpenIn sheetbashsame section
Show Terraform help
List Terraform subcommands and global options.
OpenIn sheetbashsame section
List providers used
Show provider requirements and dependency tree.
OpenIn sheetbash2 tag match