Closed calebwoods closed 7 years ago
Hi Caleb,
Check the permissions for the cloudbuild service account on your project. Your script runs as that service account, and that account needs sufficient permissions to call the CloudSQL APIs. To add those permissions:
I realize this isn't documented emphatically enough. I'll try to update the README and other documentation to make this more clear.
Let me know if that doesn't solve it, and we can dig deeper.
Daniel
@calebwoods Did the above IAM fix solve your issue?
@dazuma I ended up solving my problem without using the appengine gem, but I went back and tested and with the IAM change it did seem to get me past that error. Would be great to have that in the README for reference. You can close this issue.
Added more detail to the README. Closing.
A year after this original post and I'm having the same problem. The proposed solution did not help.
I've been trying to use this project run database migrations on an app running in the Google App Engine Ruby environment.
When I run
bundle exec rake appengine:exec -- bundle exec rake db:migrate
, it downloads some images and then runs into this error:I'm not sure how I can debug this is it is a permission issue on my end. I also tried building the cloudbuild.json file manually to test different cases. If I remove the arg
-s
which seems to corrispond to Cloud SQL, then it procceds, but it then fails as it can't connect the DB.If there are other things I can try to debug I'm all ears.