Skip to content

Commit

Permalink
chore(rds): bump the parameter group name versions (#29192)
Browse files Browse the repository at this point in the history
### Issue # (if applicable)

Closes #29184

### Reason for this change

As described in the issue, the example in the README can't be deployed.

### Description of changes

Bump from `default.aurora-postgresql10` to `default.aurora-postgresql11`

### Description of how you validated changes

No.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
pahud authored Feb 21, 2024
1 parent 97e1cef commit a4ebe8e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-backup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const myDatabaseCluster = new rds.DatabaseCluster(this, 'DatabaseCluster', {
});
const myServerlessCluster = new rds.ServerlessCluster(this, 'ServerlessCluster', {
engine: rds.DatabaseClusterEngine.AURORA_POSTGRESQL,
parameterGroup: rds.ParameterGroup.fromParameterGroupName(this, 'ParameterGroup', 'default.aurora-postgresql10'),
parameterGroup: rds.ParameterGroup.fromParameterGroupName(this, 'ParameterGroup', 'default.aurora-postgresql11'),
vpc,
});
const myCoolConstruct = new Construct(this, 'MyCoolConstruct');
Expand Down
4 changes: 2 additions & 2 deletions packages/aws-cdk-lib/aws-backup/test/selection.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ test('fromConstruct', () => {

new rds.ServerlessCluster(this, 'ServerlessCluster', {
engine: rds.DatabaseClusterEngine.AURORA_POSTGRESQL,
parameterGroup: rds.ParameterGroup.fromParameterGroupName(stack, 'ParameterGroup', 'default.aurora-postgresql10'),
parameterGroup: rds.ParameterGroup.fromParameterGroupName(stack, 'ParameterGroup', 'default.aurora-postgresql11'),
vpc,
});
}
Expand Down Expand Up @@ -611,7 +611,7 @@ test('fromRdsServerlessCluster', () => {
const vpc = new ec2.Vpc(stack, 'Vpc');
const newCluster = new rds.ServerlessCluster(stack, 'New', {
engine: rds.DatabaseClusterEngine.AURORA_POSTGRESQL,
parameterGroup: rds.ParameterGroup.fromParameterGroupName(stack, 'ParameterGroup', 'default.aurora-postgresql10'),
parameterGroup: rds.ParameterGroup.fromParameterGroupName(stack, 'ParameterGroup', 'default.aurora-postgresql11'),
vpc,
});
const existingCluster = rds.ServerlessCluster.fromServerlessClusterAttributes(stack, 'Existing', {
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-rds/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,7 @@ declare const vpc: ec2.Vpc;
const cluster = new rds.ServerlessCluster(this, 'AnotherCluster', {
engine: rds.DatabaseClusterEngine.AURORA_POSTGRESQL,
copyTagsToSnapshot: true, // whether to save the cluster tags when creating the snapshot. Default is 'true'
parameterGroup: rds.ParameterGroup.fromParameterGroupName(this, 'ParameterGroup', 'default.aurora-postgresql10'),
parameterGroup: rds.ParameterGroup.fromParameterGroupName(this, 'ParameterGroup', 'default.aurora-postgresql11'),
vpc,
scaling: {
autoPause: Duration.minutes(10), // default is to pause after 5 minutes of idle time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ describe('database secret manager', () => {
engine: DatabaseClusterEngine.AURORA_POSTGRESQL,
vpc,
credentials: Credentials.fromSecret(existingSecret),
parameterGroup: ParameterGroup.fromParameterGroupName(stack, 'ParameterGroup', 'default.aurora-postgresql10'),
parameterGroup: ParameterGroup.fromParameterGroupName(stack, 'ParameterGroup', 'default.aurora-postgresql11'),
});

// THEN
Template.fromStack(stack).hasResource('AWS::RDS::DBCluster', {
Properties: {
Engine: 'aurora-postgresql',
DBClusterParameterGroupName: 'default.aurora-postgresql10',
DBClusterParameterGroupName: 'default.aurora-postgresql11',
DBSubnetGroupName: {
Ref: 'ServerlessDatabaseSubnets5643CD76',
},
Expand Down
14 changes: 7 additions & 7 deletions packages/aws-cdk-lib/aws-rds/test/serverless-cluster.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ describe('serverless cluster', () => {
username: 'admin',
password: cdk.SecretValue.unsafePlainText('tooshort'),
},
parameterGroup: ParameterGroup.fromParameterGroupName(stack, 'ParameterGroup', 'default.aurora-postgresql10'),
parameterGroup: ParameterGroup.fromParameterGroupName(stack, 'ParameterGroup', 'default.aurora-postgresql11'),
});

// THEN
Template.fromStack(stack).hasResource('AWS::RDS::DBCluster', {
Properties: {
Engine: 'aurora-postgresql',
CopyTagsToSnapshot: true,
DBClusterParameterGroupName: 'default.aurora-postgresql10',
DBClusterParameterGroupName: 'default.aurora-postgresql11',
DBSubnetGroupName: {
Ref: 'ServerlessDatabaseSubnets5643CD76',
},
Expand Down Expand Up @@ -113,13 +113,13 @@ describe('serverless cluster', () => {
engine: DatabaseClusterEngine.AURORA_POSTGRESQL,
vpc,
securityGroups: [sg],
parameterGroup: ParameterGroup.fromParameterGroupName(stack, 'ParameterGroup', 'default.aurora-postgresql10'),
parameterGroup: ParameterGroup.fromParameterGroupName(stack, 'ParameterGroup', 'default.aurora-postgresql11'),
});

// THEN
Template.fromStack(stack).hasResourceProperties('AWS::RDS::DBCluster', {
Engine: 'aurora-postgresql',
DBClusterParameterGroupName: 'default.aurora-postgresql10',
DBClusterParameterGroupName: 'default.aurora-postgresql11',
EngineMode: 'serverless',
DBSubnetGroupName: { Ref: 'DatabaseSubnets56F17B9A' },
MasterUsername: {
Expand Down Expand Up @@ -892,7 +892,7 @@ describe('serverless cluster', () => {
// WHEN
new ServerlessCluster(stack, 'Database', {
engine: DatabaseClusterEngine.AURORA,
parameterGroup: ParameterGroup.fromParameterGroupName(stack, 'ParameterGroup', 'default.aurora-postgresql10'),
parameterGroup: ParameterGroup.fromParameterGroupName(stack, 'ParameterGroup', 'default.aurora-postgresql11'),
});

// THEN
Expand All @@ -909,7 +909,7 @@ describe('serverless cluster', () => {
new ServerlessCluster(stack, 'Database', {
engine: DatabaseClusterEngine.AURORA_POSTGRESQL,
copyTagsToSnapshot: false,
parameterGroup: ParameterGroup.fromParameterGroupName(stack, 'ParameterGroup', 'default.aurora-postgresql10'),
parameterGroup: ParameterGroup.fromParameterGroupName(stack, 'ParameterGroup', 'default.aurora-postgresql11'),
});

// THEN
Expand All @@ -926,7 +926,7 @@ describe('serverless cluster', () => {
new ServerlessCluster(stack, 'Database', {
engine: DatabaseClusterEngine.AURORA_POSTGRESQL,
copyTagsToSnapshot: true,
parameterGroup: ParameterGroup.fromParameterGroupName(stack, 'ParameterGroup', 'default.aurora-postgresql10'),
parameterGroup: ParameterGroup.fromParameterGroupName(stack, 'ParameterGroup', 'default.aurora-postgresql11'),
});

// THEN
Expand Down

0 comments on commit a4ebe8e

Please sign in to comment.