Keycloak 20.0.1 Azure webapp and pgsql

Hi, having trouble getting an azure webapp with Keycloak docker image running with pgsql backend. Running fine without pgsql backend, but fails when trying to configure this. Anyone able to tell me what I am doing wrong?

Deploying with terraform and these environmental variables/app settings for pgsql:

KC_DB = "postgres"
KC_DB_URL_DATABASE = "keycloak"
KC_DB_URL_HOST = "mypgsql.postgres.database.azure.com"
KC_DB_URL_PORT             = 5432
KC_DB_URL_PROPERTIES = "?sslmode=require" (tried with and without this setting)
KC_DB_SCHEMA               = "public"
KC_DB_USERNAME = "user"
KC_DB_PASSWORD = "pass"
KC_TRANSACTION_XA_ENABLED = false (tried with and without this setting)

Error I am getting is:

ERROR: URL format error; must be “jdbc:h2:{ {.|mem:}[name] | [file:]fileName | {tcp|ssl}:[//]server[:port][,server2[:port]]/name }[;key=value…]” but is “jdbc:postgresql://mypgsql.postgres.database.azure.com:5432/keycloak” [90046-214]

1 Like