defenseunicorns / lula

The Compliance Validator
Apache License 2.0
149 stars 22 forks source link

Flag for setting configuration variables #647

Open brandtkeller opened 2 months ago

brandtkeller commented 2 months ago

Is your feature request related to a problem? Please describe.

Ability to set a configuration variable from the command line through the use of a flag.

Describe the solution you'd like

Describe alternatives you've considered

Only allow setting the configuration through the configuration file

Additional context

We will need the ability to set a configuration item as sensitive in some way.

This could be multiple flags --variable --secret

Expected Deliverable

meganwolf0 commented 1 month ago

Just saw this - I think in #672 I have made kind of an opinionated stance on this, at least with respect to the lula tools template command. Where in this command those template value are --set .path.to.key=val, and the .path.to.key would really be whatever the template value is expecting (so right now supports .const.whatever and .var.whatever). Obviously this could also be a different mechanism for other commands where templates are introduced (e.g., compose or validate). But perhaps this issue is closed if we implement on #641 and other commands' specific implementations could/should be tied to implementing templating in those?

brandtkeller commented 1 month ago

Agreed - the scope of #641 should provide for the structure of sensitive configurations and those configurations generically.

The remaining issues (and any that need be created) in the milestone should be to implement a pattern across all commands for implementing templating and any supported flag implementations that establish parity for the ability to set configuration in env avrs, config file, command line.