microsoft / PSRule

Validate infrastructure as code (IaC) and objects using PowerShell rules.
https://microsoft.github.io/PSRule/v2/
MIT License
376 stars 49 forks source link

Import objects from serialized format #75

Closed BernieWhite closed 5 years ago

BernieWhite commented 5 years ago

Several modern CLI tools provide the option to export objects/ results in a serialized format for down stream processing.

PSRule should be able to processing these objects on the fly for common format such as YAML and JSON.

For example:

# Validate service objects
Invoke-PSRule -InputObject (kubectl get services -o yaml | Out-String) -Format Yaml;

Added support for:

BernieWhite commented 5 years ago

Specifically for kubectl -o yaml objects are returned nested under the items property. A way to get nested objects within a object path is required to do this natively.

This will be raised as a separate issue.