Google Django 部署教程中的 App Engine 资源错误

Google App Engine Resource Error on the Django Deployment Tutorial

我一直在寻找部署 Django 应用程序的好方法,我发现 Google App Engine Flex 是一个非常好的解决方案。我在应用程序部署方面没有太多经验,所以我遵循 Official Google Tutorial 关于部署的内容。

在最后一步,教程指示我在 cmd 提示符下部署应用程序:gcloud app deploy

我跟着。一切似乎都很好,直到我收到这条消息:

Updating service [default] (this may take several minutes)...

过了一会儿我收到这条消息:

Updating service [default] (this may take several minutes)...failed.
ERROR: (gcloud.app.deploy) Error Response: [13] Flex operation <stuff..> error [INTERNAL]: An internal error occurred while processing task /app-engine-flex/insert_flex_deployment/flex_create_resources>2020-10-10T07:36:04.734Z7747.ue.0: Deployment Manager operation <stuff..> errors: [code: "RESOURCE_ERROR"
location: "<stuff...>"
message: "{\"ResourceType\":\"compute.beta.regionAutoscaler\",\"ResourceErrorCode\":\"403\",\"ResourceErrorMessage\":{\"code\":403,\"message\":\"The caller does not have permission\",\"status\":\"PERMISSION_DENIED\",\"statusMessage\":\"Forbidden\",\"requestPath\":\"<stuff..>",\"httpMethod\":\"POST\"}}"
]

每次我重新运行命令 gcloud app deploy 时,我都会得到完全相同的错误。知道如何解决这个问题吗? Google 搜索没有为我显示任何内容。

首先尝试为自己授予以下权限。 答案将有助于一些解释。

此外,尝试在您的 .yaml 文件中添加以下内容,看看是否可以解决问题

automatic_scaling:
    min_num_instances: 1
    max_num_instances: 7