manheim / manheim-c7n-tools

Manheim's Cloud Custodian (c7n) wrapper package, policy generator, runner, and supporting tools.
https://manheim-c7n-tools.readthedocs.io/
Apache License 2.0
45 stars 25 forks source link

Missing required config parameter 'cleanup_notify' in documentation and examples #23

Closed robertstettner closed 4 years ago

robertstettner commented 4 years ago

Hi,

I found out the hard way (going through source code) that, I needed to add cleanup_notify and give it an empty array. Is this really a required parameter?

What is it used for?

Thanks.

jantman commented 4 years ago

Heh. Apparently it really is a required parameter, though whether it really should be is probably up for debate.

It's expected to be an array of email addresses. If specified, when policygen generates the final policy files, it will append generated policies to detect "orphaned" c7n Lambda functions and CloudWatch Events Rules, and notify those email addresses. Mainly to detect any that were either provisioned manually, or that have had their matching policies removed but haven't been cleaned up.

This entire feature, and even more so its implementation (filtering for Lambdas tagged Project=cloud-custodian) is really Manheim-specific. That configuration parameter should almost certainly be documented, and also default to an empty array.

I'll try and get this included in the next release, thanks!

PS - It's entirely possible that you're the only person outside of Manheim who's really using this project, so thank you so much for providing all of this feedback/assistance!

robertstettner commented 4 years ago

Thanks for the reply. That makes sense now.

I do have other little gotchas, when I have started out using your really cool tool. I hope you don't mind me posting them.

jantman commented 4 years ago

This has been released in 0.8.5, which should be published shortly. Thanks so much for reporting it!