'(Terraform, Cloud Run) Error: Forbidden Your client does not have permission to get URL / from this server

I'm trying to run a docker image on Cloud Run with the Terraform code below:

provider "google" {
  credentials = file("myCredentials.json")
  project     = "myproject-214771"
  region      = "asia-northeast1"
}

resource "google_cloud_run_service" "default" {
  name     = "hello-world"
  location = "asia-northeast1"

  template {
    spec {
      containers {
        image = "gcr.io/myproject-214771/hello-world:latest"
      }
    }
  }

  traffic {
    percent         = 100
    latest_revision = true
  }
}

Then, it was successful to run the docker image:

enter image description here

But when I access the URL, it shows this:

enter image description here

Error: Forbidden Your client does not have permission to get URL / from this server

Are there any mistakes in my Terraform code?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source