Currently the doc r2dbc.md does not specify that the options can be added to the URL. However it can and works.
Example:
r2dbc:gcp:mysql://<DB_USER>:<DB_PASS>@<CLOUD_SQL_CONNECTION_NAME>/<DATABASE_NAME>?TARGET_PRINCIPAL=<IAM_EMAIL>
To make the connection property names match the JDBC ones, we should update GcpConnectionFactoryProvider.java:
- unixSocketPath
- ipTypes
- cloudSqlDelegates
- cloudSqlTargetPrincipal
- enableIamAuth
Also update the doc r2dbc.md.
Note: we need to support both the old options TARGET_PRINCIPAL and the common options cloudSqlTargetPrincipal just in case some customers figured out how to use TARGET_PRINCIPAL in the r2dbc url.
Currently the doc r2dbc.md does not specify that the options can be added to the URL. However it can and works.
Example:
r2dbc:gcp:mysql://<DB_USER>:<DB_PASS>@<CLOUD_SQL_CONNECTION_NAME>/<DATABASE_NAME>?TARGET_PRINCIPAL=<IAM_EMAIL>To make the connection property names match the JDBC ones, we should update GcpConnectionFactoryProvider.java:
Also update the doc r2dbc.md.
Note: we need to support both the old options
TARGET_PRINCIPALand the common optionscloudSqlTargetPrincipaljust in case some customers figured out how to useTARGET_PRINCIPALin the r2dbc url.