You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
│ Error: Required token could not be found
│
│ Run the following command to generate a token for app.terraform.io:
│ terraform login
The reason appears to be that Terraform is looking for ~/.terraform.d/credentials.tfrc.json (referenced in terraform login --help), whereas the action is writing the credentials to ~/.terraformrc. Adding this intermediate step subsequently works around the issue:
- name: Symlink Terraform credentials to alternative location
shell: bash
run: |
mkdir -p ~/.terraform.d
ln -s ~/.terraformrc ~/.terraform.d/credentials.tfrc.json
The action has the (undocumented) ability to override the location with TF_CLI_CONFIG_FILE
but this didn't appear to work (this may well have been user error though!).
It could be helpful if the config file location could be set via an input parameter. I don't know enough about Terraform, and the issue to say whether ~/.terraform.d/credentials.tfrc.json should be getting used instead of .terraformrc.
The text was updated successfully, but these errors were encountered:
If we supply the action with
cli_config_credentials_token
, followed by a Terraform init step:the result is an error on the latter step:
The reason appears to be that Terraform is looking for
~/.terraform.d/credentials.tfrc.json
(referenced interraform login --help
), whereas the action is writing the credentials to~/.terraformrc
. Adding this intermediate step subsequently works around the issue:The action has the (undocumented) ability to override the location with
TF_CLI_CONFIG_FILE
setup-terraform/lib/setup-terraform.js
Line 112 in 76fd07b
It could be helpful if the config file location could be set via an input parameter. I don't know enough about Terraform, and the issue to say whether
~/.terraform.d/credentials.tfrc.json
should be getting used instead of.terraformrc
.The text was updated successfully, but these errors were encountered: