terraform-version
Print the Terraform version and installed providers
TLDR
SYNOPSIS
terraform version [options]
DESCRIPTION
terraform version prints the version of the terraform binary, the platform it was built for, and the providers selected for the current working directory. With no extra arguments it also reports when this binary is older than the current release, and it can include security bulletin checks unless those checks are disabled in the Terraform CLI settings.The provider list is the selection already recorded for this directory. A directory that has not been initialized has no providers to list; the Terraform version and platform are still printed. terraform version does not download providers, refresh state, or change the configuration.
PARAMETERS
-json
Print a JSON object instead of the human-readable report. The object includes terraform_version, platform, provider_selections, and terraform_outdated. Upgrade notices and security bulletin text are omitted.
INSTALL
CAVEATS
-json is the only flag specific to this subcommand. The JSON form leaves out the upgrade and security text that the human-readable form may print.The provider versions shown are the ones selected for this working directory, not every provider installed on the machine. Run terraform init before expecting a provider list.
HISTORY
terraform version has been part of the Terraform CLI throughout the HashiCorp releases. Terraform itself was created by Mitchell Hashimoto at HashiCorp and first released in 2014.
SEE ALSO
terraform(1), terraform-init(1), terraform-providers(1), tofu(1)
