Terraform
Manage plugins overview
This topic provides an overview of the how to manage plugins that Terraform relies on to manage various types of resources. Providers are the only plugin type Terraform users interact with. Refer to Providers in the Terraform language docs for additional information about providers.
Workflow
When you initialize a working directory, Terraform installs any providers the Terraform configuration requires. Refer to
Provider Requirements in the Terraform configuration language information about requiring providers. Refer to the terraform init
command documentation for additional information about how initialize the working directory.
By default, Terraform initializes the working directory without any additional interaction, but you must have network access to download providers from their source registry.
You can configure Terraform's provider installation behavior to limit or skip network access, and to enable use of providers that are not available through a networked source. Terraform also includes commands that show information about providers and commands that reduce the effort of installing providers in air-gapped environments.
Configuring Plugin Installation
Terraform's configuration file includes options for caching downloaded plugins, or explicitly specifying a local or HTTPS mirror to install plugins from. For more information, see CLI Config File.
Getting Plugin Information
Use the terraform providers
command to get information
about the providers required by the current working directory's configuration.
Use the terraform version
command (or
terraform -version
) to show the specific provider versions installed for the
current working directory.
Use the terraform providers schema
command to
get machine-readable information about the resources and configuration options
offered by each provider.
Managing Plugin Installation
Use the terraform providers mirror
command to
download local copies of every provider required by the current working
directory's configuration. The directory uses the nested directory layout
that Terraform expects when installing plugins from a local source, so you can
transfer it directly to an air-gapped system that runs Terraform.
Use the terraform providers lock
command
to update the lock file that Terraform uses to ensure predictable runs when
using ambiguous provider version constraints.