generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Description
Describe the feature
Currently, @aws-cdk/toolkit-lib does not expose a programmatic interface to generate the CDK bootstrap template. Users must rely on the CLI command cdk bootstrap --show-template to obtain the CloudFormation template.
Use Case
Get the template and modificate it (e.g. add a log bucket for the asset bucket access logs) and bootstrap an environment in one typescript script
Proposed Solution
Somehow like this
const cdk = new Toolkit();
const bootstrapTemplate = await cdk.bootstrap.showTemplate();Other Information
fallback to the cli
const resultCdkStandardTemplate = execSync('pnpm exec cdk bootstrap --show-template', {
encoding: 'utf8',
});Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
CDK version used
@aws-cdk/[email protected]
Environment details (OS name and version, etc.)
linux