添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

I'm new to GCP and currently trying to connect a local project to a Cloud SQL instance, but the proxy tells me that the certificate is invalid. The credentials file was initially generated from a newly created service account that had the Client SQL role; it didn't worked, so I created a new one that has the Cloud SQL Admin role, but the error won't go away. That's what the proxy tells me:

cloudsql-proxy | 2023/02/14 12:06:15 couldn't connect to "<my-project>:southamerica-east1:<my-instance>": x509: certificate is valid for 16-c57c61b2-a060-46c4-b781-ca7113f5f75b.southamerica-east1.sql.goog, not <my-project>:<my-instance>

Now, the description seems clear to me: the current account doesn't have access to the instance; but I couldn't find a way to grant said access. What am I missing?

I am experiencing the same issue. Except I have had several PostgreSQL DBs running for years and I recently created a new one. When deploying the new proxy, it attempts to connect to the new DB and I get the above error. In the proxy connection string, if I change nothing but the DB instance name to an old DB instance, it connects properly. My old DBs nor my new DB do not require SSL.

This means the service account credentials are being applied correctly.

Also, I am able to run the proxy locally and it connects properly.