aws-cloudformation / aws-cloudformation-resource-providers-rds

The CloudFormation Resource Provider Package For Amazon Relational Database Service
https://aws.amazon.com/rds/
Apache License 2.0
26 stars 42 forks source link

[Common][All] remove silent failure mechanism and throw unauthorized tagging exception #482

Closed moataz-mhmd closed 9 months ago

moataz-mhmd commented 10 months ago

Description of changes: To ensure compatibility with older versions, we previously ignored the AccessDenied exception when a customer did not have permission to add stack level tags. This PR addresses this issue by aligning with the latest CloudFormation guidelines and instead throwing an UnauthorizedTaggingOperation error code.

However, we have retained the already exist tagging logic to differentiate between access denied for resource tags and access denied for stack level tags. Once CloudFormation confirms that it is safe to convert UnauthorizedTaggingOperation to the regular AccessDenied error code, we can safely remove all the logic related to tag error management and the safeCreate mechanism.

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