Skip to content

Commit 6334a52

Browse files
authored
Merge branch 'master' into add-cron-method-to-canary-schedule
2 parents 3ccce4f + 135f7d3 commit 6334a52

File tree

9 files changed

+70
-8
lines changed

9 files changed

+70
-8
lines changed

Diff for: .github/workflows/auto-approve.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ on:
77

88
jobs:
99
auto-approve:
10-
if: >
11-
github.event.pull_request.user.login == 'dependabot[bot]'
12-
|| github.event.pull_request.user.login == 'dependabot-preview[bot]'
13-
|| (contains(github.event.pull_request.labels.*.name, 'pr/auto-approve')
14-
&& github.event.pull_request.user.login == 'aws-cdk-automation')
10+
if: contains(github.event.pull_request.labels.*.name, 'pr/auto-approve')
1511
runs-on: ubuntu-latest
1612
permissions:
1713
pull-requests: write

Diff for: .github/workflows/pr-labeler.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Apply various labels on PRs
2+
3+
name: pr-labeler
4+
on:
5+
pull_request:
6+
types: [ opened ]
7+
8+
jobs:
9+
auto-approve:
10+
if: github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'dependabot-preview[bot]'
11+
runs-on: ubuntu-latest
12+
permissions:
13+
pull-requests: write
14+
steps:
15+
- run: gh pr edit ${{ github.event.pull_request.number }} --add-label "pr/auto-approve" -R ${{ github.repository }}
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Diff for: packages/@aws-cdk/aws-docdb/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ your instances will be launched privately or publicly:
2121
const cluster = new DatabaseCluster(this, 'Database', {
2222
masterUser: {
2323
username: 'myuser' // NOTE: 'admin' is reserved by DocumentDB
24+
excludeCharacters: '\"@/:', // optional, defaults to the set "\"@/"
2425
},
2526
instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.LARGE),
2627
vpcSubnets: {

Diff for: packages/@aws-cdk/aws-docdb/lib/cluster.ts

+1
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ export class DatabaseCluster extends DatabaseClusterBase {
352352
secret = new DatabaseSecret(this, 'Secret', {
353353
username: props.masterUser.username,
354354
encryptionKey: props.masterUser.kmsKey,
355+
excludeCharacters: props.masterUser.excludeCharacters,
355356
});
356357
}
357358

Diff for: packages/@aws-cdk/aws-docdb/lib/database-secret.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ export interface DatabaseSecretProps {
3232
* @default - no master secret information will be included
3333
*/
3434
readonly masterSecret?: ISecret;
35+
36+
/**
37+
* Characters to not include in the generated password.
38+
*
39+
* @default "\"@/"
40+
*/
41+
readonly excludeCharacters?: string;
3542
}
3643

3744
/**
@@ -61,7 +68,7 @@ export class DatabaseSecret extends Secret {
6168
masterarn: props.masterSecret?.secretArn,
6269
}),
6370
generateStringKey: 'password',
64-
excludeCharacters: '"@/',
71+
excludeCharacters: props.excludeCharacters ?? '"@/',
6572
},
6673
});
6774
}

Diff for: packages/@aws-cdk/aws-docdb/lib/props.ts

+7
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ export interface Login {
5353
* @default default master key
5454
*/
5555
readonly kmsKey?: kms.IKey;
56+
57+
/**
58+
* Specifies characters to not include in generated passwords.
59+
*
60+
* @default "\"@/"
61+
*/
62+
readonly excludeCharacters?: string;
5663
}
5764

5865
/**

Diff for: packages/@aws-cdk/aws-docdb/test/cluster.test.ts

+24-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { expect as expectCDK, haveResource, ResourcePart, arrayWith } from '@aws-cdk/assert-internal';
1+
import { expect as expectCDK, haveResource, ResourcePart, arrayWith, haveResourceLike, objectLike } from '@aws-cdk/assert-internal';
22
import * as ec2 from '@aws-cdk/aws-ec2';
33
import * as kms from '@aws-cdk/aws-kms';
44
import * as cdk from '@aws-cdk/core';
@@ -293,6 +293,29 @@ describe('DatabaseCluster', () => {
293293
}));
294294
});
295295

296+
test('creates a secret with excludeCharacters', () => {
297+
// GIVEN
298+
const stack = testStack();
299+
const vpc = new ec2.Vpc(stack, 'VPC');
300+
301+
// WHEN
302+
new DatabaseCluster(stack, 'Database', {
303+
masterUser: {
304+
username: 'admin',
305+
excludeCharacters: '"@/()[]',
306+
},
307+
instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL),
308+
vpc,
309+
});
310+
311+
// THEN
312+
expectCDK(stack).to(haveResourceLike('AWS::SecretsManager::Secret', {
313+
GenerateSecretString: objectLike({
314+
ExcludeCharacters: '\"@/()[]',
315+
}),
316+
}));
317+
});
318+
296319
test('create an encrypted cluster with custom KMS key', () => {
297320
// GIVEN
298321
const stack = testStack();

Diff for: packages/@aws-cdk/aws-ec2/lib/instance-types.ts

+10
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,16 @@ export enum InstanceClass {
208208
*/
209209
C5 = 'c5',
210210

211+
/**
212+
* Compute optimized instances, 6th generation
213+
*/
214+
COMPUTE6_INTEL = 'c6i',
215+
216+
/**
217+
* Compute optimized instances, 6th generation
218+
*/
219+
C6I = 'c6i',
220+
211221
/**
212222
* Compute optimized instances with local NVME drive, 5th generation
213223
*/

Diff for: tools/@aws-cdk/cdk-build-tools/lib/package-info.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export function packageCompiler(compilers: CompilerOverrides, options?: CDKBuild
9999
if (isJsii()) {
100100
const args = ['--silence-warnings=reserved-word'];
101101
if (options?.stripDeprecated) {
102-
args.push('--strip-deprecated');
102+
args.push(`--strip-deprecated ${path.join(__dirname, '..', '..', '..', '..', 'deprecated_apis.txt')}`);
103103
}
104104
return [compilers.jsii || require.resolve('jsii/bin/jsii'), ...args];
105105
} else {

0 commit comments

Comments
 (0)