Google cloud platform google_cloud_run_服务在创建期间返回HTTP响应404和正文

Google cloud platform google_cloud_run_服务在创建期间返回HTTP响应404和正文,google-cloud-platform,gcloud,google-cloud-run,terraform-provider-gcp,Google Cloud Platform,Gcloud,Google Cloud Run,Terraform Provider Gcp,terraform.tf文件受影响的资源谷歌云运行服务 调试输出文件 预期行为 已创建云运行服务 重要因素ID google_cloud_run_service.skills-online: Creating... Error: Error creating Service: googleapi: got HTTP response code 404 with body: <title>Error 404 (Not Found)!!1</title> <s

terraform.tf文件受影响的资源谷歌云运行服务

调试输出文件

预期行为 已创建云运行服务

重要因素ID

google_cloud_run_service.skills-online: Creating...  
Error: Error creating Service: googleapi: got HTTP response code 404 with body:  
<title>Error 404 (Not Found)!!1</title> <style> *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px} </style>
    404. That’s an error.

    The requested URL /apis/serving.knative.dev/v1/namespaces/skills-online/services was not found on this server. That’s all we know.

    on main.tf line 11, in resource "google_cloud_run_service" "skills-online":
    11: resource "google_cloud_run_service" "skills-online" {
    provider "google" {
      credentials = file("skills-online.json")
      project = "skills-online"
      region = "asia-south1"
    }

    resource "google_project_service" "run" {
      service = "run.googleapis.com"
    }

    resource "google_cloud_run_service" "skills-online" {
      name = "skills-online"
      location = "asia-south1"

      template {
        spec {
          containers {
            image = "gcr.io/skills-online/imagename"
          }
        }
      }

      traffic {
        percent = 100
        latest_revision = true
      }
    }
本期由Ameen Alam
谷歌云运行服务在亚洲南部地区不可用

这就是为什么 “创建服务时出错:googleapi:获取了包含正文的HTTP响应代码404:” 正在创建google_cloud_run_服务期间发生

根据此列表,我更改了代码中的区域

我选择了亚洲东部(台湾)地区

错误已被解决

关闭此问题

你在你的问题中找到了答案!!!
    image = "gcr.io/skills-online/imagename"
    image = "gcr.io/skills-online/---------------"
due to security reason, I wrote the name of the image as a dummy