• HashiCorp Developer

  • HashiCorp Cloud Platform
  • Terraform
  • Packer
  • Consul
  • Vault
  • Boundary
  • Nomad
  • Waypoint
  • Vagrant
Terraform
  • Install
  • Tutorials
    • About the Docs
    • Configuration Language
    • Terraform CLI
    • Terraform Cloud
    • Terraform Enterprise
    • CDK for Terraform
    • Provider Use
    • Plugin Development
    • Registry Publishing
    • Integration Program
  • Registry(opens in new tab)
  • Try Cloud(opens in new tab)
  • Sign up
Terraform Home

Terraform CLI

Skip to main content
  • Terraform CLI
  • Basic CLI Features
    • Overview
    • Plugin Signing
    • providers
    • version
    • providers lock
    • providers mirror
    • providers schema

  • Terraform Internals

  • Resources

  • Tutorial Library
  • Certifications
  • Community Forum
    (opens in new tab)
  • Support
    (opens in new tab)
  • GitHub
    (opens in new tab)
  • Terraform Registry
    (opens in new tab)
  1. Developer
  2. Terraform
  3. Terraform CLI
  4. commands
  5. version
  • Terraform
  • v1.2.x
  • v1.1 and earlier

ยปCommand: version

The terraform version displays the current version of Terraform and all installed plugins.

Usage

Usage: terraform version [options]

With no additional arguments, version will display the version of Terraform, the platform it's installed on, installed providers, and the results of upgrade and security checks unless disabled.

This command has one optional flag:

  • -json - If specified, the version information is formatted as a JSON object, and no upgrade or security information is included.

Note: Platform information was added to the version command in Terraform 0.15.

Example

Basic usage, with upgrade and security information shown if relevant:

$ 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://www.terraform.io/downloads.html

As JSON:

$ terraform version -json
{
  "terraform_version": "0.15.0",
  "platform": "darwin_amd64",
  "provider_selections": {
    "registry.terraform.io/hashicorp/null": "3.0.0"
  },
  "terraform_outdated": true
}
Edit this page on GitHub

On this page

  1. Command: version
  2. Usage
  3. Example
Give Feedback(opens in new tab)
  • Certifications
  • System Status
  • Terms of Use
  • Security
  • Privacy
  • Trademark Policy
  • Trade Controls
  • Give Feedback(opens in new tab)