2020-10-27 02:15:36 +01:00
|
|
|
---
|
2021-11-23 00:47:36 +01:00
|
|
|
page_title: Managing Plugins - Terraform CLI
|
|
|
|
description: >-
|
|
|
|
Commands to install, configure, and show information about providers. Also
|
|
|
|
commands to reduce install effort in air-gapped environments.
|
|
|
|
sidebar_title: Managing Plugins
|
2020-10-27 02:15:36 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
# Managing Plugins
|
|
|
|
|
|
|
|
Terraform relies on plugins called "providers" in order to manage various types
|
|
|
|
of resources. (For more information about providers, see
|
2021-11-23 00:47:36 +01:00
|
|
|
[Providers](/language/providers/) in the Terraform
|
2020-10-27 02:15:36 +01:00
|
|
|
language docs.)
|
|
|
|
|
|
|
|
-> **Note:** Providers are currently the only plugin type most Terraform users
|
|
|
|
will interact with. Terraform also supports third-party provisioner plugins, but
|
|
|
|
we discourage their use.
|
|
|
|
|
|
|
|
Terraform downloads and/or installs any providers
|
2021-11-23 00:47:36 +01:00
|
|
|
[required](/language/providers/requirements) by a configuration
|
|
|
|
when [initializing](/cli/init/) a working directory. By default,
|
2020-10-27 02:15:36 +01:00
|
|
|
this works without any additional interaction but requires 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 aren't available via a
|
|
|
|
networked source. Terraform also includes some commands to show information
|
|
|
|
about providers and to reduce the effort of installing providers in airgapped
|
|
|
|
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
|
2021-11-23 00:47:36 +01:00
|
|
|
more information, see [CLI Config File](/cli/config/config-file).
|
2020-10-27 02:15:36 +01:00
|
|
|
|
|
|
|
## Getting Plugin Information
|
|
|
|
|
2021-11-23 00:47:36 +01:00
|
|
|
Use the [`terraform providers`](/cli/commands/providers) command to get information
|
2020-10-27 02:15:36 +01:00
|
|
|
about the providers required by the current working directory's configuration.
|
|
|
|
|
2021-11-23 00:47:36 +01:00
|
|
|
Use the [`terraform version`](/cli/commands/version) command (or
|
2021-01-12 23:40:45 +01:00
|
|
|
`terraform -version`) to show the specific provider versions installed for the
|
|
|
|
current working directory.
|
|
|
|
|
2021-11-23 00:47:36 +01:00
|
|
|
Use the [`terraform providers schema`](/cli/commands/providers/schema) command to
|
2020-10-27 02:15:36 +01:00
|
|
|
get machine-readable information about the resources and configuration options
|
|
|
|
offered by each provider.
|
|
|
|
|
|
|
|
## Managing Plugin Installation
|
|
|
|
|
2021-11-23 00:47:36 +01:00
|
|
|
Use the [`terraform providers mirror`](/cli/commands/providers/mirror) command to
|
2020-10-27 02:15:36 +01:00
|
|
|
download local copies of every provider required by the current working
|
|
|
|
directory's configuration. This directory will use the nested directory layout
|
|
|
|
that Terraform expects when installing plugins from a local source, so you can
|
|
|
|
transfer it directly to an airgapped system that runs Terraform.
|
|
|
|
|
2021-11-23 00:47:36 +01:00
|
|
|
Use the [`terraform providers lock`](/cli/commands/providers/lock) command
|
2020-10-27 02:15:36 +01:00
|
|
|
to update the lock file that Terraform uses to ensure predictable runs when
|
|
|
|
using ambiguous provider version constraints.
|