From bbd1d6fab0ecc291d9bf2961be26e9d4d137fb21 Mon Sep 17 00:00:00 2001 From: droguljic <1875821+droguljic@users.noreply.github.com> Date: Thu, 7 May 2026 08:29:40 +0200 Subject: [PATCH] feat: bump default `Database` engine version to Postgres `18` The default engine version is just set to major version - `18`, to ensure the caller always gets the latest minor version. --- src/components/database/README.md | 6 +++--- src/components/database/database-replica.ts | 2 +- src/components/database/index.ts | 2 +- tests/database/index.test.ts | 2 +- tests/database/infrastructure/index.ts | 2 +- tests/database/replica-db.test.ts | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/database/README.md b/src/components/database/README.md index 1a4e2aab..10c5318a 100644 --- a/src/components/database/README.md +++ b/src/components/database/README.md @@ -57,7 +57,7 @@ export const ssmHostId = ssmConnect.ec2.id; ## Implementation notes - The primary and replica components are PostgreSQL-only (`engine: 'postgres'`). -- `Database` merges caller input with defaults of engine version `17.2`, instance class `db.t4g.micro`, `allocatedStorage: 20`, `maxAllocatedStorage: 100`, `multiAz: false`, `applyImmediately: false`, `skipFinalSnapshot: false`, `allowMajorVersionUpgrade: false`, `autoMinorVersionUpgrade: true`, and monitoring disabled. +- `Database` merges caller input with defaults of engine version `18`, instance class `db.t4g.micro`, `allocatedStorage: 20`, `maxAllocatedStorage: 100`, `multiAz: false`, `applyImmediately: false`, `skipFinalSnapshot: false`, `allowMajorVersionUpgrade: false`, `autoMinorVersionUpgrade: true`, and monitoring disabled. - The primary subnet group always uses `vpc.isolatedSubnetIds`, and the database is always created with `publiclyAccessible: false`. - The database security group allows TCP/5432 from the VPC CIDR block. - The primary password is always managed through a nested `Password` component. If you omit `password`, that nested component generates a random password and stores it in Secrets Manager. @@ -107,7 +107,7 @@ Direct constructor input: `args: Database.Args` | `dbName` | `pulumi.Input` | No | none | Database name for the primary instance. | | `username` | `pulumi.Input` | No | none | Master username for the primary instance. | | `password` | `pulumi.Input` | No | generated by `Password` | If omitted, a nested `Password` component generates and stores the secret. | -| `engineVersion` | `pulumi.Input` | No | `'17.2'` | PostgreSQL engine version. | +| `engineVersion` | `pulumi.Input` | No | `'18'` | PostgreSQL engine version. | | `multiAz` | `pulumi.Input` | No | `false` | Multi-AZ toggle for the primary instance. | | `instanceClass` | `pulumi.Input` | No | `'db.t4g.micro'` | Primary instance class. | | `allocatedStorage` | `pulumi.Input` | No | `20` | Initial storage in GiB. | @@ -292,7 +292,7 @@ Direct constructor input: `args: DatabaseReplica.Args` | `dbSubnetGroup` | `aws.rds.SubnetGroup` | No | none | Optional subnet group override. | | `monitoringRole` | `aws.iam.Role` | No | none | Enables enhanced monitoring and Performance Insights when provided. | | `parameterGroupName` | `pulumi.Input` | No | none | Replica DB parameter group. | -| `engineVersion` | `pulumi.Input` | No | `'17.2'` | PostgreSQL engine version. | +| `engineVersion` | `pulumi.Input` | No | `'18'` | PostgreSQL engine version. | | `multiAz` | `pulumi.Input` | No | `false` | Multi-AZ toggle. | | `instanceClass` | `pulumi.Input` | No | `'db.t4g.micro'` | Replica instance class. | | `allocatedStorage` | `pulumi.Input` | No | `20` | Initial storage in GiB. | diff --git a/src/components/database/database-replica.ts b/src/components/database/database-replica.ts index 1506ddae..9c42219a 100644 --- a/src/components/database/database-replica.ts +++ b/src/components/database/database-replica.ts @@ -43,7 +43,7 @@ const defaults = { instanceClass: 'db.t4g.micro', allowMajorVersionUpgrade: false, autoMinorVersionUpgrade: true, - engineVersion: '17.2', + engineVersion: '18', }; export class DatabaseReplica extends pulumi.ComponentResource { diff --git a/src/components/database/index.ts b/src/components/database/index.ts index 62ba5361..f9956878 100644 --- a/src/components/database/index.ts +++ b/src/components/database/index.ts @@ -72,7 +72,7 @@ const defaults = { enableMonitoring: false, allowMajorVersionUpgrade: false, autoMinorVersionUpgrade: true, - engineVersion: '17.2', + engineVersion: '18', }; export class Database extends pulumi.ComponentResource { diff --git a/tests/database/index.test.ts b/tests/database/index.test.ts index b188bf94..c2e58d07 100644 --- a/tests/database/index.test.ts +++ b/tests/database/index.test.ts @@ -109,7 +109,7 @@ describe('Database component deployment', () => { performanceInsightsEnabled: false, allowMajorVersionUpgrade: false, autoMinorVersionUpgrade: true, - engineVersion: '17.2', + engineVersion: '18', engine: 'postgres', storageEncrypted: true, publiclyAccessible: false, diff --git a/tests/database/infrastructure/index.ts b/tests/database/infrastructure/index.ts index 95ccc091..72b9a287 100644 --- a/tests/database/infrastructure/index.ts +++ b/tests/database/infrastructure/index.ts @@ -39,7 +39,7 @@ const kms = new aws.kms.Key( const paramGroup = new aws.rds.ParameterGroup( `${config.appName}-parameter-group`, { - family: 'postgres17', + family: 'postgres18', tags: config.tags, }, { parent }, diff --git a/tests/database/replica-db.test.ts b/tests/database/replica-db.test.ts index 138086c1..09f46ef7 100644 --- a/tests/database/replica-db.test.ts +++ b/tests/database/replica-db.test.ts @@ -101,7 +101,7 @@ export function testReplicaDb(ctx: DatabaseTestContext) { performanceInsightsEnabled: false, allowMajorVersionUpgrade: false, autoMinorVersionUpgrade: true, - engineVersion: '17.2', + engineVersion: '18', engine: 'postgres', storageEncrypted: true, publiclyAccessible: false,