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

Clobbering the CLI config file by default #269

Open
brandonc opened this issue Nov 7, 2022 · 0 comments · May be fixed by #270
Open

Clobbering the CLI config file by default #269

brandonc opened this issue Nov 7, 2022 · 0 comments · May be fixed by #270

Comments

@brandonc
Copy link

brandonc commented Nov 7, 2022

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?

@brandonc brandonc linked a pull request Nov 9, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant