mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-19 17:59:05 -05:00
Previously we generated some logs during the discovery process indicating which locations OpenTofu was probing for ambient credentials, but we didn't explicitly report the overall result of the discovery process. These new log lines will now report the final effective set of credential configuration locations just before we try to use them in either the provider installation or module installation codepaths. The strings returned by CredentialsConfigLocationForUI are intended for just this sort of feedback: the exact format varies for each kind of location, but it's always a concise string identifying a location that OpenTofu will consider when attempting to decide credentials. Logging this here does unfortunately mean that the log output will be repeated for each separate OCI registry request. There not being a great single location to generate these logs was the main reason we didn't include something like this in the first implementation, but the set of config locations is small on any reasonable system and we've already had a few folks struggle to understand why OpenTofu is making a certain decision about credential sources so this is a pragmatic small step to give us some extra diagnostic information in bug reports without affecting the normal UI output for now. Signed-off-by: Martin Atkins <mart@degeneration.co.uk>