diff --git a/packages/aws-cdk-lib/aws-rds/lib/instance-engine.ts b/packages/aws-cdk-lib/aws-rds/lib/instance-engine.ts index e0bfec6452b62..dbe3d17992280 100644 --- a/packages/aws-cdk-lib/aws-rds/lib/instance-engine.ts +++ b/packages/aws-cdk-lib/aws-rds/lib/instance-engine.ts @@ -494,6 +494,8 @@ export class MariaDbEngineVersion { public static readonly VER_10_5_24 = MariaDbEngineVersion.of('10.5.24', '10.5'); /** Version "10.5.25". */ public static readonly VER_10_5_25 = MariaDbEngineVersion.of('10.5.25', '10.5'); + /** Version "10.5.26". */ + public static readonly VER_10_5_26 = MariaDbEngineVersion.of('10.5.26', '10.5'); /** Version "10.6" (only a major version, without a specific minor version). */ public static readonly VER_10_6 = MariaDbEngineVersion.of('10.6', '10.6'); @@ -539,6 +541,8 @@ export class MariaDbEngineVersion { public static readonly VER_10_6_17 = MariaDbEngineVersion.of('10.6.17', '10.6'); /** Version "10.6.18". */ public static readonly VER_10_6_18 = MariaDbEngineVersion.of('10.6.18', '10.6'); + /** Version "10.6.19". */ + public static readonly VER_10_6_19 = MariaDbEngineVersion.of('10.6.19', '10.6'); /** Version "10.11" (only a major version, without a specific minor version). */ public static readonly VER_10_11 = MariaDbEngineVersion.of('10.11', '10.11'); @@ -552,6 +556,8 @@ export class MariaDbEngineVersion { public static readonly VER_10_11_7 = MariaDbEngineVersion.of('10.11.7', '10.11'); /** Version "10.11.8". */ public static readonly VER_10_11_8 = MariaDbEngineVersion.of('10.11.8', '10.11'); + /** Version "10.11.9". */ + public static readonly VER_10_11_9 = MariaDbEngineVersion.of('10.11.9', '10.11'); /** * Create a new MariaDbEngineVersion with an arbitrary version. diff --git a/packages/aws-cdk-lib/aws-rds/test/instance-engine.test.ts b/packages/aws-cdk-lib/aws-rds/test/instance-engine.test.ts index 86d2b8b2dc574..107ff52094086 100644 --- a/packages/aws-cdk-lib/aws-rds/test/instance-engine.test.ts +++ b/packages/aws-cdk-lib/aws-rds/test/instance-engine.test.ts @@ -1,4 +1,5 @@ import { Template } from '../../assertions'; +import * as ec2 from '../../aws-ec2'; import * as iam from '../../aws-iam'; import * as cdk from '../../core'; import * as rds from '../lib'; @@ -262,4 +263,57 @@ describe('instance engine', () => { expect(engineConfig.features?.s3Export).toEqual('s3Export'); }); }); + + describe('MariaDB engine version', () => { + test.each([ + ['10.4', rds.MariaDbEngineVersion.VER_10_4], + ['10.4.29', rds.MariaDbEngineVersion.VER_10_4_29], + ['10.4.30', rds.MariaDbEngineVersion.VER_10_4_30], + ['10.4.31', rds.MariaDbEngineVersion.VER_10_4_31], + ['10.4.32', rds.MariaDbEngineVersion.VER_10_4_32], + ['10.4.33', rds.MariaDbEngineVersion.VER_10_4_33], + ['10.4.34', rds.MariaDbEngineVersion.VER_10_4_34], + ['10.5', rds.MariaDbEngineVersion.VER_10_5], + ['10.5.20', rds.MariaDbEngineVersion.VER_10_5_20], + ['10.5.21', rds.MariaDbEngineVersion.VER_10_5_21], + ['10.5.22', rds.MariaDbEngineVersion.VER_10_5_22], + ['10.5.23', rds.MariaDbEngineVersion.VER_10_5_23], + ['10.5.24', rds.MariaDbEngineVersion.VER_10_5_24], + ['10.5.25', rds.MariaDbEngineVersion.VER_10_5_25], + ['10.5.26', rds.MariaDbEngineVersion.VER_10_5_26], + ['10.6', rds.MariaDbEngineVersion.VER_10_6], + ['10.6.13', rds.MariaDbEngineVersion.VER_10_6_13], + ['10.6.14', rds.MariaDbEngineVersion.VER_10_6_14], + ['10.6.15', rds.MariaDbEngineVersion.VER_10_6_15], + ['10.6.16', rds.MariaDbEngineVersion.VER_10_6_16], + ['10.6.17', rds.MariaDbEngineVersion.VER_10_6_17], + ['10.6.18', rds.MariaDbEngineVersion.VER_10_6_18], + ['10.6.19', rds.MariaDbEngineVersion.VER_10_6_19], + ['10.11', rds.MariaDbEngineVersion.VER_10_11], + ['10.11.4', rds.MariaDbEngineVersion.VER_10_11_4], + ['10.11.5', rds.MariaDbEngineVersion.VER_10_11_5], + ['10.11.6', rds.MariaDbEngineVersion.VER_10_11_6], + ['10.11.7', rds.MariaDbEngineVersion.VER_10_11_7], + ['10.11.8', rds.MariaDbEngineVersion.VER_10_11_8], + ['10.11.9', rds.MariaDbEngineVersion.VER_10_11_9], + ])('is passed correctly for %s', (engineVersion, version) => { + + // WHEN + const stack = new cdk.Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + + new rds.DatabaseInstance(stack, 'Instance', { + engine: rds.DatabaseInstanceEngine.mariaDb({ version }), + vpc, + }); + + // THEN + Template.fromStack(stack).hasResource('AWS::RDS::DBInstance', { + Properties: { + Engine: 'mariadb', + EngineVersion: engineVersion, + }, + }); + }); + }); });