minder
minder copied to clipboard
Outputting yaml from the CLI cannot be re-applied
Describe the issue
It is expected that using minder profile get -o yaml ... would produce a YAML file that one could quickly modify and then re-apply with minder profile apply -f ..., but this seems not to be the case.
Thanks to @danbarr for reporting this.
Note: The same goes for ruletypes, not just profiles.
To Reproduce
The YAML produced by get -o yaml has the profile definition nested under a top level profile node, like such:
profile:
alert: "off"
context:
project: b3d294d7-4b82-4550-9171-2e3398e4a064
displayName: Sample Profile
id: 2285a65d-d3ef-432f-a66f-5d99f1e4b5d1
name: acme-github-profile
remediate: "off"
...
But the expected format is:
version: v1
type: profile
alert: "off"
context:
project: b3d294d7-4b82-4550-9171-2e3398e4a064
displayName: Sample Profile
id: 2285a65d-d3ef-432f-a66f-5d99f1e4b5d1
name: acme-github-profile
remediate: "off"
...
Once edited out the profile: node and added version/type, it was then possible to apply it with the rest of the contents that get had generated.
What version are you using?
No response