govc-conftest is a Conftest plugin for using govc to test objects in VMware vSphere using Open Policy Agent.
conftest plugin install git://github.com/volanja/govc-conftest//govc
If you check datacenter.info, you type datacenter.info
conftest govc datacenter.info
Notice: Windows is not support.
If you want to use govc on Windows like this plugin, you type below.
govc datacenter.info --json | conftest test -
$ conftest govc datacenter.info
govc: specify an ESX or vCenter URL
You should set env. See the examples below for details.
export GOVC_URL=https://<username>:<password>@<ip address>/sdk
export GOVC_INSECURE=1
$ rm -rf ~/.conftest/plugins/govc