Connect my app to a Google Cloud SQL

383 Views Asked by At

I want to make an app with App Maker with a model based in Google Cloud SQL, I have read that I have to create the instance in the first generation in the us- central, but when I try to create it, I have the following error: "The apps GAE authorized must be in the same region than the database instance" SO I can´t create the instance, what can I do?

1

There are 1 best solutions below

0
On

I was able to replicate the error which is caused whenever you select: Show advanced options > [Preferred location] > Follow App Engine app > App Engine application ID

Currently you can override this by selecting “No Preference” instead of “Follow App Engine app” under the [Preferred location] option and you should not get the error.

Note that the “Preferred location” setting is used to store your data close to Compute Engine or App Engine services hosted within a particular region. As per this Article https://cloud.google.com/sql/faq#location if you are connecting to a First Generation instance, your App Engine application must be in the same region as your Cloud SQLinstance and this is the reason why are getting the error. It seems you need to use us-central since App Maker is hosted in this region. AFAIK, I don’t think there is any other workaround for 1st gen instances.

If you are connecting to a Second Generation instance, your App Engine does not need to be in the same region, and it can be running in either the standard or the flexible environment.”

Base on the above, I believe the region restriction does not apply to 2nd generation instances which are going to be supported/available for App Maker in the future. I just tried connecting App Maker to a 2nd Generation instance and I was able to connect successfully!!!! There is no official update yet regarding the 2nd Generation for App Maker but it seems that its is now being implemented and working. Let me know if you are still having trouble connecting to a 1st or 2nd generation instance and I can create a quick guide and share it to you. Hope this helps.