aws-samples/cdk-keycloak

Bug: 'databaseRemovalPolicy' - property is not removing the deletion protection from database

Tobiklee opened this issue · 1 comments

Description
When creating a new Keycloak instance the rollback will failed (I guess deletion aswell) because the deletion protection property is set to true even though databaseRemovalPolicy is set to RemovalPolicy.DESTROY.

A reproducible test case or series of steps

  1. create a new KeyCloak - Deployment:
new KeyCloak(this, 'KeyCloak', {
  hostname: '<hostname>',
  certificateArn: '<certificateArn>',
  keycloakVersion: KeycloakVersion.V22_0_4,
  auroraServerlessV2: true,
  nodeCount: 2,
  autoScaleTask: {
    min: 1,
    max: 10,
    targetCpuUtilization: 60,
  },
  databaseRemovalPolicy: RemovalPolicy.DESTROY,
});
  1. Delete Stack (or Creation Failes and Rollback happens)
  2. -> Stack is in a failed state

The version of our code being used
^2.9.0

Any modifications you've made relevant to the bug
no modifications were made, used code above

Anything unusual about your environment or deployment
I have used a fresh stack with only keycloak. Bug produced in region eu-central-1

Same here.