The tool helps to work with Cloud Custodian generated reports.
To install the latest c7n-helper release run:
$ go install github.com/isovalent/cloud-custodian-helper@latestTo lint c7n-helper sources please run the following locally:
$ make lintTo build c7n-helper from source please run the following locally:
$ make build- Help:
$ c7n-helper --help- Parse C7N output directory into JSON file:
$ c7n-helper parse -d <c7n-report-dir> -p <c7n-policy-name> -t <resource-type> -r <resource-file>- Send Slack notification:
Uses owner resource tag that can be:
- Slack display name (
or.characters can be replaced with-, relevant for GCP label) - Slack real name (
or.characters can be replaced with-, relevant for GCP label) - Slack last name
- Slack user ID (can be in lower case, relevant for GCP label)
- Slack channel ID (can be in lower case, relevant for GCP label)
If owner resource tag is empty or invalid slack notification will be sent to the default Slack channel.
$ c7n-helper slack -r <resource-file> \
-a <slack-auth-token> \
-c <default-slack-channel-id> \
-t "<message-title>"- Clean resources:
$ c7n-helper clean -r <resource-file>Apache-2.0