Terraform CLI Cheat Sheet/Init and upgrade providers/modules

Upgrade providers and modules to newest allowed versions during initialization.

Section: Getting Started

Init and upgrade providers/modules

bash
bash
terraform init -upgrade
Explanation

Upgrade providers and modules to newest allowed versions during initialization.

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
Initialize working directory
Install required providers and modules and initialize backend configuration.
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
Format current directory
Rewrite Terraform files to canonical style.
OpenIn sheetbash1 tag match