Skip to content

TF_CLI_CONFIG_FILE env var does not seem to be honoured when populating credentials #394

Answered by dflook
aaklilu asked this question in Q&A
Discussion options

You must be logged in to vote

It wasn't intended for a .terraformrc file to be supplied, even though it takes care to use what is there and undo any changes it makes to it. $HOME is shared by all container based action steps, so it could be placed there from within a previous container based action. There isn't an easy way to get this directory from the host runner, but it was /home/runner/work/_temp/_github_home on GitHub hosted runners the last time I checked.

I think the best way for you to provide the provider_installation would be to add it using a script in the TERRAFORM_PRE_RUN environment variable, e.g.

env:
  TERRAFORM_PRE_RUN: |
    cat >> $HOME/.terraformrc <<EOF

    provider_installation {
        direct {

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@aaklilu
Comment options

Answer selected by aaklilu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants