cfn-language-discussion icon indicating copy to clipboard operation
cfn-language-discussion copied to clipboard

AWS::LanguageExtensions not supporting RetainExceptOnCreate

Open ZalmnS opened this issue 2 years ago • 2 comments

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Tell us about the bug

Recently, CloudFormation released support for RetainExceptOnCreate as a new value for the DeletionPolicy Attribute. https://aws.amazon.com/about-aws/whats-new/2023/07/aws-cloudformation-deletion-policies-dev-test-cycle/

When attempting to use the AWS::LanguageExtensions within the Template below including the "RetainExceptOnCreate" Value for the DeletionPolicy Attribute, you encounter the following error: Template:

Transform: 'AWS::LanguageExtensions'
Resources:
  S3:
    DeletionPolicy: RetainExceptOnCreate
    Type: AWS::S3::Bucket

Error:

Transform AWS::LanguageExtensions failed with: Unrecognized DeletionPolicy RetainExceptOnCreate for resource S3. Rollback requested by user.

Expected behavior

The expected behavior is that the AWS::LanguageExtensions Transform would be able to interpret RetainExceptOnCreate as a valid string to be used within the DeletionPolicy Attribute.

I suspect that there is a list of strings anticipated for the DeletionPolicy Attribute, and "RetainExceptOnCreate" needs to be added into the list of strings

Observed behavior

Currently the Language Extension throws the error below:

Transform AWS::LanguageExtensions failed with: Unrecognized DeletionPolicy RetainExceptOnCreate for resource S3. Rollback requested by user.

Test cases

Please include a minimal CloudFormation template here that reproduces the issue

Transform: 'AWS::LanguageExtensions'
Resources:
  S3:
    DeletionPolicy: RetainExceptOnCreate
    Type: AWS::S3::Bucket

You'll be met with the error right away within the Stack Events.

Additional context

Anything else we should know? N/A

ZalmnS avatar Aug 16 '23 16:08 ZalmnS

Have you tested this recently? For me it did work today.

kallu avatar Dec 21 '23 12:12 kallu

@kallu It does indeed work now. I guess the feature was added but this Issue was ignored.

derekps avatar Dec 21 '23 16:12 derekps