-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cli-lib): support bootstrap command (#26205)
The first iteration of [@aws-cdk/cli-lib-alpha](https://docs.aws.amazon.com/cdk/api/v2/docs/cli-lib-alpha-readme.html) doesn't support the bootstrap command that is mandatory to deploy a new app via CDK. This PR introduces the bootstrap command for the CLI. Related: #15851 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
1 parent
db923dd
commit 9364e94
Showing
5 changed files
with
178 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
123 changes: 123 additions & 0 deletions
123
packages/@aws-cdk/cli-lib-alpha/lib/commands/bootstrap.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
import { SharedOptions } from './common'; | ||
|
||
/** | ||
* Options to use with cdk bootstrap | ||
*/ | ||
export interface BootstrapOptions extends SharedOptions { | ||
|
||
/** | ||
* The name of the CDK toolkit stack to create | ||
*/ | ||
readonly toolkitStackName?: string; | ||
|
||
/** | ||
* The name of the CDK toolkit bucket; bucket will be created and | ||
* must not exist | ||
* @default - auto-generated CloudFormation name | ||
*/ | ||
readonly bootstrapBucketName?: string; | ||
|
||
/** | ||
* Always bootstrap even if it would downgrade template version | ||
* @default false | ||
*/ | ||
readonly force?: boolean; | ||
|
||
/** | ||
* The Managed Policy ARNs that should be attached to the | ||
* role performing deployments into this environment (may be repeated, modern bootstrapping only) | ||
* @default - none | ||
*/ | ||
readonly cfnExecutionPolicy?: string; | ||
|
||
/** | ||
* Instead of actual bootstrapping, print the current | ||
* CLI\'s bootstrapping template to stdout for customization | ||
* @default false | ||
*/ | ||
readonly showTemplate?: boolean; | ||
|
||
/** | ||
* Use the template from the given file instead of the | ||
* built-in one (use --show-template to obtain an example) | ||
*/ | ||
readonly template?: string; | ||
|
||
/** | ||
* Toggle CloudFormation termination protection on the | ||
* bootstrap stacks | ||
* @default false | ||
*/ | ||
readonly terminationProtection?: boolean; | ||
|
||
/** | ||
* Use the example permissions boundary. | ||
* @default undefined | ||
*/ | ||
readonly examplePermissionsBoundary?: boolean; | ||
|
||
/** | ||
* Use the permissions boundary specified by name. | ||
* @default undefined | ||
*/ | ||
readonly customPermissionsBoundary?: string; | ||
|
||
/** | ||
* Use previous values for existing parameters (you must specify | ||
* all parameters on every deployment if this is disabled) | ||
* @default true | ||
*/ | ||
readonly usePreviousParameters?: boolean; | ||
|
||
/** | ||
* Whether to execute ChangeSet (--no-execute will NOT execute | ||
* the ChangeSet) | ||
* @default true | ||
*/ | ||
readonly execute?: boolean; | ||
|
||
/** | ||
* String which must be unique for each bootstrap stack. You | ||
* must configure it on your CDK app if you change this | ||
* from the default. | ||
* @default undefined | ||
*/ | ||
readonly qualifier?: string; | ||
|
||
/** | ||
* The AWS account IDs that should be trusted to perform | ||
* deployments into this environment (may be repeated, | ||
* modern bootstrapping only) | ||
* @default undefined | ||
*/ | ||
readonly trust?: string; | ||
|
||
/** | ||
* The AWS account IDs that should be trusted to look | ||
* up values in this environment (may be repeated, | ||
* modern bootstrapping only) | ||
* @default undefined | ||
*/ | ||
readonly trustForLookup?: string; | ||
|
||
/** | ||
* AWS KMS master key ID used for the SSE-KMS encryption | ||
* @default undefined | ||
*/ | ||
readonly bootstrapKmsKeyId?: string; | ||
|
||
/** | ||
* Create a Customer Master Key (CMK) for the bootstrap | ||
* bucket (you will be charged but can customize | ||
* permissions, modern bootstrapping only) | ||
* @default undefined | ||
*/ | ||
readonly bootstrapCustomerKey?: string; | ||
|
||
/** | ||
* Block public access configuration on CDK toolkit | ||
* bucket (enabled by default) | ||
* @default undefined | ||
*/ | ||
readonly publicAccessBlockConfiguration?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters