Jan Walraven
DevOps



Categories:
  • Arduino (2)
  • CSS (3)
  • Docker (10)
  • ESXi (1)
  • Git (4)
  • Google Cloud (2)
  • Javascript (6)
  • Kubernetes (1)
  • Linux (31)
  • Mac (6)
  • Magento (4)
  • Mysql (13)
  • PHP (9)
  • Uncategorized (1)
  • Zend framework 2 (9)
  • Posted on May 8, 2019

    It’s possible to connect the Google Cloud SQL proxy to another projects Cloud SQL instance.

    Google Project Configuration

    Project A

    1. Google Cloud SQL instance.
    2. IAM role roles/cloudsql.client for the service account from project B sql-proxy@project-b.iam.gserviceaccount.com

    Project B

    1. Activate API Cloud SQL Admin API
    2. Service account sql-proxy@project-b.iam.gserviceaccount.com
    3. VM instance running on the service account sql-proxy@project-b.iam.gserviceaccount.com

    VM instance config

    
    $ wget https://dl.google.com/cloudsql/cloud_sql_proxy.linux.amd64 -O cloud_sql_proxy
    $ chmod +x cloud_sql_proxy
    $ ./cloud_sql_proxy -instances=project-a:region:mysql-instance-name=tcp:3306