When automating deployments with Firebase App Hosting, directly specifying Cloud SQL connections in apphosting.yaml is not the standard approach. I'd recommend deploying the Cloud SQL Proxy alongside your application.
If the Cloud SQL instance is of type Postgres - you can use Firebase Data Connect https://firebase.google.com/docs/data-connect/manage-services-and-databases