

Terraform 0.12.0 or later is needed for version 2.0.0 and later of the Plugin SDK. You can find more about Terraform on its website and its GitHub repository.

Terraform itself is a tool for building, changing, and versioning infrastructure safely and efficiently. Refer to the Which SDK Should I Use? documentation for more information about differences between SDKs. The SDK is stable and broadly used across the provider ecosystem.įor new provider development it is recommended to investigate terraform-plugin-framework, which is a reimagined provider SDK that supports additional capabilities. terraform/providers and re-run TF_PLUGIN_CACHE_DIR="$HOME/.terraform.d/plugin-cache" terraform init.This SDK enables building Terraform plugin which allows Terraform's users to manage existing and popular service providers as well as custom in-house solutions. If you already have a working directory where providers have already been downloaded and wish to enable plugin caching to save disk space, you can just delete the sub directories in. There is no automatic migration to the caching mechanism. Terraform apply will just follow the symlink that has been created by init and will not need to know about the cache setting.

If the plugin cache setting is active, it will instead download it to the specified cache directory and create a symlink to the. When you run terraform init in a root module directory, it will download all required providers to the. Setting the variable when running init is good enough, apply does not need it. It's possible to add the following setting to $HOME/.terraformrc: Copy plugin_cache_dir = "$HOME/.terraform.d/plugin-cache"Īnother possibility is to set an environment variable when you run terraform init: Copy TF_PLUGIN_CACHE_DIR="$HOME/.terraform.d/plugin-cache" terraform init

To avoid creating multiple copies of the same file, you can use the Terraform Plugin Cache Show snapshot. Each root module will download a copy of the same provider file. If you're using many terraform root modules in a repository, downloading common providers like the AWS one can quickly add up to a lot of storage space wasted.
