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

CDK Migrate/GroundStation: Cannot migrate AWS-provided CloudFormation Template #29752

Open
trahloff opened this issue Apr 6, 2024 · 5 comments
Assignees
Labels
@aws-cdk/aws-cloudformation Related to AWS CloudFormation bug This issue is a bug. cli Issues related to the CDK CLI p1 toolkit/migrate Related to cdk migrate

Comments

@trahloff
Copy link

trahloff commented Apr 6, 2024

Describe the bug

When trying to convert the CloudFormation YAML from https://github.com/aws-samples/aws-groundstation-s3-data-delivery to CDK (Typescript), it will not complete and throw an error.

Expected Behavior

The command cdk migrate --stack-name GS-S3-Delivery-Receiver --language typescript --from-path ./cfn/jpss1-gs-to-s3.yml results in CDK code.

Current Behavior

The command results in the error "Multi-line single-quoted string needs to be sufficiently indented".

Reproduction Steps

  1. `$ git clone git@github.com:aws-samples/aws-groundstation-s3-data-delivery.git"
  2. $ cd aws-groundstation-s3-data-delivery
  3. $ cdk migrate --stack-name GS-S3-Delivery-Receiver --language typescript --from-path ./cfn/jpss1-gs-to-s3.yml

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.136.0 (build 94fd33b)

Framework Version

No response

Node.js Version

v20.12.1

OS

macOS 14.4 (23E214) Darwin 23.4.0

Language

TypeScript

Language Version

No response

Other information

No response

@trahloff trahloff added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Apr 6, 2024
@github-actions github-actions bot added the @aws-cdk/aws-cloudformation Related to AWS CloudFormation label Apr 6, 2024
@pahud pahud added cli Issues related to the CDK CLI and removed needs-triage This issue or PR still needs to be triaged. labels Apr 8, 2024
@pahud
Copy link
Contributor

pahud commented Apr 8, 2024

Thank you. We will bring this up to the team for inputs.

@pahud pahud added the p1 label Apr 8, 2024
@TheRealAmazonKendra
Copy link
Contributor

This is quite an odd one that I've never seen before.

@TheRealAmazonKendra
Copy link
Contributor

Ahhhh. I believe I see the problem. There is a Base64 function in there and contains a long long string that contains a few things that are tripping us up. There error here is super misleading, but we did just improve our error handling and messaging so I don't think there's any action item left there, per say.

I should have a fix out for this by our next release.

@TheRealAmazonKendra
Copy link
Contributor

FYI this will require like three fixes or so, so the one I linked isn't the only one needed. I'll do a merge from latest of cdk-from-cfn once I get all the fixes in and use that one to auto-close this one. That GroundStation template provided a fount of use-cases where we screwed up edge cases so I'm sorry that you're encountering bugs but I'm also pretty excited that you attempted this particular template. I'm still on track to get this fixed before our next release. I'll update if that changes.

@trahloff
Copy link
Author

Hi @TheRealAmazonKendra, thank you very much! This really made my day seeing this extensive response.

Please let me know if I can support in any way! I will try it and report back as soon as the fixes become available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-cloudformation Related to AWS CloudFormation bug This issue is a bug. cli Issues related to the CDK CLI p1 toolkit/migrate Related to cdk migrate
Projects
None yet
Development

No branches or pull requests

3 participants