The Chef cookbook will use sensuctl to load Sensu resources into a sensu-backend from local JSON files (created by LWRPs - TBD), e.g. sensuctl create -f check.json.
Rather than starting with a recipe let's start with a custom resource or LWRP and then consume that in the recipe. We have a clean start lets do this right.
Create a sensuctl LWRP to install the Sensu 2.x sensu-cli package and set it up to authenticate to one or more sensu-backend APIs.
The sensuctl documentation will be of some help in figuring out how to accomplish this: https://docs.sensu.io/sensu-core/2.0/getting-started/configuring-sensuctl/
The Chef cookbook will use sensuctl to load Sensu resources into a sensu-backend from local JSON files (created by LWRPs - TBD), e.g.
sensuctl create -f check.json
.