pulumi / pulumi-policy-aws

A policy pack of rules to enforce AWS best practices for security, reliability, cost, and more!
https://www.pulumi.com
Apache License 2.0
33 stars 6 forks source link

Update to latest @pulumi/policy #103

Closed justinvp closed 5 months ago

justinvp commented 7 months ago

The @pulumi/policy library was updated to support remediations, but this repo hasn't been updated since then. This commit fixes some compile errors due to the changes there.

$ tsc
enforcementLevel.ts:33:40 - error TS2345: Argument of type '"remediate"' is not assignable to parameter of type 'never'.

33                 return exhaustiveFalse(enforcementLevel);
                                          ~~~~~~~~~~~~~~~~

tests/util.ts:106:31 - error TS2722: Cannot invoke an object which is possibly 'undefined'.

106         await Promise.resolve(validation(args, report));
                                  ~~~~~~~~~~

Found 2 errors.

Note: This points out that we're missing a daily cron in this repro to catch these things sooner. Opened #102

Fixes #101