Open SteveL-MSFT opened 2 months ago
A command for validating a configuration document (and reference manifest, honestly) would be deeply useful for users and authoring tools alike, I think.
Maybe something like:
# By path
dsc validate document --path ./myconfig.dsc.config.yaml
# From stdin, with detailed info as JSON objects
$myConfig | dsc validate document --detailed
# As above, but for manifests:
$myResource | dsc validate manifest
The JSON objects from the output could contain information that the eventual extension could use, but at the very least they would tell the author the context and message that failed validation.
Another useful eventual option would be to enable suggestions, like using newer versions of resources, or noticing you're supplying a credential without using secureString
, etc.
Summary of the new feature / enhancement
Instead of hitting a run-time error, it would be useful to have some static analysis be performed. I do wonder if it should be part of
whatIf
or separate sincewhatIf
will already handle some of it:[reference()]
w/o explicitdependsOn
[resourceId()]
that doesn't exist (think typo)Proposed technical implementation details (optional)
No response