Empty Whale
Empty Whale

Reputation: 43

How can I connect Airflow Cloud Composer to Cloud SQL using Private IP?

I'm attempting to connect to a Potgres database running in Cloud SQL, and I have enabled Private IP as shown below with the "Default" settings. I have also added the IP addresses of this Cloud SQL instance as connections into the Airflow instance on Google Cloud Composer. Note I have also set up the Cloud Composer instance with private networking, and the same "Default" options as I did on the Cloud SQL instance when setting it to use Private IP.

I can test connect fine in the connections tab, however I can't run any queries since it says I don't have the correct permissions when I attempt a DAG run. Am I connecting in the correct way, or have I missed a step in connecting to a network in this way?

Google Cloud SQL showing default Private IP settings

Upvotes: 0

Views: 625

Answers (1)

Empty Whale
Empty Whale

Reputation: 43

This was solved after correcting database permissions, after help from fellow users above

Upvotes: 0

Related Questions