aws-cloudformation / aws-cloudformation-resource-providers-logs

The CloudFormation Resource Provider Package For Amazon CloudWatch Logs
https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html
Apache License 2.0
33 stars 35 forks source link

Add support for cloudwatch logs resource policies #56

Closed stiak closed 3 years ago

stiak commented 3 years ago

Issue #, if available: https://github.com/aws-cloudformation/aws-cloudformation-coverage-roadmap/issues/249

Description of changes: This adds a AWS::Logs::ResourcePolicy type.

A few questions that I need help to answer:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

adamcrosby commented 3 years ago

I'd prefer keeping attribute names identical - its a source of consistent frustration when they change between representations, given how much documentation is auto-generated/etc. So, PolicyName would be preferred.

And thank you for taking this on, we literally just ran into this today and had to rethink a ton of stuff now that we can't do 'native' cfn for our project.

sfbaker7 commented 3 years ago

+1 on adamcrosby's comment - thanks for taking this up. I left some comments.

Also, when you have a change, can you paste your integration test + contract test results? LMK if you have any questions about running these, you can also check out the walk through here: https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-walkthrough.html#resource-type-walkthrough-test

stiak commented 3 years ago

contract-test-output.txt I had a few runs but there always seemed to be some that timed out. It's also really painfully slow...

stiak commented 3 years ago

Ah, found the --warm-containers EAGER option. Much better. Requests take 250ms instead of 13.5 seconds.

contract-test-output.txt

stiak commented 3 years ago

Updated output from contract tests (15 passed, 1 skipped).

contract-test-output.txt

I think I've addressed all the feedback now, let me know if there's anything else I should follow up on.

sfbaker7 commented 3 years ago

looks good, thanks for contributing @stiak