Error creating RegionNetworkEndpointGroup: googleapi: Error 403: Required 'compute.regionNetworkEndpointGroups.create' permission for 'projects/myproj

On GCP, I'm trying to create a Serverless Network Endpoint Group for Cloud Run with this Terraform code below:

resource "google_compute_region_network_endpoint_group" "cloudrun_neg" {
  name                  = "neg"
  network_endpoint_type = "SERVERLESS"
  region                = "asia-northeast1"
  cloud_run {
    service = google_cloud_run_service.default.name
  }
}

But I got this error below:

Error creating RegionNetworkEndpointGroup: googleapi: Error 403: Required 'compute.regionNetworkEndpointGroups.create' permission for 'projects/myproject-813731/regions/asia-northeast1/networkEndpointGroups/neg', forbidden

So now, I'm trying to add a role to solve this error above but there are too many roles to choose:

enter image description here

What role do I need to choose?

Upvotes: 0

Views: 1035

Answers (1)

You need to choose the role either "Compute Instance Admin (v1)":

enter image description here

Or "Compute Instance Admin (beta)" to create a Serverless Network Endpoint Group for Cloud Run:

enter image description here

In addition, you can choose the more abstract role "Compute Admin" to create a Serverless Network Endpoint Group for Cloud Run:

enter image description here

Upvotes: 2

Related Questions