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

Mailer step is always skipped #79

Closed dre2004 closed 1 year ago

dre2004 commented 1 year ago

Hello,

I'm trying to work out why I the mailer doesn't deploy, each time I run the following:

manheim-c7n-runner -r $AWS_REGION --no-assume-role --step=policygen --step=custodian --step mailer run <account name>

The mailer step is always skipped

[2022-10-25 13:32:05,062 INFO] Step 3 of 3 - mailer
[2022-10-25 13:32:05,091 INFO] SKIPPING Step mailer in REGION 1 of 1 (us-west-2)

I have only managed to deploy the mailer if I run the cloudcustodian/mailer:latest container, that works but I have to add the mailer-templates myself.

Any ideas?

jantman commented 1 year ago

The mailer is only deployed to regions specified in the mailer_regions option in manheim-c7n-tools.yml (see example). That's almost certainly what's going on here. If that's not the problem, then could you please provide the full logs of manheim-c7n-runner with the -vv option (debug-level logging), as well as your manheim-c7n-tools.yml configuration file, with any sensitive information removed or masked?

dre2004 commented 1 year ago

It looks like I made a typo in the region, I am deploying to us-west-2 but I had us-west-1 in the regions array. Once I changed that and used the -vv flag I was about to see what else I was doing wrong.

I was using the policy interpolation tags in my manheim-c7n-tools.yml but it seems they need to be hard coded there. With that I was able to deploy successfully.

Thanks!