github.com/hartzell/terraform@v0.8.6-0.20180503104400-0cc9e050ecd4/website/docs/commands/cli-config.html.markdown (about) 1 --- 2 layout: "docs" 3 page_title: "CLI Configuration" 4 sidebar_current: "docs-commands-cli-config" 5 description: |- 6 The general behavior of the Terraform CLI can be customized using the CLI 7 configuration file. 8 --- 9 10 # CLI Configuration File (`.terraformrc`/`terraform.rc`) 11 12 The CLI configuration file configures per-user settings for CLI behaviors, 13 which apply across all Terraform working directories. This is separate from 14 [your infrastructure configuration](/docs/configuration/index.html). 15 16 ## Location 17 18 The configuration is placed in a single file whose location depends on the 19 host operating system: 20 21 * On Windows, the file must be named named `terraform.rc` and placed 22 in the relevant user's "Application Data" directory. The physical location 23 of this directory depends on your Windows version and system configuration; 24 use `$env:APPDATA` in PowerShell to find its location on your system. 25 * On all other systems, the file must be named `.terraformrc` (note 26 the leading period) and placed directly in the home directory 27 of the relevant user. 28 29 On Windows, beware of Windows Explorer's default behavior of hiding filename 30 extensions. Terraform will not recognize a file named `terraform.rc.txt` as a 31 CLI configuration file, even though Windows Explorer may _display_ its name 32 as just `terraform.rc`. Use `dir` from PowerShell or Command Prompt to 33 confirm the filename. 34 35 ## Configuration File Syntax 36 37 The configuration file uses the same _HCL_ syntax as `.tf` files, but with 38 different attributes and blocks. The following example illustrates the 39 general syntax; see the following section for information on the meaning 40 of each of these settings: 41 42 ```hcl 43 plugin_cache_dir = "$HOME/.terraform.d/plugin-cache" 44 disable_checkpoint = true 45 ``` 46 47 ## Available Settings 48 49 The following settings can be set in the CLI configuration file: 50 51 - `disable_checkpoint` — when set to `true`, disables 52 [upgrade and security bulletin checks](/docs/commands/index.html#upgrade-and-security-bulletin-checks) 53 that require reaching out to HashiCorp-provided network services. 54 55 - `disable_checkpoint_signature` — when set to `true`, allows the upgrade and 56 security bulletin checks described above but disables the use of an anonymous 57 id used to de-duplicate warning messages. 58 59 - `plugin_cache_dir` — enables 60 [plugin caching](/docs/configuration/providers.html#provider-plugin-cache) 61 and specifies, as a string, the location of the plugin cache directory. 62 63 - `credentials` — provides credentials for use with Terraform Enterprise's 64 [private module registry.](/docs/enterprise/registry/index.html) This is 65 only necessary when running Terraform on the command line; runs managed by 66 Terraform Enterprise can access private modules automatically. 67 68 This setting is a repeatable block, where the block label is a hostname 69 (either `app.terraform.io` or the hostname of your private install) and 70 the block body contains a `token` attribute. Whenever Terraform requests 71 module data from that hostname, it will authenticate with that token. 72 73 ``` hcl 74 credentials "app.terraform.io" { 75 token = "xxxxxx.atlasv1.zzzzzzzzzzzzz" 76 } 77 ``` 78 79 ~> **Note:** The credentials hostname must match the hostname in your module 80 sources. If your Terraform Enterprise instance is available at multiple 81 hostnames, use one of them consistently. (The SaaS version of Terraform 82 Enterprise responds to API calls at both its newer hostname, 83 app.terraform.io, and its historical hostname, atlas.hashicorp.com.) 84 85 ## Deprecated Settings 86 87 The following settings are supported for backward compatibility but are no 88 longer recommended for use: 89 90 * `providers` - a configuration block that allows specifying the locations of 91 specific plugins for each named provider. This mechanism is deprecated 92 because it is unable to specify a version number for each plugin, and thus 93 it does not co-operate with the plugin versioning mechansim. Instead, 94 place the plugin executable files in 95 [the third-party plugins directory](/docs/configuration/providers.html#third-party-plugins).