zarf
zarf copied to clipboard
Force variables to be declared in zarf.yaml
Is your feature request related to a problem? Please describe.
Currently you can add variables during deploy that are not declared in the zarf.yaml file. I believe it would be good for us to block deploy time variables from being set if they are not declared in the package. This would make it harder for users to miss input a variable on deploy. This would make packages cleaner to read IMO as well.
This would be a breaking change! Potentially we could mitigate it for a bit by displaying warnings, and allowing variables not declared in the package to work if the package was built before we make the change.
Describe the solution you'd like
- Given I do not have the variable "EXAMPLE_VAR" defined in my zarf.yaml which created package.tar.zst
- When I run `zarf package deploy package.tar.zst --confirm --set EXAMPLE_VAR=blue"
- Then I get an error asking me to define my variable in my zarf.yaml