Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS::LanguageExtensions does not work when used with other transforms #2346

Open
jdel opened this issue Aug 31, 2022 · 2 comments
Open

AWS::LanguageExtensions does not work when used with other transforms #2346

jdel opened this issue Aug 31, 2022 · 2 comments
Labels
v1 v1.X

Comments

@jdel
Copy link

jdel commented Aug 31, 2022

cfn-lint version: 0.63.0

Description of issue.

Please provide as much information as possible:
Used template: https://github.com/aws-cloudformation/cfn-lint/blob/ff506197e7b4693a41aa630f71deab96ead45e72/test/fixtures/templates/good/resources_lang_extensions_updatereplacepolicy.yaml
Update the transform section of the template to Transform: [AWS::LanguageExtensions, AWS::Serverless-2016-10-31]

Expected result: cfn-lint is successful

Actual result:

❯ cfn-lint sam/test-template.yml
E0001 Error transforming template: Structure of the SAM template is invalid. Every UpdateReplacePolicy member must be a string.
sam/test-template.yml:1:1

Edit:

I did try a template with both transforms in the web console and it works as expected.

However, the order of the transforms is important. If AWS::Serverless-2016-10-31 is specified first, the changeset creation fails.

@kddejong
Copy link
Contributor

kddejong commented Sep 1, 2022

Good catch. Looking into this. We are able to translate a SAM template into a Cfn template using the aws-sam-translator package. There isn't an equivalent package for the LanguageExtensions.

The expansion of LanguageExtensions to more functions may change some of these answers. For the functions that exist today ideally SAM could just pass forward those values to the resulting resources.

We should probably create a rule (for now) that calls out the ordering.

@kddejong
Copy link
Contributor

kddejong commented Sep 2, 2022

Current plan is to disable SAM validation checks. Completed with PR #2350
Based on how SAM is handling transforms today we will be creating a rule to have SAM as the last transform

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v1 v1.X
Projects
None yet
Development

No branches or pull requests

2 participants