Skip to content

Commit b69d41f

Browse files
rix0rrrgithub-actions
and
github-actions
authored
chore: use AWS_MANAGED_KEY for integ tests (#499)
Use an AWS-managed KMS key for bucket encryption in the bootstrapping of integ tests. This should shave ~1 minute off of the bootstrapping of every environment. --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license --------- Signed-off-by: github-actions <github-actions@github.com> Co-authored-by: github-actions <github-actions@github.com>
1 parent 0137d34 commit b69d41f

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

packages/@aws-cdk-testing/cli-integ/lib/with-cdk-app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ export async function ensureBootstrapped(fixture: TestFixture) {
737737
}
738738

739739
async function doBootstrap(envSpecifier: string, fixture: TestFixture, allowErrExit: boolean) {
740-
return fixture.cdk(['bootstrap', envSpecifier], {
740+
return fixture.cdk(['bootstrap', '--bootstrap-kms-key-id', 'AWS_MANAGED_KEY', envSpecifier], {
741741
modEnv: {
742742
// Even for v1, use new bootstrap
743743
CDK_NEW_BOOTSTRAP: '1',

packages/aws-cdk/lib/cli/cli-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export async function makeConfig(): Promise<CliConfig> {
7777
description: 'Deploys the CDK toolkit stack into an AWS environment',
7878
options: {
7979
'bootstrap-bucket-name': { type: 'string', alias: ['b', 'toolkit-bucket-name'], desc: 'The name of the CDK toolkit bucket; bucket will be created and must not exist', default: undefined },
80-
'bootstrap-kms-key-id': { type: 'string', desc: 'AWS KMS master key ID used for the SSE-KMS encryption', default: undefined, conflicts: 'bootstrap-customer-key' },
80+
'bootstrap-kms-key-id': { type: 'string', desc: 'AWS KMS master key ID used for the SSE-KMS encryption (specify AWS_MANAGED_KEY to use an AWS-managed key)', default: undefined, conflicts: 'bootstrap-customer-key' },
8181
'example-permissions-boundary': { type: 'boolean', alias: 'epb', desc: 'Use the example permissions boundary.', default: undefined, conflicts: 'custom-permissions-boundary' },
8282
'custom-permissions-boundary': { type: 'string', alias: 'cpb', desc: 'Use the permissions boundary specified by name.', default: undefined, conflicts: 'example-permissions-boundary' },
8383
'bootstrap-customer-key': { type: 'boolean', desc: 'Create a Customer Master Key (CMK) for the bootstrap bucket (you will be charged but can customize permissions, modern bootstrapping only)', default: undefined, conflicts: 'bootstrap-kms-key-id' },

packages/aws-cdk/lib/cli/parse-command-line-arguments.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export function parseCommandLineArguments(args: Array<string>): any {
201201
.option('bootstrap-kms-key-id', {
202202
default: undefined,
203203
type: 'string',
204-
desc: 'AWS KMS master key ID used for the SSE-KMS encryption',
204+
desc: 'AWS KMS master key ID used for the SSE-KMS encryption (specify AWS_MANAGED_KEY to use an AWS-managed key)',
205205
conflicts: 'bootstrap-customer-key',
206206
})
207207
.option('example-permissions-boundary', {

packages/aws-cdk/lib/cli/user-input.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ export interface BootstrapOptions {
394394
readonly bootstrapBucketName?: string;
395395

396396
/**
397-
* AWS KMS master key ID used for the SSE-KMS encryption
397+
* AWS KMS master key ID used for the SSE-KMS encryption (specify AWS_MANAGED_KEY to use an AWS-managed key)
398398
*
399399
* @default - undefined
400400
*/

0 commit comments

Comments
 (0)