It didn't work for me, because the problem wasn't using the secret but rather making the Glue Data Connection endpoint that was supposed to use AWS Secrets.
To do this you need to pass "SECRET_ID":
resource "aws_glue_connection" "my_connection" {
connection_properties = {
JDBC_CONNECTION_URL = "jdbc:..."
SECRET_ID = aws_secretsmanager_secret.glue_data_connection_credentials.name
Terraform v1.9.4
AWS Provider v5.85.0