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

Allow Update of LogSubscriptionFilter properties without replacement #97

Open georgealton opened 2 years ago

georgealton commented 2 years ago

The AWS::Logs::SubscriptionFilter Resources sets all its Properties as requiring replacement, making it impossible to update resources with 2 Subscription Filters.

Log Groups support a maximum of 2 Subscription Filters per Log Group. When you have 2 Filters attached to Log Group, and attempt to modify one of them, CloudFormation attempts to create a temporary 3rd Filter before deleting the existing one. As it's only possible to have 2 LogGroups, the 3rd Filter fails to create.

The PutSubscriptionFilter API supports updates (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutSubscriptionFilter.html).

It would be useful if some of the Properties of a SubscriptionFilter could be updated without requiring the entire resource to be replaced. This would allow updates to filters when there are 2 filters attached to a LogGroup.