cloudformation-include fails when a template with Fn::Foreach resource is passed as it tries to convert it to a CfnResource, but it's not exactly a resource so it doesn't have a type property:
jsii.errors.JavaScriptError:
Error: The `type` property is required
at new CfnResource (C:\Users\483413\AppData\Local\Temp\2\jsii-kernel-d3l9Pa\node_modules\aws-cdk-lib\core\lib\cfn-resource.js:1:1194)
at CfnInclude.getOrCreateResource (C:\Users\483413\AppData\Local\Temp\2\jsii-kernel-d3l9Pa\node_modules\aws-cdk-lib\cloudformation-include\lib\cfn-include.js:1:13061)
at new CfnInclude (C:\Users\483413\AppData\Local\Temp\2\jsii-kernel-d3l9Pa\node_modules\aws-cdk-lib\cloudformation-include\lib\cfn-include.js:1:2011)
at Kernel._Kernel_create (C:\Users\483413\AppData\Local\Temp\2\tmpdsxxbqtf\lib\program.js:10071:25)
at Kernel.create (C:\Users\483413\AppData\Local\Temp\2\tmpdsxxbqtf\lib\program.js:9742:93)
at KernelHost.processRequest (C:\Users\483413\AppData\Local\Temp\2\tmpdsxxbqtf\lib\program.js:11658:36)
at KernelHost.run (C:\Users\483413\AppData\Local\Temp\2\tmpdsxxbqtf\lib\program.js:11618:22)
at Immediate._onImmediate (C:\Users\483413\AppData\Local\Temp\2\tmpdsxxbqtf\lib\program.js:11619:46)
at processImmediate (node:internal/timers:466:21)
Use Case
Trying to use Fn::ForEach in cloudformation to create multiple resources based on custom resource output and bring that to my CDK stack but cloudformation-include.CfnInclude doesn't support Fn::ForEach.
Proposed Solution
No response
Other Information
No response
Acknowledgements
[ ] I may be able to implement this feature request
Describe the feature
cloudformation-include fails when a template with Fn::Foreach resource is passed as it tries to convert it to a CfnResource, but it's not exactly a resource so it doesn't have a type property:
Use Case
Trying to use Fn::ForEach in cloudformation to create multiple resources based on custom resource output and bring that to my CDK stack but cloudformation-include.CfnInclude doesn't support Fn::ForEach.
Proposed Solution
No response
Other Information
No response
Acknowledgements
CDK version used
v2.98.0
Environment details (OS name and version, etc.)
any