blob: d2f0d3a4e8e31c04d7529fcaa5c1610f4e92b2e9 [file] [log] [blame]
---
page_title: terraform version command reference
description: >-
The terraform version command prints the Terraform version and the version
of all installed plugins.
---
# `terraform version` command
The `terraform version` command prints the current version of the Terraform binary and all
installed plugins.
## Usage
Usage: `terraform version [options]`
With no additional arguments, `version` displays the version of Terraform,
the platform it is installed on, installed providers, and the results of upgrade
and security checks unless disabled. Refer to [Upgrade and Security Bulletin Checks](/terraform/cli/commands#upgrade-and-security-bulletin-checks) for additional information.
## Flags
This command has one optional flag:
* `-json` - Formats version information as a JSON object. No upgrade or security information is included.
## Example
Basic usage, with upgrade and security information shown if relevant:
```shellsession
$ terraform version
Terraform v0.15.0
on darwin_amd64
+ provider registry.terraform.io/hashicorp/null v3.0.0
Your version of Terraform is out of date! The latest version
is X.Y.Z. You can update by downloading from https://developer.hashicorp.com/terraform/install
```
As JSON:
```shellsession
$ terraform version -json
{
"terraform_version": "0.15.0",
"platform": "darwin_amd64",
"provider_selections": {
"registry.terraform.io/hashicorp/null": "3.0.0"
},
"terraform_outdated": true
}
```