Skip to main content

Command: providers

The tofu providers command shows information about the provider requirements 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]

Code Block
$ 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]

This command accepts the following options:

  • -var 'NAME=VALUE' - Sets a value for a single input variable 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 for more information.

  • -var-file=FILENAME - Sets values for potentially many input variables declared in the root module of the configuration, using definitions from a "tfvars" file. 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 for more information.