Hi! I'm trying Pulumi in a fresh Google Cloud proj...
# general
Hi! I'm trying Pulumi in a fresh Google Cloud project. I managed to create ServiceAccounts and Networks etc. with
, but when it comes to creating a Cloud SQL Instance
responds with:
Copy code
gcp:sql:DatabaseInstance (db1):
    error: Plan apply failed: Error, failed to create instance db1: googleapi: Error 403: The client is not authorized to make this request., notAuthorized
Any idea why that might be the case? I'm obviously authorized (with my Google Account, role
of the GCP project) via
gcloud auth login
gcloud auth application-default login
Have you enabled the Cloud SQL api for your project? Some of the google services must be enabled first. This is done in the google cloud console.
Thanks @gentle-diamond-70147! This was my first attempt after reading the message, but it did not change anything. I enabled SQL API and the SQL Admin API (just to be sure).
Are you able to manually create a database in the console?
Just checked,
Copy code
$ gcloud sql instances create test-db
 --database-version MYSQL_5_7 --storage-size=100
succeeds and I can see the DB in the GCloud UI.
I suspect some kind of (project) misconfiguration which tends to get badly reported by the Google APIs.
Found the culprit:
seems to need a special format (maybe sth. like
? Pure speculation) Removing it resulted in a working DB 🤦‍♂️ Thanks @gentle-diamond-70147 for your time!
Oh, interesting. That's an unfortunate response from the Google API - not particularly helpful.