Skip to content

Commit

Permalink
feat: add keycloak version 22.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
hpp222 committed Oct 15, 2023
1 parent 6885c41 commit eba426b
Show file tree
Hide file tree
Showing 6 changed files with 153 additions and 138 deletions.
1 change: 1 addition & 0 deletions API.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ CDK construct library that allows you to create [KeyCloak](https://www.keycloak.
# Sample

For Keycloak 17+ versions, please specify hostname for the Keycloak server.

```ts
import { KeyCloak } from 'cdk-keycloak';

Expand All @@ -26,8 +28,9 @@ const env = {

const stack = new cdk.Stack(app, 'keycloak-demo', { env });
new KeyCloak(stack, 'KeyCloak', {
hostname: 'keycloak.example.com',
certificateArn: 'arn:aws:acm:us-east-1:123456789012:certificate/293cf875-ca98-4c2e-a797-e1cf6df2553c',
keycloakVersion,
keycloakVersion: KeycloakVersion.V22_0_4,
});
```

Expand All @@ -37,8 +40,9 @@ Use `keycloakVersion` to specify the version.

```ts
new KeyCloak(stack, 'KeyCloak', {
hostname,
certificateArn,
keycloakVersion: KeycloakVersion.V15_0_2,
keycloakVersion: KeycloakVersion.V22_0_4,
});
```

Expand All @@ -52,13 +56,15 @@ The `KeyCloak` construct provisions the **Amaozn RDS cluster for MySQL** with **
```ts
// Aurora Serverless v1
new KeyCloak(stack, 'KeyCloak', {
hostname,
certificateArn,
auroraServerless: true,
keycloakVersion,
});

// Aurora Serverless v2
new KeyCloak(stack, 'KeyCloak', {
hostname,
certificateArn,
auroraServerlessV2: true,
keycloakVersion,
Expand All @@ -76,6 +82,7 @@ Plesae note this is not recommended for production environment.

```ts
new KeyCloak(stack, 'KeyCloak', {
hostname,
certificateArn,
singleDbInstance: true,
keycloakVersion,
Expand All @@ -89,7 +96,7 @@ Define `autoScaleTask` for the ecs service task autoscaling. For example:

```ts
new KeyCloak(stack, 'KeyCloak', {
auroraServerless: true,
auroraServerlessV2: true,
nodeCount: 2,
autoScaleTask: {
min: 2,
Expand Down Expand Up @@ -125,6 +132,7 @@ Consider the sample below:

```ts
new KeyCloak(stack, 'KeyCloak', {
hostname: 'keycloak.example.com',
certificateArn: 'arn:aws:acm:us-east-1:123456789012:certificate/293cf875-ca98-4c2e-a797-e1cf6df2553c',
vpc: ec2.Vpc.fromLookup(stack, 'Vpc', { vpcId: 'vpc-0417e46d' }),
publicSubnets: {
Expand Down
5 changes: 3 additions & 2 deletions src/integ.default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ export class IntegTesting {
// create a default keycloak workload with minimal required props
new KeyCloak(stack, 'KeyCloak', {
certificateArn: stack.node.tryGetContext('ACM_CERT_ARN') || 'MOCK_ARN',
keycloakVersion: KeycloakVersion.V15_0_2,
auroraServerless: true,
keycloakVersion: KeycloakVersion.V22_0_4,
hostname: 'hostname for keycloak server',
auroraServerlessV2: true,
nodeCount: 2,
autoScaleTask: {
min: 2,
Expand Down
5 changes: 5 additions & 0 deletions src/keycloak.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ export class KeycloakVersion {
*/
public static readonly V21_0_1 = KeycloakVersion.of('21.0.1');

/**
* Keycloak version 22.0.4
*/
public static readonly V22_0_4 = KeycloakVersion.of('22.0.4');

/**
* Custom cluster version
* @param version custom version number
Expand Down
Loading

0 comments on commit eba426b

Please sign in to comment.