-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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: Cloudformation conditions are tagged enums. #29181
Comments
For the parameters, we populate those in the app file using props, not parameters, but I certainly can see a use case here for providing a separate parameter file and/or parameter list. I am going to add that to our list of features to add. As for the error you're getting, I'm a little stumped. I'll investigate this further. |
We are having the same error message when using Pseudo parameters reference Here the template example:
Our use case is to use the same template on separate AWS Environment (dev, stage, and prod) Update
Update 2
this throws the same error, Is there a possible workaround for this? |
Oh, great, I think I understand the issue now. Thank you for the extra context. I will try to get this fix in before our next release. I'll update here if I'm not able to. |
Using the samples below, I'm unable to reproduce the error so I'm wondering if this issue was partially fixed by some of the other work already done. If you upgrade to v2.132, do you still see the same error for pseudo parameter references?
|
Here is a full template example that fails root.yml
after change
The error for the same command changed to
But, after change
I using the last cdk version
|
I have the same issue.
I get the error:
I am using version 2.133.0 of CDK |
I've got the same issue with the following condition:
Where SnapshotIdentifier is just a 'string' parameter. Regards Steffen |
As a workaround: Convert the YAML definition to JSON using the |
As a work around, I used https://github.com/aws-cloudformation/rain
and then used.
And it worked just fine, however this is still a work around, and would love for this to get fixed natively. Thanks! |
Describe the bug
I am trying to convert our cloudformation templates to cdk by using the new experimental
cdk migrate
. I have run into an issue when referencing one of our templates and expect others to be the same. I have attached the templateecs.service.template
in the reproduction steps and provided some additional context on how it is used.Expected Behavior
I expect a cdk project to be created and conditions to be created based on !and, !equals, !not, !or, etc. I also expected a way to pass parameters via the context, and for references to the stack parameters to use
get.context
.Current Behavior
When running
cdk migrate
I run into this error that I can not seem to find any information about.Reproduction Steps
.txt
cdk migrate --stack-name ecs-service --language typescript --from-path ecs.service.template
Possible Solution
No response
Additional Information/Context
At my company we create one cloudformation template and then reuse the same template and pass a
ecs.service.parameters
json file that we populate during our deployment process in our CD tool (Azure DevOps). So we only use one template file that is reused in many pipelines to create different resources and different conditions are used to enable/disable certain configurations. One of the main benefits of moving to CDK for us is the ability to pass a list of containers for ECS from the pipeline, without having to maintain multiple template files.CDK CLI Version
2.128.0 (build d995261)
Framework Version
No response
Node.js Version
v20.10.0
OS
Windows 10 Enterprise 10.0.19044
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: