Open shantanugadgil opened 3 years ago
You can currently create strict behavior in 0.3.0-beta by testing the variable and using the Sprig fail
function. However, there is some art on making this an all-or-nothing option at the command line too (#308).
Bingo. I can use fail
for a few variables, but becomes unwieldy soon.
I didn't know the PR #308 existed, but I second that entirely!!!
In fact I would favor strict
as the default (with an option of no-strict
or relaxed
, but curious why would anyone explicitly want relaxed mode?)
EDIT: My only real requirement was a non-zero return to be able to bail from some automation scripts. Any specific error messages would be obviously helpful. 😁
add option for strict mode during render If/when a variable is not defined during rendering, cause the
render
to fail with non-zero rather than continue.Relevant Nomad job specification file
Output of
levant version
:notice purposeful typo of input variable
curdate
Output of
consul version
:Output of
nomad version
: