When you run a “ terraform init” command, a number of things happened, as documented in the official documentation.ĭuring init, Terraform checks the configuration of configuration files (.tf files – main.tf in most of my examples) for direct and indirect references to providers and attempts to load the required plugins. One of the first actions before you deploy resources with Terraform is to initialize Terraform with “ terraform init“. Let’s review first the challenges we sometimes come across with Terraform. credentials " blog post would have saved me hours (yes, literally hours) of work if a feature had been documented a bit more clearly… I hope it will help readers save some time too! Whenever Terraform requests module data from that hostname, it will authenticate with that token. This setting is a repeatable block, where the block label is a hostname (either or the hostname of your private install) and the block body contains a token attribute. This is only necessary when running Terraform on the command line runs managed by Terraform Enterprise can access private modules automatically. Plugin_cache_dir - enables plugin caching and specifies, as a string, the location of the plugin cache directory.Ĭredentials - provides credentials for use with Terraform Enterprise's private module registry.
#TERRAFORM PLUGINS UPGRADE#
The following settings can be set in the CLI configuration file:ĭisable_checkpoint - when set to true, disables upgrade and security bulletin checks that require reaching out to HashiCorp-provided network services.ĭisable_checkpoint_signature - when set to true, allows the upgrade and security bulletin checks described above but disables the use of an anonymous id used to de-duplicate warning messages. The following example illustrates the general syntax see the following section for information on the meaning of each of these settings: plugin_cache_dir = "$HOME/.terraform.d/plugin-cache" tf files, but with different attributes and blocks. The configuration file uses the same HCL syntax as. Use dir from PowerShell or Command Prompt to confirm the filename.
#TERRAFORM PLUGINS WINDOWS#
Terraform will not recognize a file named terraform.rc.txt as a CLI configuration file, even though Windows Explorer may display its name as just terraform.rc. On Windows, beware of Windows Explorer's default behavior of hiding filename extensions. terraformrc (note the leading period) and placed directly in the home directory of the relevant user. On all other systems, the file must be named.The physical location of this directory depends on your Windows version and system configuration use $env:APPDATA in PowerShell to find its location on your system. On Windows, the file must be named named terraform.rc and placed in the relevant user's "Application Data" directory.The configuration is placed in a single file whose location depends on the host operating system: This is separate from your infrastructure configuration. The CLI configuration file configures per-user settings for CLI behaviors, which apply across all Terraform working directories.