Skip to content

Commit

Permalink
chore(rds): add MariaDB 10.5.13, 10.4.22, 10.3.32, 10.2.41 and Aurora…
Browse files Browse the repository at this point in the history
… MySQL 3.01.0 (#17959)

Add new RDS versions:

**MariaDbEngineVersion 10.5.13, 10.4.22, 10.3.32 and 10.2.41**
[Announcement](https://aws.amazon.com/about-aws/whats-new/2021/12/amazon-rds-mariadb-supports-new-minor-versions/)

**AuroraMysqlEngineVersion 3.01.0**
[Announcement](https://aws.amazon.com/about-aws/whats-new/2021/11/amazon-aurora-mysql-8-0/)
Version informations retrieved from CLI command: `aws rds describe-db-engine-versions --region us-east-1 --engine aurora-mysql --engine-version 8.0`

Deployment tested successfully:
```ts
new rds.DatabaseCluster(this, 'DatabaseCluster', {
  engine: rds.DatabaseClusterEngine.auroraMysql({ version: rds.AuroraMysqlEngineVersion.VER_3_01_0 }),
  instanceProps: {
    instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.XLARGE),
    vpc,
  },
  removalPolicy: RemovalPolicy.DESTROY,
});
```

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
jumic authored Dec 13, 2021
1 parent e057c8f commit afcaede
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/@aws-cdk/aws-rds/lib/cluster-engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,8 @@ export class AuroraMysqlEngineVersion {
public static readonly VER_2_10_0 = AuroraMysqlEngineVersion.builtIn_5_7('2.10.0');
/** Version "5.7.mysql_aurora.2.10.1". */
public static readonly VER_2_10_1 = AuroraMysqlEngineVersion.builtIn_5_7('2.10.1');
/** Version "8.0.mysql_aurora.3.01.0". */
public static readonly VER_3_01_0 = AuroraMysqlEngineVersion.builtIn_8_0('3.01.0');

/**
* Create a new AuroraMysqlEngineVersion with an arbitrary version.
Expand All @@ -355,6 +357,10 @@ export class AuroraMysqlEngineVersion {
return new AuroraMysqlEngineVersion(`5.7.${addStandardPrefix ? 'mysql_aurora.' : ''}${minorVersion}`);
}

private static builtIn_8_0(minorVersion: string): AuroraMysqlEngineVersion {
return new AuroraMysqlEngineVersion(`8.0.mysql_aurora.${minorVersion}`, '8.0');
}

/** The full version string, for example, "5.7.mysql_aurora.1.78.3.6". */
public readonly auroraMysqlFullVersion: string;
/** The major version of the engine. Currently, it's always "5.7". */
Expand Down
8 changes: 8 additions & 0 deletions packages/@aws-cdk/aws-rds/lib/instance-engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ export class MariaDbEngineVersion {
public static readonly VER_10_2_39 = MariaDbEngineVersion.of('10.2.39', '10.2');
/** Version "10.2.40". */
public static readonly VER_10_2_40 = MariaDbEngineVersion.of('10.2.40', '10.2');
/** Version "10.2.41". */
public static readonly VER_10_2_41 = MariaDbEngineVersion.of('10.2.41', '10.2');

/** Version "10.3" (only a major version, without a specific minor version). */
public static readonly VER_10_3 = MariaDbEngineVersion.of('10.3', '10.3');
Expand All @@ -274,6 +276,8 @@ export class MariaDbEngineVersion {
public static readonly VER_10_3_28 = MariaDbEngineVersion.of('10.3.28', '10.3');
/** Version "10.3.31". */
public static readonly VER_10_3_31 = MariaDbEngineVersion.of('10.3.31', '10.3');
/** Version "10.3.32". */
public static readonly VER_10_3_32 = MariaDbEngineVersion.of('10.3.32', '10.3');

/** Version "10.4" (only a major version, without a specific minor version). */
public static readonly VER_10_4 = MariaDbEngineVersion.of('10.4', '10.4');
Expand All @@ -285,6 +289,8 @@ export class MariaDbEngineVersion {
public static readonly VER_10_4_18 = MariaDbEngineVersion.of('10.4.18', '10.4');
/** Version "10.4.21". */
public static readonly VER_10_4_21 = MariaDbEngineVersion.of('10.4.21', '10.4');
/** Version "10.4.22". */
public static readonly VER_10_4_22 = MariaDbEngineVersion.of('10.4.22', '10.4');

/** Version "10.5" (only a major version, without a specific minor version). */
public static readonly VER_10_5 = MariaDbEngineVersion.of('10.5', '10.5');
Expand All @@ -294,6 +300,8 @@ export class MariaDbEngineVersion {
public static readonly VER_10_5_9 = MariaDbEngineVersion.of('10.5.9', '10.5');
/** Version "10.5.12". */
public static readonly VER_10_5_12 = MariaDbEngineVersion.of('10.5.12', '10.5');
/** Version "10.5.13". */
public static readonly VER_10_5_13 = MariaDbEngineVersion.of('10.5.13', '10.5');

/**
* Create a new MariaDbEngineVersion with an arbitrary version.
Expand Down
13 changes: 13 additions & 0 deletions packages/@aws-cdk/aws-rds/test/cluster-engine.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,19 @@ describe('cluster engine', () => {

});

test('cluster parameter group correctly determined for AURORA_MYSQL and given version 3', () => {
// GIVEN
const engine = DatabaseClusterEngine.auroraMysql({
version: AuroraMysqlEngineVersion.VER_3_01_0,
});

// WHEN
const family = engine.parameterGroupFamily;

// THEN
expect(family).toEqual('aurora-mysql8.0');
});

test('cluster parameter group correctly determined for AURORA_POSTGRESQL and given version', () => {
// GIVEN
const engine = DatabaseClusterEngine.auroraPostgres({
Expand Down

0 comments on commit afcaede

Please sign in to comment.