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
Change variable validation error message type from string to expression #25028
Change variable validation error message type from string to expression #25028
Conversation
ee431bf
to
8c14f44
Compare
…cg/validation-error-expressions
Codecov Report
|
062b484
to
777d505
Compare
…cg/validation-error-expressions
Hi @cgetzen, We're not intending to make any enhancements to the custom variable validation functionality before it's stabilized in the 0.13.0 release, because we want to release exactly what folks have already tested in that release (bugs notwithstanding), so we'll hold on looking at this deeply until at least after the 0.13.0 release has settled down (including any follow-up patch releases we might issue based on bug reports on the initial release), but this does seem to me like a good enhancement. I don't want you to spend time constantly rebasing this so I'd suggest at least to hold until 0.13.0 seems stable (which might also mean after one or two patch releases if there are any critical bugs in 0.13.0) and then we can deal with any rebase conflicts all at once. (If you have your branch set to allow reviewers here to push to it then we'd be happy to deal with merge conflicts that have an "obvious" resolution on your behalf as part of review+merge.) |
👋 Hoping to give this one last bump @apparentlymart @jbardin |
Is there any chance of getting this in? It looks like it would resolve a ton of validation issues that I have to help debug, particularly when the call into the variable validation is from a loop. Right now, the error message looks like
and is really hard to trace back and figure out what string from |
FYI @cgetzen if you want to close this PR too #28044 (comment) |
@alisdair per #28044 (comment) shall we close this PR as well? |
Thanks! See #30613 for the in-progress work which should achieve the root goal here. |
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. |
Resolves #24407.
This PR changes configs.VariableValidation.ErrorMessage from a string to an expression.
One consequence of this is that some of the validations on the error message (nilstring and lookslikesentence) are moved from the configs package to the terraform package and checked during Eval.
Tests
Template
This file is used as a template for the table below
Results