Skip to content

Commit

Permalink
Merge branch 'main' into 29062
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Mar 8, 2024
2 parents 69b92d4 + 2dbb381 commit 7e84d68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/aws-cdk-lib/aws-rds/lib/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ export class ProxyTarget {

const engineFamily = engine.engineFamily;
if (!engineFamily) {
throw new Error(`Engine '${engineDescription(engine)}' does not support proxies`);
throw new Error('RDS proxies require an engine family to be specified on the database cluster or instance. ' +
`No family specified for engine '${engineDescription(engine)}'`);
}

// allow connecting to the Cluster/Instance from the Proxy
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-rds/test/proxy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ describe('proxy', () => {
vpc,
secrets: [new secretsmanager.Secret(stack, 'Secret')],
});
}).toThrow(/Engine 'mariadb-10\.0\.24' does not support proxies/);
}).toThrow(/RDS proxies require an engine family to be specified on the database cluster or instance. No family specified for engine 'mariadb-10\.0\.24'/);
});

test('correctly creates a proxy for an imported Cluster if its engine is known', () => {
Expand Down

0 comments on commit 7e84d68

Please sign in to comment.