Not sure why this is happening... but Spring is creating a new connection to my CloudSQL database every few seconds when there is no traffic to the application.
When I connect to the CloudSQL (PostgreSQL) instance using the ip address and spring.datasource.url=jdbc:postgresql://<IP_ADDRESS>:5432/<DB_NAME>
there are no logs in the console. I'm not sure if this means the error is not occuring when using just a standard jdbc url.
After more monitoring of the DB and closer inspection of the docs, found out that CloudSQL PostgreSQL allows a much lower number of connections. 50 instead of 1000 for MySQL with the same instance tier.
Each Spring Boot app with Data JPA spins up 10 connection pools by default. I had 5 microservices connected to that DB and it reached it's limit.
After reviewing the output logs from before, realised that the logs were being output every 30mins or so. I'm assuming this is data jpa keeping connections alive. Monitoring Cloud SQL (MySQL) with MySQL Workbench shows that the library does not result in maxing out connections for MySQL.
If anyone is interested they can view the github issue here: https://github.com/spring-cloud/spring-cloud-gcp/issues/1967
Please note that it wasn't an issue with their library. The library is fine.