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
I have verified that switching to TF_CLI_CONFIG_FILE fixes the issue. I built and pushed to a private repo a fixed provider version, and after switching to that version, the issue was fixed.
What happened?
The OpenTofu provider fails to load a provided .tofurc config file, and so it fails to authenticate against a private Terraform module repository.
Upon investigation I see that the provider seems to be setting
TOFU_CLI_CONFIG_FILE=./.tofurc
(https://github.com/upbound/provider-opentofu/blob/main/internal/opentofu/opentofu.go#L187), but according to the OpenTofu docs, it should be settingTF_CLI_CONFIG_FILE
: https://opentofu.org/docs/v1.8/cli/config/environment-variables/#tf_cli_config_fileI confirmed this by running a local
tofu init -from-module
with both env var names, and only theTF_
one works.It looks like this would also mean that the plugin cache dir setting will also not function as expected, but I haven't tested that: https://github.com/upbound/provider-opentofu/blob/main/internal/opentofu/opentofu.go#L180
How can we reproduce it?
.tofurc
config example in the docs with a token for a private module repo in the config: https://github.com/upbound/provider-opentofu/blob/main/docs/monolith/Configuration.md#tofurc-repository-supportWhat environment did it happen in?
I'm using v0.2.1, but it looks like any version would have the same issue.
The text was updated successfully, but these errors were encountered: