Skip to content

Instantly share code, notes, and snippets.

@orangain
orangain / cdk-auto-mapper.ts
Created October 21, 2023 12:03
cdk-auto-mapper.ts: Deno script to fill CDK's import mapping file using result of `aws cloudformation list-stack-resources`
if (Deno.args.length !== 2) {
console.error(
"Usage: deno run --allow-read cdk-auto-mapper.ts <resource-file-path> <mapping-file-path>"
);
Deno.exit(1);
}
const [resourcePath, mappingPath] = Deno.args;
const resourceFileContent = await Deno.readTextFile(resourcePath);