Does Terraform provide a mechanism to find the provider version?



  • Other than reading .terraform.lock.hcl is there a mechanisms in Terraform to find the version of the providers I am using with the cli interface?

    I don't see the version when I run terraform providers or the ability to add a -v flag (or another flag) under terraform providers --help



  • You can find the version of your providers with terraform version

    ❯ terraform version
    Terraform v1.1.9
    on linux_amd64
    + provider registry.terraform.io/hashicorp/aws v3.75.1
    

    With https://github.com/stedolan/jq

    ❯ terraform version -json | jq .provider_selections
    {
      "registry.terraform.io/hashicorp/aws": "3.75.1"
    }
    

    terraform version -json | jq .provider_selections

    I opened a https://github.com/hashicorp/terraform/issues/31048#issue-1236104011



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2