Describe the bug
I discovered a bug in the bootstrap command I implemented yesterday. It doesn't work out of the box because it cannot find the default YAML template.
The cli-lib tries to load the bootstrap-template.yaml in @aws-cdk/cli-lib-alpha/lib/api/bootstrap/bootstrap-template.yaml instead of aws-cdk/lib/api/bootstrap/bootstrap-template.yaml
Expected Behavior
CDK deploys the default bootstrap stack.
Current Behavior
The CLI returns the following error:
Environment aws://XXXXXXX/us-east-1 failed bootstrapping: [Error: ENOENT: no such file or directory, open 'XXXX/node_modules/@aws-cdk/cli-lib-alpha/lib/api/bootstrap/bootstrap-template.yaml'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: 'XXXX/node_modules/@aws-cdk/cli-lib-alpha/lib/api/bootstrap/bootstrap-template.yaml'
}
Reproduction Steps
Follow the CLI lib documentation to create an instance of the AwsCdkCli and then invoke the cli.bootstrap(); method.
Possible Solution
The following line should be edited:
|
return loadStructuredFile(path.join(rootDir(), 'lib', 'api', 'bootstrap', 'bootstrap-template.yaml')); |
I can open a new PR, but I'm not sure what's the best way of fixing it. Should I change rootDir() with something else?
Additional Information/Context
No response
CDK CLI Version
main branch
Framework Version
No response
Node.js Version
18
OS
node:18-alpine
Language
Typescript
Language Version
No response
Other information
No response
Describe the bug
I discovered a bug in the bootstrap command I implemented yesterday. It doesn't work out of the box because it cannot find the default YAML template.
The cli-lib tries to load the bootstrap-template.yaml in
@aws-cdk/cli-lib-alpha/lib/api/bootstrap/bootstrap-template.yamlinstead ofaws-cdk/lib/api/bootstrap/bootstrap-template.yamlExpected Behavior
CDK deploys the default bootstrap stack.
Current Behavior
The CLI returns the following error:
Reproduction Steps
Follow the CLI lib documentation to create an instance of the AwsCdkCli and then invoke the
cli.bootstrap();method.Possible Solution
The following line should be edited:
aws-cdk/packages/aws-cdk/lib/api/bootstrap/bootstrap-environment.ts
Line 309 in 928b64e
I can open a new PR, but I'm not sure what's the best way of fixing it. Should I change
rootDir()with something else?Additional Information/Context
No response
CDK CLI Version
main branch
Framework Version
No response
Node.js Version
18
OS
node:18-alpine
Language
Typescript
Language Version
No response
Other information
No response