github.com/jzbruno/terraform@v0.10.3-0.20180104230435-18975d727047/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
    11  
    12  The CLI configuration file allows customization of some behaviors of the
    13  Terraform CLI in general. This is separate from
    14  [your infrastructure configuration](/docs/configuration/index.html), and
    15  provides per-user customization that applies regardless of which working
    16  directory Terraform is being applied to.
    17  
    18  For example, the CLI configuration file can be used to activate a shared
    19  plugin cache directory that allows provider plugins to be shared between
    20  different working directories, as described in more detail below.
    21  
    22  The configuration is placed in a single file whose location depends on the
    23  host operating system:
    24  
    25  * On Windows, the file must be named named `terraform.rc` and placed
    26    in the relevant user's "Application Data" directory. The physical location
    27    of this directory depends on your Windows version and system configuration;
    28    use `$env:APPDATA` in PowerShell to find its location on your system.
    29  * On all other systems, the file must be named `.terraformrc` (note
    30    the leading period) and placed directly in the home directory
    31    of the relevant user.
    32  
    33  On Windows, beware of Windows Explorer's default behavior of hiding filename
    34  extensions. Terraform will not recognize a file named `terraform.rc.txt` as a
    35  CLI configuration file, even though Windows Explorer may _display_ its name
    36  as just `terraform.rc`. Use `dir` from PowerShell or Command Prompt to
    37  confirm the filename.
    38  
    39  ## Configuration File Syntax
    40  
    41  The configuration file uses the same _HCL_ syntax as `.tf` files, but with
    42  different attributes and blocks. The following example illustrates the
    43  general syntax; see the following section for information on the meaning
    44  of each of these settings:
    45  
    46  ```hcl
    47  plugin_cache_dir   = "$HOME/.terraform.d/plugin-cache"
    48  disable_checkpoint = true
    49  ```
    50  
    51  ## Available Settings
    52  
    53  The following settings can be set in the CLI configuration file:
    54  
    55  * `disable_checkpoint` - when set to `true`, disables
    56    [upgrade and security bulletin checks](/docs/commands/index.html#upgrade-and-security-bulletin-checks)
    57    that require reaching out to HashiCorp-provided network services.
    58  
    59  * `disable_checkpoint_signature` - when set to `true`, allows the upgrade and
    60    security bulletin checks described above but disables the use of an anonymous
    61    id used to de-duplicate warning messages.
    62  
    63  * `plugin_cache_dir` - enables
    64    [plugin caching](/docs/configuration/providers.html#provider-plugin-cache)
    65    and specifies, as a string, the location of the plugin cache directory.
    66  
    67  ## Deprecated Settings
    68  
    69  The following settings are supported for backward compatibility but are no
    70  longer recommended for use:
    71  
    72  * `providers` - a configuration block that allows specifying the locations of
    73    specific plugins for each named provider. This mechanism is deprecated
    74    because it is unable to specify a version number for each plugin, and thus
    75    it does not co-operate with the plugin versioning mechansim. Instead,
    76    place the plugin executable files in
    77    [the third-party plugins directory](/docs/configuration/providers.html#third-party-plugins).