hashicorp / hashicorp/setup-terraform
Clobbering the CLI config file by default
- Dominant language
- JavaScript
- Stars
- 1.6k
- Forks
- 288
- Avg merge
- 23h 21m
- Merged PRs (30d)
- 3
Description
If you don't specify the TF_CLI_CONFIG_FILE environment variable, multiple setup actions on the same github runner can clobber the credentials file written by previous actions. This is because, by default, setup-terraform overwrites $HOME/.terraformrc
setup-terraform seems to want to own the CLI config file that it creates in order to configure host credentials (it uses fs.writeFile, which overwrites the file if it exists) so a potential solution is to configure terraform with a temp file that has some uniqueness and can be cleaned up reliably. I'd be willing to create a PR, but I thought I'd ask: is there any reason to use the default $HOME/.terraformrc file path to configure terraform CLI in the absence of TF_CLI_CONFIG_FILE?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.