I am creating a JDBC connection in Glue using secrets for username and password. I can see in the console that username is read correctly from the secret, so that's not a concern. Once I edit the details and enter the password in the console, it becomes valid. Is there something wrong with my approach?
glue.CfnConnection(
self,
id="JDBCConnection",
catalog_id=self.account,
connection_input=glue.CfnConnection.ConnectionInputProperty(
name="jdbc_connection",
connection_type="JDBC",
physical_connection_requirements=glue.CfnConnection.PhysicalConnectionRequirementsProperty(
subnet_id=cdk.Fn.import_value("PrivateSubnet1"),
security_group_id_list=[jdbc_connection_security_group.attr_group_id],
),
connection_properties={
"JDBC_CONNECTION_URL": "jdbc:<JDBC_URL>",
"USERNAME": "{{resolve:secretsmanager:jdbc_username}}",
"PASSWORD": "{{resolve:secretsmanager:jdbc_password}}",
},
),
)