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

Fully parse input variables from TF_VAR_ when validating during apply #36121

Merged
merged 2 commits into from
Nov 29, 2024

Conversation

jbardin
Copy link
Member

@jbardin jbardin commented Nov 27, 2024

Input variables taken from the environment have no type information, so are initially stored as strings. When we compare those for validation during apply, we have to make sure to use the same parsing logic used in the plan in order to compare them with the stored variables.

Fixes #36106

@jbardin jbardin requested a review from a team as a code owner November 27, 2024 18:09
@jbardin jbardin added the 1.10-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Nov 27, 2024
Input variables taken from the environment have no type information, so
are initially stored as strings. When we compare those for validation
during apply, we have to make sure to use the same parsing logic used in
the plan in order to compare them with the stored variables.
Non-string input variables taken from the environment initially need to
be parsed and stored as string, since there is no type associated type
information. Make sure these are correctly handled when validated during
apply.
@JulesClaussen
Copy link

Hey @jbardin thank you for the work! Is there anything blocking from merging? Thanks :)

@jbardin jbardin merged commit cbc837c into main Nov 29, 2024
7 checks passed
@jbardin jbardin deleted the jbardin/apply-env-vars branch November 29, 2024 15:34
Copy link
Contributor

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

@jonathandbyrd
Copy link

has this been merged into the release v1.10? We're still seeing the error but want to make sure its because it simply hasn't been released into the wild yet

@jbardin
Copy link
Member Author

jbardin commented Dec 2, 2024

@jonathandbyrd, no there has not yet been a v1.10.1 release yet, but that should be scheduled soon.

Copy link
Contributor

github-actions bot commented Jan 2, 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 Jan 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1.10-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Terraform v1.10.0 breaks apply --auto-approve when using list/dict variables
4 participants