Last active
February 10, 2022 14:39
-
-
Save harsh4870/471433e8170af5699942d0e36b4321e0 to your computer and use it in GitHub Desktop.
Cloud custodian GCP policy medium blog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
policies: | |
- name: check-all-bucket-logging | |
description: | | |
Check all bucket logging enabled | |
resource: gcp.bucket | |
filters: | |
- type: value | |
key: logging | |
value: absent | |
actions: | |
- type: webhook | |
url: <URL> | |
body: |- | |
{ | |
"attachments": [ | |
{ | |
"fallback": `CloudCustodian Policy Violation`, | |
"title": policy.description, | |
"color": `danger`, | |
"fields": [ | |
{ | |
"title": `Priority`, | |
"value": `High`, | |
"short": `true` | |
}, | |
{ | |
"title": `Bucket Rule Name`, | |
"value": resource.name, | |
"short": `true` | |
}, | |
{ | |
"title": `Bucket selfLink`, | |
"value": resource.selfLink, | |
"short": `false` | |
} | |
], | |
"footer": `Powered By M` | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment