これはこれまでに回答されている質問のようですが、私は他の回答には運がないので、新しい質問を開きます。サービスアカウントを使用してCloud SQLインスタンスに接続するにはどうすればよいですか?
私はpythonスクリプトを使用してデータベースを作成/設定し、それにcloud_sql_proxyを使用して接続しています。私はcloud_sql_proxyのサービスアカウントの資格情報を提供しない場合、スクリプトは美しく動作しますが、私がしなければ、私はこの取得:とき、私それが正常に動作しますので、それはINSTANCE_CONNECTION_NAMEの問題ではありません
2017/08/18 15:34:12 using credential file for authentication; [email protected]
2017/08/18 15:34:12 Listening on 127.0.0.1:3306 for project:zone:instance
2017/08/18 15:34:12 Ready for new connections
2017/08/18 15:34:12 New connection for "project:zone:instance"
2017/08/18 15:34:13 couldn't connect to "project:zone:instance":
ensure that the account has access to "project:zone:instance"
(and make sure there's no typo in that name).
Error during createEphemeral for project:zone:instance:
googleapi: Error 403: The client is not authorized to make this request., notAuthorized
をサービスアカウントなしでの認証:
2017/08/18 15:38:32 Listening on 127.0.0.1:3306 for project:zone:instance
2017/08/18 15:38:32 Ready for new connections
2017/08/18 15:38:32 New connection for "project:zone:instance"
Connection established.
SQLClient + SQLAdmin、SQLclient + SQLAdmin + ProjectEditorなど、さまざまな種類のサービスアカウントの役割を試しました。
アイデアはありますか?私は困惑している。
サービスアカウントはCloud SQLインスタンスと同じプロジェクトにありますか? – Vadim