terraform version
The command that prints the Terraform version, the platform it was built for and the version of every installed provider.
In more detail
Run it first when you join a project, because a configuration can require a newer version than you have. Inside an initialised directory it also lists each provider with the exact version selected. OpenTofu has the same command under the name tofu.
Example
terraform versionRelated terms
- required_version — The setting in the terraform block that says which Terraform versions may run this configuration.
- Terraform — An infrastructure-as-code tool from HashiCorp that creates and changes cloud resources such as servers, networks and databases from configuration files.
- OpenTofu — The open source fork of Terraform, created in 2023 after the licence change and governed by a foundation rather than one company.
Taught in
- The Licence, OpenTofu And IBM — Infrastructure as Code with Terraform
- Installing Terraform And Meeting The CLI — Infrastructure as Code with Terraform
- Providers And The required_providers Block — Infrastructure as Code with Terraform
- One Hour, No Weights Published — HashiCorp Terraform Associate (004) Exam Prep
- Drift: When Reality Stops Matching State — HashiCorp Terraform Associate (004) Exam Prep
- Verbose Logging: TF_LOG And Friends — HashiCorp Terraform Associate (004) Exam Prep
- Collaboration And Governance: Teams, Policies, Registry And Health — HashiCorp Terraform Associate (004) Exam Prep
- VCS, CLI And API Workflows: Speculative Plans And Run Triggers — HashiCorp Terraform Associate (004) Exam Prep