Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terraform login fails to create the necessary credentials file on Windows #24388

Closed
pkolyvas opened this issue Mar 16, 2020 · 1 comment · Fixed by #24397
Closed

Terraform login fails to create the necessary credentials file on Windows #24388

pkolyvas opened this issue Mar 16, 2020 · 1 comment · Fixed by #24397
Assignees
Labels
bug cli v0.12 Issues (primarily bugs) reported against v0.12 releases windows

Comments

@pkolyvas
Copy link
Contributor

pkolyvas commented Mar 16, 2020

Terraform Version

Terraform 0.12.23
Microsoft Windows 10 

Debug Output

Token for app.terraform.io:

Retrieved token for user hc-onb-test-1


Error: Failed to save API token

The given host returned an API token, but Terraform failed to save it: cannot
set mode for temporary file
C:\Users\IEUser\AppData\Roaming\terraform.d\credentials.tfrc.json357534147:
chmod
C:\Users\IEUser\AppData\Roaming\terraform.d\credentials.tfrc.json357534147:
not supported by windows.

Expected Behavior

Terraform CLI is able to successfully create the required file in order to authenticate with Terraform Cloud.

Actual Behavior

Terraform failed to create the necessary file needed to store the Terraform Cloud token when using terraform login on a Windows workstation.

Steps to Reproduce

  1. terraform login (from Command Prompt or Powershell)
  2. Answer with y
  3. Follow the on-screen steps to create the user token
  4. Paste the token back into Terraform on the CLI
@pkolyvas pkolyvas added bug v0.12 Issues (primarily bugs) reported against v0.12 releases cli windows labels Mar 16, 2020
@alisdair alisdair self-assigned this Mar 17, 2020
@ghost
Copy link

ghost commented Apr 18, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug cli v0.12 Issues (primarily bugs) reported against v0.12 releases windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants