如何使用 gcloud 对在 GCP 中启用 API 服务进行故障排除
How to troubleshoot enabling API services in GCP using gcloud
执行 terraform apply 时,出现此错误,系统要求我为我的项目启用 IAM API。
Error: Error creating service account: googleapi: Error 403: Identity and Access
Management (IAM) API has not been used in project [PROJECT-NUMBER] before or it is
disabled. Enable it by visiting
https://console.developers.google.com/apis/api/iam.googleapis.com/overview?
project=[PROJECT-NUMBER] then retry. If you enabled this API recently, wait a few
minutes for the action to propagate to our systems and retry.,
accessNotConfigured
当我尝试使用 gcloud 启用它时,服务启用挂起。有什么方法可以获取更多信息吗?
根据Google Dashboard,一切都是绿色的。
我在使用 UI 时也遇到了同样的问题。
$ gcloud services enable iam.googleapis.com container.googleapis.com
错误信息
ERROR: gcloud crashed (WaitException): last_result=True, last_retrial=178, time_passed_ms=1790337,time_to_wait=10000
将 --log-http
添加到(任何)gcloud
命令以获得底层 API 调用的详细日志记录。这些可能会提供有关错误发生位置的更多详细信息。
您可能也希望明确引用该项目:--project=...
。
是否需要启用 IAM?这是一项如此基础的服务,如果不启用它,我很惊讶任何事情都会起作用。
执行 terraform apply 时,出现此错误,系统要求我为我的项目启用 IAM API。
Error: Error creating service account: googleapi: Error 403: Identity and Access
Management (IAM) API has not been used in project [PROJECT-NUMBER] before or it is
disabled. Enable it by visiting
https://console.developers.google.com/apis/api/iam.googleapis.com/overview?
project=[PROJECT-NUMBER] then retry. If you enabled this API recently, wait a few
minutes for the action to propagate to our systems and retry.,
accessNotConfigured
当我尝试使用 gcloud 启用它时,服务启用挂起。有什么方法可以获取更多信息吗?
根据Google Dashboard,一切都是绿色的。
我在使用 UI 时也遇到了同样的问题。
$ gcloud services enable iam.googleapis.com container.googleapis.com
错误信息
ERROR: gcloud crashed (WaitException): last_result=True, last_retrial=178, time_passed_ms=1790337,time_to_wait=10000
将 --log-http
添加到(任何)gcloud
命令以获得底层 API 调用的详细日志记录。这些可能会提供有关错误发生位置的更多详细信息。
您可能也希望明确引用该项目:--project=...
。
是否需要启用 IAM?这是一项如此基础的服务,如果不启用它,我很惊讶任何事情都会起作用。