[英]Google developer console API Key
我正在嘗試在谷歌應用引擎上部署 flask 應用。 該應用程序將通過石墨烯 Graphql API 從雲 SQL Postgres 數據庫中查詢和返回數據。 連接 Postgres 的數據庫密碼存儲在 Google Secret Manager 中。 我已將應用程序部署到默認環境,但在日志中出現此錯誤:
2022-08-22 19:39:12 default[20220822t100002] description: "Google developer console API key"
2022-08-22 19:39:12 default[20220822t100002] url:
"https://console.developers.google.com/project/<my-project>/apiui/credential"
2022-08-22 19:39:12 default[20220822t100002] }
2022-08-22 19:39:12 default[20220822t100002] , reason: "CONSUMER_INVALID"
2022-08-22 19:39:12 default[20220822t100002] domain: "googleapis.com"
2022-08-22 19:39:12 default[20220822t100002] metadata {
2022-08-22 19:39:12 default[20220822t100002] key: "service"
2022-08-22 19:39:12 default[20220822t100002] value: "secretmanager.googleapis.com"
2022-08-22 19:39:12 default[20220822t100002] }
0220822t100002] [2022-08-22 0220822t100002] metadata {
0220822t100002] [2022-08-22 19:39:13 +0000] [11] [INFO] Shutting down: Master
2022-08-22 19:39:13 default[20220822t100002] [2022-08-22 19:39:13 +0000] [11] [INFO]
Reason: Worker failed to boot.
我嘗試關注 url 以希望了解更多信息,但從谷歌控制台收到“加載失敗錯誤”和一條消息:
There was an error while loading /apis/dashboard?project=<my-project>. Please try again.
Request ID: ###########
我認為需要為帳戶分配一些 IAM 角色才能正確使用應用引擎中的 Secret Manager? 以前有沒有其他人遇到過這種類型的錯誤,並且可以就我應該在哪里解決問題提供指導?
經過進一步挖掘,我發現對這個錯誤的引用是項目 id 不正確的結果。 事實證明,我將項目名稱寫為my_project
而實際上項目 id 是my-project
。 那個更正解決了這個問題。
對於將來發現此問題的其他任何人:檢查您使用的項目 ID 是否正確!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.