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

make destinationPolicy optional #71

Closed waifa closed 2 years ago

waifa commented 2 years ago

Updated handlers to not require destinationPolicy, aws-logs-destination.json to not list as required and added unit tests

These changes were made to resolve a github issue created by an external customer. Customer requested destinationPolicy to not be required when creating logs destination as it is not required when creating destination via API. Change updates the CreateHandler to not attempt action on destinationPolicy when it is not provided. Unit tests, integration tests, and canary tests were also created to test the new edge case.

Issue #, if available: AWS::Logs::Destination - DestinationPolicy should not be required #101

Description of changes: As described in commit message

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