Skip to content

Conversation

kmoe
Copy link
Member

@kmoe kmoe commented Aug 23, 2024

This should make it easier to test.

The first commit contains trivial changes along with refactoring the handling of terraform.applying and terraform.workspace along the lines described in the deleted comment.

The second commit was a little more involved than I'd hoped, simplifying the handling of apply time input vars. More work to do here as described in the commit message, but I hope this will make it easier to work on the feature.

Stabilise the ephemeral values experiment and ephemeralasnull
experimental function.
As the final step in stabilising the ephemeral values experiment, we can
remove the separate code path for handling input variables supplied via
-var and -var-file during apply.

The intent here is conveyed in the tests: when applying a saved plan,
all ephemeral variables set in the plan (the "apply-time
variables"), must be set, and no others.

As per the TODO copied from the prototype, there is some more work to be
done here in making the handling of undeclared variables during apply as
sophisticated as that during plan, emitting helpful warnings (for
example) when input variables are supplied unnecessarily via environment
variables.
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I just added one tiny change to formally conclude the experiment, which replaces the warning with an error, i.e. ensures there will be no configuration with experiments = [ephemeral_values] anywhere anymore.

@radeksimko radeksimko force-pushed the kmoe/stabilise-ephemeral-experiment branch from 114851c to 43b04e4 Compare August 26, 2024 10:36
@radeksimko radeksimko merged commit fab3673 into main Aug 26, 2024
5 checks passed
@radeksimko radeksimko deleted the kmoe/stabilise-ephemeral-experiment branch August 26, 2024 10:43
Copy link
Contributor

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

Copy link
Contributor

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 Sep 26, 2024
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.

2 participants