Repository: aws-samples/cdk-keycloak (language: python)

Issue:
Missing JDBC_PING for Keycloak Cluster
Take these for references:

https://github.com/aws-samples/keycloak-on-aws/issues/95#issuecomment-841653135
https://github.com/wheatstalk/cdk-ecs-keycloak/blob/dbcf221aac444e7621bcd9ab1ef737e7a65c43d9/src/keycloak-container-extension.ts#L270-L275
https://github.com/keycloak/keycloak-containers/blob/7946333ab4a6d49f0c37e92e26ddfb050afe7623/docker-compose-examples/keycloak-postgres-jdbc-ping.yml#L49

Missing JDBC_PING for Keycloak Cluster
Take these for references:

https://github.com/aws-samples/keycloak-on-aws/issues/95#issuecomment-841653135
https://github.com/wheatstalk/cdk-ecs-keycloak/blob/dbcf221aac444e7621bcd9ab1ef737e7a65c43d9/src/keycloak-container-extension.ts#L270-L275
https://github.com/keycloak/keycloak-containers/blob/7946333ab4a6d49f0c37e92e26ddfb050afe7623/docker-compose-examples/keycloak-postgres-jdbc-ping.yml#L49



Discussion / hints:

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
deleted file mode 100644
index afcd913..0000000
--- a/CHANGELOG.md
+++ /dev/null
@@ -1,326 +0,0 @@
-# Changelog
-
-All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
-
-### [0.2.3](https://github.com/aws-samples/cdk-keycloak/compare/v0.2.2...v0.2.3) (2021-04-19)
-
-
-### Features
-
-* update keyloak new version ([#71](https://github.com/aws-samples/cdk-keycloak/issues/71)) ([d6aea06](https://github.com/aws-samples/cdk-keycloak/commit/d6aea0667708121e55736e0619ce8788e3dcce31))
-
-### [0.2.2](https://github.com/aws-samples/cdk-keycloak/compare/v0.2.1...v0.2.2) (2021-03-19)
-
-
-### Features
-
-* support backup retention ([bc2a8c1](https://github.com/aws-samples/cdk-keycloak/commit/bc2a8c16cff03761801b28c65f94259358597244))
-
-### [0.2.1](https://github.com/aws-samples/cdk-keycloak/compare/v0.2.0...v0.2.1) (2021-02-25)
-
-
-### Features
-
-* add auto-merge workflow ([64eb06c](https://github.com/aws-samples/cdk-keycloak/commit/64eb06c44675fab38fad457a4136f00b46e4c619))
-* add custom env [#14](https://github.com/aws-samples/cdk-keycloak/issues/14) ([32af858](https://github.com/aws-samples/cdk-keycloak/commit/32af8586ea0f891dda28c4ae8dba01928619469e))
-
-## [0.2.0](https://github.com/pahud/cdk-keycloak/compare/v0.1.6...v0.2.0) (2021-02-23)
-
-### 0.1.6 (2021-02-23)
-
-
-### Features
-
-* bootstrap container support ([#9](https://github.com/pahud/cdk-keycloak/issues/9)) ([b5cf701](https://github.com/pahud/cdk-keycloak/commit/b5cf70180dfb2f3d3dd2840f125af03ba320e67b)), closes [#8](https://github.com/pahud/cdk-keycloak/issues/8)
-* expose database instanceType property ([38c1393](https://github.com/pahud/cdk-keycloak/commit/38c1393d13302911f63bbe389c2524f9cf8bad24))
-* expose database instanceType property ([#31](https://github.com/pahud/cdk-keycloak/issues/31)) ([96526fa](https://github.com/pahud/cdk-keycloak/commit/96526fafe8cdf1c4d6c1792804fe8a5c69ffc618)), closes [#30](https://github.com/pahud/cdk-keycloak/issues/30)
-* make circuit breaker optional ([cdf31d8](https://github.com/pahud/cdk-keycloak/commit/cdf31d806dfaf43139f3f60ec92d77f4596f4ed6))
-* optional node number ([43fa306](https://github.com/pahud/cdk-keycloak/commit/43fa306f0fd92ebb9849b4497f9426a9bc5583b0))
-* set default nodeCount to 2 ([9576800](https://github.com/pahud/cdk-keycloak/commit/957680063051d3487e968eabe61cd37973a22bc9))
-* support ALB. Closes [#1](https://github.com/pahud/cdk-keycloak/issues/1) ([4f9c5d1](https://github.com/pahud/cdk-keycloak/commit/4f9c5d120bf2bf353b6a4aa72481c31701b86fb3))
-* support aurora serverless ([2dae269](https://github.com/pahud/cdk-keycloak/commit/2dae269820847a8e158469eb17f1f76e0cc0d75e))
-* support AwsLogs. Closes: [#2](https://github.com/pahud/cdk-keycloak/issues/2) ([45d5327](https://github.com/pahud/cdk-keycloak/commit/45d53273f929070decdef11e2c5f00ff76d007b5))
-* support backup retention and storage encryption  ([#85](https://github.com/pahud/cdk-keycloak/issues/85)) ([44ee419](https://github.com/pahud/cdk-keycloak/commit/44ee4190d88f47ba43ba2b585c7cbd012a9eb994)), closes [#84](https://github.com/pahud/cdk-keycloak/issues/84) [#83](https://github.com/pahud/cdk-keycloak/issues/83)
-* support bootstrap image mirror in China ([4b8c1dd](https://github.com/pahud/cdk-keycloak/commit/4b8c1dd31e13fe35d67f9c1282622232dbae13bd))
-* support bootstrap image mirror in China ([#81](https://github.com/pahud/cdk-keycloak/issues/81)) ([a028f67](https://github.com/pahud/cdk-keycloak/commit/a028f678863db73769ae4270db409a57755e3777)), closes [#80](https://github.com/pahud/cdk-keycloak/issues/80)
-* support china ecr mirror ([1f22b38](https://github.com/pahud/cdk-keycloak/commit/1f22b38bab6406727c1b0d97eb5875c8494a34ec))
-* support docker image CfnMapping ([5be4ace](https://github.com/pahud/cdk-keycloak/commit/5be4acece7e3eee346e4c4351c5f645579a82625))
-* support ecr china mirror ([#63](https://github.com/pahud/cdk-keycloak/issues/63)) ([1f7f2dc](https://github.com/pahud/cdk-keycloak/commit/1f7f2dc87cbadcb14e50ce65459153dd6f52f49e)), closes [#62](https://github.com/pahud/cdk-keycloak/issues/62)
-* support ecs service autoscaling ([da8c4b7](https://github.com/pahud/cdk-keycloak/commit/da8c4b73c9a32aa1721c09d72a0096710785fa33))
-* support ecs service autoscaling ([#68](https://github.com/pahud/cdk-keycloak/issues/68)) ([0476ee7](https://github.com/pahud/cdk-keycloak/commit/0476ee7f0d60b013b989568e8bee35ea19028040)), closes [#67](https://github.com/pahud/cdk-keycloak/issues/67)
-* support ecs task role. Closes [#3](https://github.com/pahud/cdk-keycloak/issues/3) ([cd43c2e](https://github.com/pahud/cdk-keycloak/commit/cd43c2ea9c167f4cf1c4f0b6bafce51153d934c3))
-* support rds cluster ([1fa66cf](https://github.com/pahud/cdk-keycloak/commit/1fa66cf19405d61d6e83ebc25d82d7d97f8e6afe))
-* support rds cluster ([#60](https://github.com/pahud/cdk-keycloak/issues/60)) ([734705d](https://github.com/pahud/cdk-keycloak/commit/734705df914bcb0b183b1cae9668c3afcec92468)), closes [#59](https://github.com/pahud/cdk-keycloak/issues/59)
-* **database:** Aurora serverless support ([#34](https://github.com/pahud/cdk-keycloak/issues/34)) ([3a3bddd](https://github.com/pahud/cdk-keycloak/commit/3a3bddd2ed9e0996aad33d61fc421c1da04a090d)), closes [#33](https://github.com/pahud/cdk-keycloak/issues/33)
-* support slow start and sticky session ([8571453](https://github.com/pahud/cdk-keycloak/commit/8571453c203a38aa8f4eb65d2306b40063b7b496))
-* support VpcSubnets ([f815f5e](https://github.com/pahud/cdk-keycloak/commit/f815f5ee66458ac6ff4f50db5208e0e8f8550da3))
-* support VpcSubnets ([#19](https://github.com/pahud/cdk-keycloak/issues/19)) ([eec51b2](https://github.com/pahud/cdk-keycloak/commit/eec51b26ff65ae2acff5c7e7fb247f2b9b0d7234)), closes [#18](https://github.com/pahud/cdk-keycloak/issues/18)
-
-
-### Bug Fixes
-
-* ALB port mapping should go to 8443. Closes [#22](https://github.com/pahud/cdk-keycloak/issues/22) ([6393c61](https://github.com/pahud/cdk-keycloak/commit/6393c6177fbf6b85a3d6b7d70ddce1d11ebca26a))
-* default nodeCount should be 2 ([#27](https://github.com/pahud/cdk-keycloak/issues/27)) ([7533d3f](https://github.com/pahud/cdk-keycloak/commit/7533d3f692b3854c85358a656072f94cfc2d2911)), closes [#26](https://github.com/pahud/cdk-keycloak/issues/26)
-* KEYCLOAK_USER and Https port mapping ([#24](https://github.com/pahud/cdk-keycloak/issues/24)) ([cc190d9](https://github.com/pahud/cdk-keycloak/commit/cc190d940ee3921a2ab18e3667b6c87f16546c93)), closes [#21](https://github.com/pahud/cdk-keycloak/issues/21) [#22](https://github.com/pahud/cdk-keycloak/issues/22)
-* missing KEYCLOAK_USER in the env var. Closes [#21](https://github.com/pahud/cdk-keycloak/issues/21) ([9e45c12](https://github.com/pahud/cdk-keycloak/commit/9e45c126eb97f9a2382367fce7ff249f782e57a3))
-* raise error when reion is unresolved ([#37](https://github.com/pahud/cdk-keycloak/issues/37)) ([b5ce2ca](https://github.com/pahud/cdk-keycloak/commit/b5ce2ca2d2900c541ce985cbd936856f84e9296f))
-* remove port 8080 ([#25](https://github.com/pahud/cdk-keycloak/issues/25)) ([cd13e4f](https://github.com/pahud/cdk-keycloak/commit/cd13e4f339eac4032d7f7f2394ec949fbc39aa61)), closes [/github.com/pahud/cdk-keycloak/pull/24#pullrequestreview-578994559](https://github.com/pahud//github.com/pahud/cdk-keycloak/pull/24/issues/pullrequestreview-578994559)
-* typo ([1739161](https://github.com/pahud/cdk-keycloak/commit/1739161458d6de22fe2b694ef9c4553d7b94a82b))
-* typo should be KeyCloadProps  ([#70](https://github.com/pahud/cdk-keycloak/issues/70)) ([1e27f75](https://github.com/pahud/cdk-keycloak/commit/1e27f75cfb06b8eec056c8421d97117a5a90dfe6))
-
-### [0.1.5](https://github.com/pahud/cdk-keycloak/compare/v0.1.4...v0.1.5) (2021-02-21)
-
-### [0.1.4](https://github.com/pahud/cdk-keycloak/compare/v0.1.3...v0.1.4) (2021-02-20)
-
-### [0.1.3](https://github.com/pahud/cdk-keycloak/compare/v0.1.2...v0.1.3) (2021-02-19)
-
-### [0.1.2](https://github.com/pahud/cdk-keycloak/compare/v0.1.1...v0.1.2) (2021-02-19)
-
-
-### Features
-
-* support backup retention and storage encryption  ([#85](https://github.com/pahud/cdk-keycloak/issues/85)) ([44ee419](https://github.com/pahud/cdk-keycloak/commit/44ee4190d88f47ba43ba2b585c7cbd012a9eb994)), closes [#84](https://github.com/pahud/cdk-keycloak/issues/84) [#83](https://github.com/pahud/cdk-keycloak/issues/83)
-
-### [0.1.1](https://github.com/pahud/cdk-keycloak/compare/v0.1.0...v0.1.1) (2021-02-18)
-
-## [0.1.0](https://github.com/pahud/cdk-keycloak/compare/v0.0.50...v0.1.0) (2021-02-18)
-
-
-### Features
-
-* support bootstrap image mirror in China ([4b8c1dd](https://github.com/pahud/cdk-keycloak/commit/4b8c1dd31e13fe35d67f9c1282622232dbae13bd))
-* support china ecr mirror ([1f22b38](https://github.com/pahud/cdk-keycloak/commit/1f22b38bab6406727c1b0d97eb5875c8494a34ec))
-* support docker image CfnMapping ([5be4ace](https://github.com/pahud/cdk-keycloak/commit/5be4acece7e3eee346e4c4351c5f645579a82625))
-* support ecs service autoscaling ([da8c4b7](https://github.com/pahud/cdk-keycloak/commit/da8c4b73c9a32aa1721c09d72a0096710785fa33))
-* support rds cluster ([1fa66cf](https://github.com/pahud/cdk-keycloak/commit/1fa66cf19405d61d6e83ebc25d82d7d97f8e6afe))
-
-
-### Bug Fixes
-
-* typo ([1739161](https://github.com/pahud/cdk-keycloak/commit/1739161458d6de22fe2b694ef9c4553d7b94a82b))
-
-### [0.0.50](https://github.com/pahud/cdk-keycloak/compare/v0.0.49...v0.0.50) (2021-02-18)
-
-
-### Features
-
-* support bootstrap image mirror in China ([#81](https://github.com/pahud/cdk-keycloak/issues/81)) ([a028f67](https://github.com/pahud/cdk-keycloak/commit/a028f678863db73769ae4270db409a57755e3777)), closes [#80](https://github.com/pahud/cdk-keycloak/issues/80)
-
-### [0.0.49](https://github.com/pahud/cdk-keycloak/compare/v0.0.48...v0.0.49) (2021-02-18)
-
-### [0.0.48](https://github.com/pahud/cdk-keycloak/compare/v0.0.47...v0.0.48) (2021-02-18)
-
-### [0.0.47](https://github.com/pahud/cdk-keycloak/compare/v0.0.46...v0.0.47) (2021-02-17)
-
-### [0.0.46](https://github.com/pahud/cdk-keycloak/compare/v0.0.45...v0.0.46) (2021-02-16)
-
-### [0.0.45](https://github.com/pahud/cdk-keycloak/compare/v0.0.44...v0.0.45) (2021-02-15)
-
-### [0.0.44](https://github.com/pahud/cdk-keycloak/compare/v0.0.43...v0.0.44) (2021-02-14)
-
-### [0.0.43](https://github.com/pahud/cdk-keycloak/compare/v0.0.42...v0.0.43) (2021-02-13)
-
-### [0.0.42](https://github.com/pahud/cdk-keycloak/compare/v0.0.41...v0.0.42) (2021-02-12)
-
-### [0.0.41](https://github.com/pahud/cdk-keycloak/compare/v0.0.40...v0.0.41) (2021-02-11)
-
-### [0.0.40](https://github.com/pahud/cdk-keycloak/compare/v0.0.39...v0.0.40) (2021-02-10)
-
-
-### Bug Fixes
-
-* typo should be KeyCloadProps  ([#70](https://github.com/pahud/cdk-keycloak/issues/70)) ([1e27f75](https://github.com/pahud/cdk-keycloak/commit/1e27f75cfb06b8eec056c8421d97117a5a90dfe6))
-
-### [0.0.39](https://github.com/pahud/cdk-keycloak/compare/v0.0.38...v0.0.39) (2021-02-10)
-
-### [0.0.38](https://github.com/pahud/cdk-keycloak/compare/v0.0.37...v0.0.38) (2021-02-10)
-
-
-### Features
-
-* support ecs service autoscaling ([#68](https://github.com/pahud/cdk-keycloak/issues/68)) ([0476ee7](https://github.com/pahud/cdk-keycloak/commit/0476ee7f0d60b013b989568e8bee35ea19028040)), closes [#67](https://github.com/pahud/cdk-keycloak/issues/67)
-
-### [0.0.37](https://github.com/pahud/cdk-keycloak/compare/v0.0.36...v0.0.37) (2021-02-10)
-
-### [0.0.36](https://github.com/pahud/cdk-keycloak/compare/v0.0.35...v0.0.36) (2021-02-09)
-
-### [0.0.35](https://github.com/pahud/cdk-keycloak/compare/v0.0.34...v0.0.35) (2021-02-09)
-
-
-### Features
-
-* support ecr china mirror ([#63](https://github.com/pahud/cdk-keycloak/issues/63)) ([1f7f2dc](https://github.com/pahud/cdk-keycloak/commit/1f7f2dc87cbadcb14e50ce65459153dd6f52f49e)), closes [#62](https://github.com/pahud/cdk-keycloak/issues/62)
-
-### [0.0.34](https://github.com/pahud/cdk-keycloak/compare/v0.0.33...v0.0.34) (2021-02-09)
-
-
-### Features
-
-* support rds cluster ([#60](https://github.com/pahud/cdk-keycloak/issues/60)) ([734705d](https://github.com/pahud/cdk-keycloak/commit/734705df914bcb0b183b1cae9668c3afcec92468)), closes [#59](https://github.com/pahud/cdk-keycloak/issues/59)
-
-### [0.0.33](https://github.com/pahud/cdk-keycloak/compare/v0.0.32...v0.0.33) (2021-02-09)
-
-### [0.0.32](https://github.com/pahud/cdk-keycloak/compare/v0.0.31...v0.0.32) (2021-02-08)
-
-### [0.0.31](https://github.com/pahud/cdk-keycloak/compare/v0.0.30...v0.0.31) (2021-02-07)
-
-### [0.0.30](https://github.com/pahud/cdk-keycloak/compare/v0.0.29...v0.0.30) (2021-02-06)
-
-### [0.0.29](https://github.com/pahud/cdk-keycloak/compare/v0.0.28...v0.0.29) (2021-02-05)
-
-### [0.0.28](https://github.com/pahud/cdk-keycloak/compare/v0.0.27...v0.0.28) (2021-02-04)
-
-### [0.0.27](https://github.com/pahud/cdk-keycloak/compare/v0.0.26...v0.0.27) (2021-02-04)
-
-### [0.0.26](https://github.com/pahud/cdk-keycloak/compare/v0.0.25...v0.0.26) (2021-02-02)
-
-### [0.0.25](https://github.com/pahud/cdk-keycloak/compare/v0.0.24...v0.0.25) (2021-02-01)
-
-### [0.0.24](https://github.com/pahud/cdk-keycloak/compare/v0.0.23...v0.0.24) (2021-02-01)
-
-### [0.0.23](https://github.com/pahud/cdk-keycloak/compare/v0.0.21...v0.0.23) (2021-02-01)
-
-
-### Features
-
-* expose database instanceType property ([38c1393](https://github.com/pahud/cdk-keycloak/commit/38c1393d13302911f63bbe389c2524f9cf8bad24))
-* support aurora serverless ([2dae269](https://github.com/pahud/cdk-keycloak/commit/2dae269820847a8e158469eb17f1f76e0cc0d75e))
-
-
-### Bug Fixes
-
-* raise error when reion is unresolved ([#37](https://github.com/pahud/cdk-keycloak/issues/37)) ([b5ce2ca](https://github.com/pahud/cdk-keycloak/commit/b5ce2ca2d2900c541ce985cbd936856f84e9296f))
-
-### [0.0.22](https://github.com/pahud/cdk-keycloak/compare/v0.0.21...v0.0.22) (2021-02-01)
-
-
-### Features
-
-* expose database instanceType property ([38c1393](https://github.com/pahud/cdk-keycloak/commit/38c1393d13302911f63bbe389c2524f9cf8bad24))
-* support aurora serverless ([2dae269](https://github.com/pahud/cdk-keycloak/commit/2dae269820847a8e158469eb17f1f76e0cc0d75e))
-
-
-### Bug Fixes
-
-* raise error when reion is unresolved ([#37](https://github.com/pahud/cdk-keycloak/issues/37)) ([b5ce2ca](https://github.com/pahud/cdk-keycloak/commit/b5ce2ca2d2900c541ce985cbd936856f84e9296f))
-
-### [0.0.21](https://github.com/pahud/cdk-keycloak/compare/v0.0.20...v0.0.21) (2021-02-01)
-
-
-### Features
-
-* **database:** Aurora serverless support ([#34](https://github.com/pahud/cdk-keycloak/issues/34)) ([3a3bddd](https://github.com/pahud/cdk-keycloak/commit/3a3bddd2ed9e0996aad33d61fc421c1da04a090d)), closes [#33](https://github.com/pahud/cdk-keycloak/issues/33)
-
-### [0.0.20](https://github.com/pahud/cdk-keycloak/compare/v0.0.19...v0.0.20) (2021-02-01)
-
-### [0.0.19](https://github.com/pahud/cdk-keycloak/compare/v0.0.18...v0.0.19) (2021-01-31)
-
-
-### Features
-
-* expose database instanceType property ([#31](https://github.com/pahud/cdk-keycloak/issues/31)) ([96526fa](https://github.com/pahud/cdk-keycloak/commit/96526fafe8cdf1c4d6c1792804fe8a5c69ffc618)), closes [#30](https://github.com/pahud/cdk-keycloak/issues/30)
-
-### [0.0.18](https://github.com/pahud/cdk-keycloak/compare/v0.0.16...v0.0.18) (2021-01-30)
-
-
-### Features
-
-* set default nodeCount to 2 ([9576800](https://github.com/pahud/cdk-keycloak/commit/957680063051d3487e968eabe61cd37973a22bc9))
-* support VpcSubnets ([f815f5e](https://github.com/pahud/cdk-keycloak/commit/f815f5ee66458ac6ff4f50db5208e0e8f8550da3))
-
-
-### Bug Fixes
-
-* ALB port mapping should go to 8443. Closes [#22](https://github.com/pahud/cdk-keycloak/issues/22) ([6393c61](https://github.com/pahud/cdk-keycloak/commit/6393c6177fbf6b85a3d6b7d70ddce1d11ebca26a))
-* default nodeCount should be 2 ([#27](https://github.com/pahud/cdk-keycloak/issues/27)) ([7533d3f](https://github.com/pahud/cdk-keycloak/commit/7533d3f692b3854c85358a656072f94cfc2d2911)), closes [#26](https://github.com/pahud/cdk-keycloak/issues/26)
-* missing KEYCLOAK_USER in the env var. Closes [#21](https://github.com/pahud/cdk-keycloak/issues/21) ([9e45c12](https://github.com/pahud/cdk-keycloak/commit/9e45c126eb97f9a2382367fce7ff249f782e57a3))
-
-### [0.0.17](https://github.com/pahud/cdk-keycloak/compare/v0.0.16...v0.0.17) (2021-01-29)
-
-
-### Features
-
-* set default nodeCount to 2 ([9576800](https://github.com/pahud/cdk-keycloak/commit/957680063051d3487e968eabe61cd37973a22bc9))
-* support VpcSubnets ([f815f5e](https://github.com/pahud/cdk-keycloak/commit/f815f5ee66458ac6ff4f50db5208e0e8f8550da3))
-
-
-### Bug Fixes
-
-* ALB port mapping should go to 8443. Closes [#22](https://github.com/pahud/cdk-keycloak/issues/22) ([6393c61](https://github.com/pahud/cdk-keycloak/commit/6393c6177fbf6b85a3d6b7d70ddce1d11ebca26a))
-* default nodeCount should be 2 ([#27](https://github.com/pahud/cdk-keycloak/issues/27)) ([7533d3f](https://github.com/pahud/cdk-keycloak/commit/7533d3f692b3854c85358a656072f94cfc2d2911)), closes [#26](https://github.com/pahud/cdk-keycloak/issues/26)
-* missing KEYCLOAK_USER in the env var. Closes [#21](https://github.com/pahud/cdk-keycloak/issues/21) ([9e45c12](https://github.com/pahud/cdk-keycloak/commit/9e45c126eb97f9a2382367fce7ff249f782e57a3))
-
-### [0.0.16](https://github.com/pahud/cdk-keycloak/compare/v0.0.15...v0.0.16) (2021-01-29)
-
-
-### Bug Fixes
-
-* remove port 8080 ([#25](https://github.com/pahud/cdk-keycloak/issues/25)) ([cd13e4f](https://github.com/pahud/cdk-keycloak/commit/cd13e4f339eac4032d7f7f2394ec949fbc39aa61)), closes [/github.com/pahud/cdk-keycloak/pull/24#pullrequestreview-578994559](https://github.com/pahud//github.com/pahud/cdk-keycloak/pull/24/issues/pullrequestreview-578994559)
-
-### [0.0.15](https://github.com/pahud/cdk-keycloak/compare/v0.0.14...v0.0.15) (2021-01-29)
-
-
-### Bug Fixes
-
-* KEYCLOAK_USER and Https port mapping ([#24](https://github.com/pahud/cdk-keycloak/issues/24)) ([cc190d9](https://github.com/pahud/cdk-keycloak/commit/cc190d940ee3921a2ab18e3667b6c87f16546c93)), closes [#21](https://github.com/pahud/cdk-keycloak/issues/21) [#22](https://github.com/pahud/cdk-keycloak/issues/22)
-
-### [0.0.14](https://github.com/pahud/cdk-keycloak/compare/v0.0.13...v0.0.14) (2021-01-29)
-
-### [0.0.13](https://github.com/pahud/cdk-keycloak/compare/v0.0.12...v0.0.13) (2021-01-28)
-
-
-### Features
-
-* support VpcSubnets ([#19](https://github.com/pahud/cdk-keycloak/issues/19)) ([eec51b2](https://github.com/pahud/cdk-keycloak/commit/eec51b26ff65ae2acff5c7e7fb247f2b9b0d7234)), closes [#18](https://github.com/pahud/cdk-keycloak/issues/18)
-
-### [0.0.12](https://github.com/pahud/cdk-keycloak/compare/v0.0.11...v0.0.12) (2021-01-28)
-
-### [0.0.11](https://github.com/pahud/cdk-keycloak/compare/v0.0.10...v0.0.11) (2021-01-28)
-
-
-### Features
-
-* make circuit breaker optional ([cdf31d8](https://github.com/pahud/cdk-keycloak/commit/cdf31d806dfaf43139f3f60ec92d77f4596f4ed6))
-* optional node number ([43fa306](https://github.com/pahud/cdk-keycloak/commit/43fa306f0fd92ebb9849b4497f9426a9bc5583b0))
-* support slow start and sticky session ([8571453](https://github.com/pahud/cdk-keycloak/commit/8571453c203a38aa8f4eb65d2306b40063b7b496))
-
-### [0.0.10](https://github.com/pahud/cdk-keycloak/compare/v0.0.9...v0.0.10) (2021-01-28)
-
-### [0.0.9](https://github.com/pahud/cdk-keycloak/compare/v0.0.7...v0.0.9) (2021-01-27)
-
-
-### Features
-
-* bootstrap container support ([#9](https://github.com/pahud/cdk-keycloak/issues/9)) ([b5cf701](https://github.com/pahud/cdk-keycloak/commit/b5cf70180dfb2f3d3dd2840f125af03ba320e67b)), closes [#8](https://github.com/pahud/cdk-keycloak/issues/8)
-
-### [0.0.8](https://github.com/pahud/cdk-keycloak/compare/v0.0.7...v0.0.8) (2021-01-27)
-
-
-### Features
-
-* bootstrap container support ([#9](https://github.com/pahud/cdk-keycloak/issues/9)) ([b5cf701](https://github.com/pahud/cdk-keycloak/commit/b5cf70180dfb2f3d3dd2840f125af03ba320e67b)), closes [#8](https://github.com/pahud/cdk-keycloak/issues/8)
-
-### [0.0.7](https://github.com/pahud/cdk-keycloak/compare/v0.0.6...v0.0.7) (2021-01-27)
-
-### [0.0.6](https://github.com/pahud/cdk-keycloak/compare/v0.0.5...v0.0.6) (2021-01-26)
-
-### [0.0.5](https://github.com/pahud/cdk-keycloak/compare/v0.0.4...v0.0.5) (2021-01-26)
-
-
-### Features
-
-* support ALB. Closes [#1](https://github.com/pahud/cdk-keycloak/issues/1) ([4f9c5d1](https://github.com/pahud/cdk-keycloak/commit/4f9c5d120bf2bf353b6a4aa72481c31701b86fb3))
-
-### [0.0.4](https://github.com/pahud/cdk-keycloak/compare/v0.0.3...v0.0.4) (2021-01-25)
-
-### [0.0.3](https://github.com/pahud/cdk-keycloak/compare/v0.0.2...v0.0.3) (2021-01-25)
-
-
-### Features
-
-* support AwsLogs. Closes: [#2](https://github.com/pahud/cdk-keycloak/issues/2) ([45d5327](https://github.com/pahud/cdk-keycloak/commit/45d53273f929070decdef11e2c5f00ff76d007b5))
-* support ecs task role. Closes [#3](https://github.com/pahud/cdk-keycloak/issues/3) ([cd43c2e](https://github.com/pahud/cdk-keycloak/commit/cd43c2ea9c167f4cf1c4f0b6bafce51153d934c3))
-
-### [0.0.2](https://github.com/pahud/cdk-keycloak/compare/v0.0.1...v0.0.2) (2021-01-25)
-
-### 0.0.1 (2021-01-25)
diff --git a/src/keycloak.ts b/src/keycloak.ts
index ec717f8..dbdefa5 100644
--- a/src/keycloak.ts
+++ b/src/keycloak.ts
@@ -501,7 +501,13 @@ export class ContainerService extends cdk.Construct {
         DB_PORT: '3306',
         DB_USER: 'admin',
         DB_VENDOR: 'mysql',
+        // KEYCLOAK_LOGLEVEL: 'DEBUG',
         JDBC_PARAMS: 'useSSL=false',
+        JGROUPS_DISCOVERY_PROTOCOL: 'JDBC_PING',
+        // We don't need to specify `initialize_sql` string into `JGROUPS_DISCOVERY_PROPERTIES` property,
+        // because the default `initialize_sql` is compatible with MySQL. (See: https://github.com/belaban/JGroups/blob/master/src/org/jgroups/protocols/JDBC_PING.java#L55-L60)
+        // But you need to specify `initialize_sql` for PostgreSQL, because `varbinary` schema is not supported. (See: https://github.com/keycloak/keycloak-containers/blob/d4ce446dde3026f89f66fa86b58c2d0d6132ce4d/docker-compose-examples/keycloak-postgres-jdbc-ping.yml#L49)
+        // JGROUPS_DISCOVERY_PROPERTIES: '',
       }, props.env),
       secrets: {
         DB_PASSWORD: ecs.Secret.fromSecretsManager(props.database.secret, 'password'),
@@ -514,9 +520,12 @@ export class ContainerService extends cdk.Construct {
       }),
     });
     kc.addPortMappings(
-      { containerPort: 8443 },
+      { containerPort: 8443 }, // HTTPS web port
+      { containerPort: 7600 }, // jgroups-tcp
+      { containerPort: 57600 }, // jgroups-tcp-fd
+      { containerPort: 55200, protocol: ecs.Protocol.UDP }, // jgroups-udp
+      { containerPort: 54200, protocol: ecs.Protocol.UDP }, // jgroups-udp-fd
     );
-
     kc.addContainerDependencies({
       container: bootstrap,
       condition: ecs.ContainerDependencyCondition.SUCCESS,
@@ -532,6 +541,11 @@ export class ContainerService extends cdk.Construct {
       desiredCount: props.nodeCount ?? 2,
       healthCheckGracePeriod: cdk.Duration.seconds(120),
     });
+    // we need to allow traffic from the same secret group for keycloak cluster with jdbc_ping
+    this.service.connections.allowFrom(this.service.connections, ec2.Port.tcp(7600), 'kc jgroups-tcp');
+    this.service.connections.allowFrom(this.service.connections, ec2.Port.tcp(57600), 'kc jgroups-tcp-fd');
+    this.service.connections.allowFrom(this.service.connections, ec2.Port.udp(55200), 'kc jgroups-udp');
+    this.service.connections.allowFrom(this.service.connections, ec2.Port.udp(54200), 'kc jgroups-udp-fd');
 
     if (props.autoScaleTask) {
       const minCapacity = props.autoScaleTask.min ?? props.nodeCount ?? 2;
@@ -549,7 +563,7 @@ export class ContainerService extends cdk.Construct {
       vpcSubnets: props.publicSubnets,
       internetFacing: true,
     });
-    printOutput(this, 'EndpointURL', alb.loadBalancerDnsName);
+    printOutput(this, 'EndpointURL', `https://${alb.loadBalancerDnsName}`);
 
     const listener = alb.addListener('HttpsListener', {
       protocol: elbv2.ApplicationProtocol.HTTPS,
diff --git a/version.json b/version.json
deleted file mode 100644
index 2a4b8ee..0000000
--- a/version.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-  "version": "0.2.3"
-}


Test patch:
diff --git a/test/__snapshots__/integ.snapshot.test.ts.snap b/test/__snapshots__/integ.snapshot.test.ts.snap
index 1ed2b91..91f5570 100644
--- a/test/__snapshots__/integ.snapshot.test.ts.snap
+++ b/test/__snapshots__/integ.snapshot.test.ts.snap
@@ -24,9 +24,17 @@ Object {
     },
     "KeyCloakKeyCloakContainerSerivceEndpointURL9C81E19A": Object {
       "Value": Object {
-        "Fn::GetAtt": Array [
-          "KeyCloakKeyCloakContainerSerivceALBE100B67D",
-          "DNSName",
+        "Fn::Join": Array [
+          "",
+          Array [
+            "https://",
+            Object {
+              "Fn::GetAtt": Array [
+                "KeyCloakKeyCloakContainerSerivceALBE100B67D",
+                "DNSName",
+              ],
+            },
+          ],
         ],
       },
     },
@@ -426,6 +434,90 @@ Object {
       },
       "Type": "AWS::EC2::SecurityGroupIngress",
     },
+    "KeyCloakKeyCloakContainerSerivceServiceSecurityGroupfromkeycloakdemoKeyCloakKeyCloakContainerSerivceServiceSecurityGroup4DE99C4F57600A05C613E": Object {
+      "Properties": Object {
+        "Description": "kc jgroups-tcp-fd",
+        "FromPort": 57600,
+        "GroupId": Object {
+          "Fn::GetAtt": Array [
+            "KeyCloakKeyCloakContainerSerivceServiceSecurityGroup4C80023D",
+            "GroupId",
+          ],
+        },
+        "IpProtocol": "tcp",
+        "SourceSecurityGroupId": Object {
+          "Fn::GetAtt": Array [
+            "KeyCloakKeyCloakContainerSerivceServiceSecurityGroup4C80023D",
+            "GroupId",
+          ],
+        },
+        "ToPort": 57600,
+      },
+      "Type": "AWS::EC2::SecurityGroupIngress",
+    },
+    "KeyCloakKeyCloakContainerSerivceServiceSecurityGroupfromkeycloakdemoKeyCloakKeyCloakContainerSerivceServiceSecurityGroup4DE99C4F76000EB755EF": Object {
+      "Properties": Object {
+        "Description": "kc jgroups-tcp",
+        "FromPort": 7600,
+        "GroupId": Object {
+          "Fn::GetAtt": Array [
+            "KeyCloakKeyCloakContainerSerivceServiceSecurityGroup4C80023D",
+            "GroupId",
+          ],
+        },
+        "IpProtocol": "tcp",
+        "SourceSecurityGroupId": Object {
+          "Fn::GetAtt": Array [
+            "KeyCloakKeyCloakContainerSerivceServiceSecurityGroup4C80023D",
+            "GroupId",
+          ],
+        },
+        "ToPort": 7600,
+      },
+      "Type": "AWS::EC2::SecurityGroupIngress",
+    },
+    "KeyCloakKeyCloakContainerSerivceServiceSecurityGroupfromkeycloakdemoKeyCloakKeyCloakContainerSerivceServiceSecurityGroup4DE99C4FUDP5420084C20A28": Object {
+      "Properties": Object {
+        "Description": "kc jgroups-udp-fd",
+        "FromPort": 54200,
+        "GroupId": Object {
+          "Fn::GetAtt": Array [
+            "KeyCloakKeyCloakContainerSerivceServiceSecurityGroup4C80023D",
+            "GroupId",
+          ],
+        },
+        "IpProtocol": "udp",
+        "SourceSecurityGroupId": Object {
+          "Fn::GetAtt": Array [
+            "KeyCloakKeyCloakContainerSerivceServiceSecurityGroup4C80023D",
+            "GroupId",
+          ],
+        },
+        "ToPort": 54200,
+      },
+      "Type": "AWS::EC2::SecurityGroupIngress",
+    },
+    "KeyCloakKeyCloakContainerSerivceServiceSecurityGroupfromkeycloakdemoKeyCloakKeyCloakContainerSerivceServiceSecurityGroup4DE99C4FUDP552001CE4EB13": Object {
+      "Properties": Object {
+        "Description": "kc jgroups-udp",
+        "FromPort": 55200,
+        "GroupId": Object {
+          "Fn::GetAtt": Array [
+            "KeyCloakKeyCloakContainerSerivceServiceSecurityGroup4C80023D",
+            "GroupId",
+          ],
+        },
+        "IpProtocol": "udp",
+        "SourceSecurityGroupId": Object {
+          "Fn::GetAtt": Array [
+            "KeyCloakKeyCloakContainerSerivceServiceSecurityGroup4C80023D",
+            "GroupId",
+          ],
+        },
+        "ToPort": 55200,
+      },
+      "Type": "AWS::EC2::SecurityGroupIngress",
+    },
     "KeyCloakKeyCloakContainerSerivceServiceTaskCountTarget0EDF86B3": Object {
       "Properties": Object {
         "MaxCapacity": 10,
@@ -580,6 +672,10 @@ Object {
                 "Name": "JDBC_PARAMS",
                 "Value": "useSSL=false",
               },
+              Object {
+                "Name": "JGROUPS_DISCOVERY_PROTOCOL",
+                "Value": "JDBC_PING",
+              },
             ],
             "Essential": true,
             "Image": "jboss/keycloak:12.0.4",
@@ -599,6 +695,22 @@ Object {
                 "ContainerPort": 8443,
                 "Protocol": "tcp",
               },
+              Object {
+                "ContainerPort": 7600,
+                "Protocol": "tcp",
+              },
+              Object {
+                "ContainerPort": 57600,
+                "Protocol": "tcp",
+              },
+              Object {
+                "ContainerPort": 55200,
+                "Protocol": "udp",
+              },
+              Object {
+                "ContainerPort": 54200,
+                "Protocol": "udp",
+              },
             ],
             "Secrets": Array [
               Object {
diff --git a/test/cluster.test.ts b/test/cluster.test.ts
index f38c5b9..1afa490 100644
--- a/test/cluster.test.ts
+++ b/test/cluster.test.ts
@@ -282,6 +282,7 @@ test('with env', () => {
 
   // THEN
   expect(stack).toHaveResourceLike('AWS::ECS::TaskDefinition', {
+
     ContainerDefinitions: [
       {
         Command: [
@@ -385,6 +386,10 @@ test('with env', () => {
             Name: 'JDBC_PARAMS',
             Value: 'useSSL=false',
           },
+          {
+            Name: 'JGROUPS_DISCOVERY_PROTOCOL',
+            Value: 'JDBC_PING',
+          },
           {
             Name: 'JAVA_OPTS',
             Value: '-DHelloWorld',
@@ -418,6 +423,22 @@ test('with env', () => {
             ContainerPort: 8443,
             Protocol: 'tcp',
           },
+          {
+            ContainerPort: 7600,
+            Protocol: 'tcp',
+          },
+          {
+            ContainerPort: 57600,
+            Protocol: 'tcp',
+          },
+          {
+            ContainerPort: 55200,
+            Protocol: 'udp',
+          },
+          {
+            ContainerPort: 54200,
+            Protocol: 'udp',
+          },
         ],
         Secrets: [
           {
@@ -465,5 +486,24 @@ test('with env', () => {
         ],
       },
     ],
+    Cpu: '4096',
+    ExecutionRoleArn: {
+      'Fn::GetAtt': [
+        'KeyCloakKeyCloakContainerSerivceTaskRole0658CED2',
+        'Arn',
+      ],
+    },
+    Family: 'testingstackKeyCloakKeyCloakContainerSerivceTaskDef799BAD5B',
+    Memory: '30720',
+    NetworkMode: 'awsvpc',
+    RequiresCompatibilities: [
+      'FARGATE',
+    ],
+    TaskRoleArn: {
+      'Fn::GetAtt': [
+        'KeyCloakKeyCloakContainerSerivceTaskDefTaskRole0DC4D418',
+        'Arn',
+      ],
+    },
   });
 });