Files
opentf/website/docs/cli/commands/providers/index.mdx
Christian Mesh 3b3822d770 Improve documentation around static evaluation (#1843)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
Signed-off-by: ollevche <ollevche@gmail.com>
Co-authored-by: ollevche <ollevche@gmail.com>
2024-07-23 09:31:50 -04:00

59 lines
2.3 KiB
Plaintext

---
description: >-
The tofu providers command prints information about the providers
required in the current configuration.
---
# Command: providers
The `tofu providers` command shows information about the
[provider requirements](../../../language/providers/requirements.mdx) of the
configuration in the current working directory, as an aid to understanding
where each requirement was detected from.
This command also has several subcommands with different purposes.
## Usage
Usage: `tofu providers [options]`
```
$ tofu providers
Providers required by configuration:
.
└── module.submodule
├── provider[registry.opentofu.org/hashicorp/tfcoremock]
└── module.nested
Providers required by state:
provider[registry.opentofu.org/hashicorp/tfcoremock]
```
:::note
Use of variables in [module sources](../../../language/modules/sources.mdx#support-for-variable-and-local-evaluation),
[backend configuration](../../../language/settings/backends/configuration.mdx#variables-and-locals),
or [encryption block](../../../language/state/encryption.mdx#configuration)
requires [assigning values to root module variables](../../../language/values/variables.mdx#assigning-values-to-root-module-variables)
when running `tofu providers`.
:::
This command accepts the following options:
* `-var 'NAME=VALUE'` - Sets a value for a single
[input variable](../../../language/values/variables.mdx) declared in the
root module of the configuration. Use this option multiple times to set
more than one variable. Refer to
[Input Variables on the Command Line](../plan.mdx#input-variables-on-the-command-line) for more information.
* `-var-file=FILENAME` - Sets values for potentially many
[input variables](../../../language/values/variables.mdx) declared in the
root module of the configuration, using definitions from a
["tfvars" file](../../../language/values/variables.mdx#variable-definitions-tfvars-files).
Use this option multiple times to include values from more than one file.
There are several other ways to set values for input variables in the root
module, aside from the `-var` and `-var-file` options. Refer to
[Assigning Values to Root Module Variables](../../../language/values/variables.mdx#assigning-values-to-root-module-variables) for more information.