Heya. ππ This seems like an interesting project.
I was taking it for a spin, but unfortunately failed to put it to any use:
$ AWS_REGION=β¦ AWS_PROFILE=β¦ npx cdk-app-cli LambdaFn visit-console
Refreshing stack metadata...
[cdk-app] Error: Could not find resource with aws:cdk:path metadata "β¦/LambdaFn/Resource" in the CloudFormation template.
I read through the source code and came across this:
|
// TODO: improve logic for figuring out the correct template by checking |
|
// the manifest.json file |
|
const files: string[] = fs |
|
.readdirSync(appDir) |
|
.filter((f) => f.endsWith(".template.json")); |
|
if (files.length === 0) { |
|
fail( |
|
new Error( |
|
`Could not find any template.json files in the cloud assembly directory ("${appDir}").` |
|
) |
|
); |
|
} |
|
const templateFileName = files[0]; |
|
const cfnTemplate: any = fs.readJsonSync(path.join(appDir, templateFileName)); |
It just picks the first *.template.json file found.
Checking my cdk.out directory, I found there are 15 *.template.json files and I suspect this is what makes the above command fail for me (and probably for most CDK apps generating multiple templates).
The TODO comment in the code somewhat suggests this is a known issue.
Are there any plans to address this?
Thanks a bunch. π
I wish you a great day. βοΈ
Paul
Heya. ππ This seems like an interesting project.
I was taking it for a spin, but unfortunately failed to put it to any use:
I read through the source code and came across this:
cdk-app-cli/src/app.ts
Lines 82 to 95 in 515c074
It just picks the first
*.template.jsonfile found.Checking my
cdk.outdirectory, I found there are 15*.template.jsonfiles and I suspect this is what makes the above command fail for me (and probably for most CDK apps generating multiple templates).The
TODOcomment in the code somewhat suggests this is a known issue.Are there any plans to address this?
Thanks a bunch. π
I wish you a great day. βοΈ
Paul