Skip to content

Backport of Fix diagnostic & avoid variable override via environment into v1.11#36438

Merged
radeksimko merged 3 commits intov1.11from
backport/b-avoid-var-override-via-env/awfully-central-grubworm
Feb 6, 2025
Merged

Backport of Fix diagnostic & avoid variable override via environment into v1.11#36438
radeksimko merged 3 commits intov1.11from
backport/b-avoid-var-override-via-env/awfully-central-grubworm

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot commented Feb 5, 2025

Backport

This PR is auto-generated from #36435 to be assessed for backporting due to the inclusion of the label 1.11-backport.

The below text is copied from the body of the original PR.


Fixes #36410

It turns out the ordering of variable source evaluation is correct, it's just the diagnostic message that is wrong due to mixed ordering of arguments to fmt.Sprintf.

While the original report in #36410 suggests overriding variables via environment variables to be silently ignored, I think we cannot just make the same argument as was made in #36180

Specifically - We cannot expect users to be deleting autoloadable tfvars files. I do think it's reasonable to expect them to unset environment variables between plan and apply. Also, more importantly we only raise the diagnostic when values differ anyway.

That said after some consideration I chose to propose a warning that is still somewhat ignorable, just possibly noisy. I believe that is a good compromise that will not break workflows but still highlight what we consider anti-pattern.

Target Release

1.10.x

CHANGELOG entry

  • This change is user-facing and I added a changelog entry.
  • This change is not user-facing.

Overview of commits

@github-actions github-actions bot force-pushed the backport/b-avoid-var-override-via-env/awfully-central-grubworm branch from 950c777 to 13e1f42 Compare February 5, 2025 17:27
@github-actions github-actions bot requested a review from radeksimko February 5, 2025 17:27
@radeksimko radeksimko marked this pull request as ready for review February 5, 2025 17:28
@radeksimko radeksimko requested a review from a team as a code owner February 5, 2025 17:28
@radeksimko radeksimko merged commit ed83e11 into v1.11 Feb 6, 2025
@radeksimko radeksimko deleted the backport/b-avoid-var-override-via-env/awfully-central-grubworm branch February 6, 2025 09:24
@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions bot commented Mar 9, 2025

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant