Skip to content

Commit

Permalink
website: Fix plugin path on Windows (hashicorp#19423)
Browse files Browse the repository at this point in the history
...and one other reference to the application data directory.

Context:

https://docs.microsoft.com/en-us/windows/desktop/shell/knownfolderid#folderid_roamingappdata

In newer Windows versions, the folder accessible as `%APPDATA%` (and via various
APIs) is actually at something like "documents and settings\user\application
data\roaming", while earlier versions omit the "\roaming" part of the path. This
means you can confuse people by referring to the "application data" directory by
its human name, because "roaming" is the real application data directory, but it
looks like a subdirectory of "application data".

Thus, it's less confusing to just use the `%APPDATA%` variable, with the added
benefit that you can copy and paste the path and it'll just work in most places.
  • Loading branch information
nfagerlund authored Nov 21, 2018
1 parent 5b0b7d0 commit 7d5db95
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion website/docs/commands/cli-config.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The configuration is placed in a single file whose location depends on the
host operating system:

* On Windows, the file must be named named `terraform.rc` and placed
in the relevant user's "Application Data" directory. The physical location
in the relevant user's `%APPDATA%` directory. 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 all other systems, the file must be named `.terraformrc` (note
Expand Down
2 changes: 1 addition & 1 deletion website/docs/commands/init.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ For [providers distributed by HashiCorp](/docs/providers/index.html),
init will automatically download and install plugins if necessary. Plugins
can also be manually installed in the user plugins directory, located at
`~/.terraform.d/plugins` on most operating systems and
`<APPLICATION DATA>\plugins` on Windows.
`%APPDATA%\terraform.d\plugins` on Windows.

For more information about configuring and installing providers, see
[Configuration: Providers](/docs/configuration/providers.html).
Expand Down
4 changes: 2 additions & 2 deletions website/docs/configuration/providers.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ locations, depending on the host operating system:

Operating system | User plugins directory
------------------|-----------------------
Windows | `terraform.d\plugins` in your user's "Application Data" directory
All other systems | `.terraform.d/plugins` in your user's home directory
Windows | `%APPDATA%\terraform.d\plugins`
All other systems | `~/.terraform.d/plugins`

Once a plugin is installed, `terraform init` can initialize it normally.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/plugins/basics.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ in its respective documentation section.
The [provider plugins distributed by HashiCorp](/docs/providers/index.html) are
automatically installed by `terraform init`. Third-party plugins (both
providers and provisioners) can be manually installed into the user plugins
directory, located at `<APPLICATION DATA>\terraform.d\plugins` on Windows and
directory, located at `%APPDATA%\terraform.d\plugins` on Windows and
`~/.terraform.d/plugins` on other systems.

For more information, see:
Expand Down

0 comments on commit 7d5db95

Please sign in to comment.