Files
opentf/website/docs/commands/providers.html.markdown
Kristin Laemmert 269d511481 command/providers: refactor with new provider types and functions
The providers command has been refactored to use the modern provider types and
ProviderRequirements() functions. This resulted in a breaking change to
the output: it no longer outputs the providers by module and no longer
prints `(inherited)` or `(from state)` to show why a provider is
included. We decided that at this time it was best to stick with the
existing functions and make this change, but if we get feedback from the
community we will revisit.

Additional tests to exercise providers in modules and providers from
state have been included.
2020-04-10 15:08:10 -04:00

1.5 KiB

layout, page_title, sidebar_current, description
layout page_title sidebar_current description
commands-providers Command: providers docs-commands-providers The `terraform providers` command prints information about the providers used in the current configuration.

Command: providers

The terraform providers command prints information about the providers used in the current configuration.

Provider dependencies are created in several different ways:

  • Explicit use of a terraform.required_providers block in configuration, optionally including a version constraint.

  • Explicit use of a provider block in configuration, optionally including a version constraint.

  • Use of any resource belonging to a particular provider in a resource or data block in configuration.

  • Existence of any resource instance belonging to a particular provider in the current state. For example, if a particular resource is removed from configuration, it continues to create a dependency on its provider until its instances have been destroyed.

This command gives an overview of all of the current dependencies, as an aid to understanding why a particular provider is needed.

This command is a nested subcommand, meaning that it has further subcommands. These subcommands are listed to the left.

Usage

Usage: terraform providers [config-path]

Pass an explicit configuration path to override the default of using the current working directory.

Please refer to the subcommands to the left for additional usages.