Skip to content

Commit

Permalink
feat: adds database removal policy to props
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Stortz committed Mar 3, 2023
1 parent 21602cf commit 584d8b1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/keycloak.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,13 @@ export interface KeyCloakProps {
* @default 10
*/
readonly databaseMaxCapacity?: number;

/**
* Controls what happens to the database if it stops being managed by CloudFormation
*
* @default RemovalPolicy.RETAIN
*/
readonly databaseRemovalPolicy?: cdk.RemovalPolicy;
}

export class KeyCloak extends Construct {
Expand Down Expand Up @@ -265,6 +272,7 @@ export class KeyCloak extends Construct {
removalPolicy: props.databaseRemovalPolicy,
maxCapacity: props.databaseMaxCapacity,
minCapacity: props.databaseMinCapacity,
removalPolicy: props.databaseRemovalPolicy,
});
const keycloakContainerService = this.addKeyCloakContainerService({
database: this.db,
Expand Down Expand Up @@ -375,6 +383,13 @@ export interface DatabaseProps {
* @default 10
*/
readonly maxCapacity?: number;

/**
* Controls what happens to the database if it stops being managed by CloudFormation
*
* @default RemovalPolicy.RETAIN
*/
readonly removalPolicy?: cdk.RemovalPolicy;
}

/**
Expand Down

0 comments on commit 584d8b1

Please sign in to comment.