hashicorp / terraform-config-inspect

A helper library for shallow inspection of Terraform configurations
Mozilla Public License 2.0
376 stars 76 forks source link

terraform.required_providers provider source #37

Closed mildwonkey closed 4 years ago

mildwonkey commented 4 years ago

This is a breaking change!

module.RequiredProviders is now a map[string]ProviderRequirement instead of map[string][]string, and the json output has changed accordingly.

The following syntaxes - not yet supported by Terraform - are now supported, and can be used separately or in conjunction:

terraform {
  required_providers {
      // new syntax
      "cloud" = {
        source = "hashicorp/cloud"
        version = "1.0.0"
      }
      // original syntax, still supported
      "cloud" = "1.0.0"
    }
}

See the test files for updates to the json output.