github.com/Kevinklinger/open_terraform@v0.11.12-beta1/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.
    64      Terraform uses this when performing remote operations or state access with
    65      the [remote backend](../backends/types/remote.html) and when accessing
    66      Terraform Enterprise's [private module registry.](/docs/enterprise/registry/index.html)
    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 accesses
    71      state, modules, or remote operations from that hostname, it will
    72      authenticate with that API token.
    73  
    74      ``` hcl
    75      credentials "app.terraform.io" {
    76        token = "xxxxxx.atlasv1.zzzzzzzzzzzzz"
    77      }
    78      ```
    79  
    80      ~> **Important:** The token provided here must be a
    81      [user API token](/docs/enterprise/users-teams-organizations/users.html#api-tokens),
    82      and not a team or organization token.
    83  
    84      -> **Note:** The credentials hostname must match the hostname in your module
    85      sources and/or backend configuration. If your Terraform Enterprise instance
    86      is available at multiple hostnames, use one of them consistently. (The SaaS
    87      version of Terraform Enterprise responds to API calls at both its newer
    88      hostname, app.terraform.io, and its historical hostname,
    89      atlas.hashicorp.com.)
    90  
    91  ## Deprecated Settings
    92  
    93  The following settings are supported for backward compatibility but are no
    94  longer recommended for use:
    95  
    96  * `providers` - a configuration block that allows specifying the locations of
    97    specific plugins for each named provider. This mechanism is deprecated
    98    because it is unable to specify a version number for each plugin, and thus
    99    it does not co-operate with the plugin versioning mechansim. Instead,
   100    place the plugin executable files in
   101    [the third-party plugins directory](/docs/configuration/providers.html#third-party-plugins).