# Running the Ray on GKE terraform script failed due to principle doesn't exist

**URL:** <https://discuss.ray.io/t/running-the-ray-on-gke-terraform-script-failed-due-to-principle-doesnt-exist/10826>\
**Category:** Kubernetes\
**Created:** [May 29, 2023, 7:32pm UTC](https://discuss.ray.io/t/running-the-ray-on-gke-terraform-script-failed-due-to-principle-doesnt-exist/10826 "2023-05-29T19:32:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mark.c](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@mark.c](https://discuss.ray.io/u/mark.c)\
**Post date:** [May 29, 2023, 7:32pm UTC](https://discuss.ray.io/t/running-the-ray-on-gke-terraform-script-failed-due-to-principle-doesnt-exist/10826/1 "2023-05-29T19:32:32Z")

</div>

I am looking for a guidelines to deploy ray cluster on GKE. I am trying to use the ray-on-gke ([GitHub - richardsliu/ray-on-gke](https://github.com/richardsliu/ray-on-gke)). As suggested modified variables, specified the network, sub-network and google provider’s credential as file(var.gcp\_auth\_file) for which the plan states:

2023-05-29T11:58:00.656-0700 [INFO] provider.terraform-provider-google\_v4.64.0\_x5: Terraform is using this identity: … @module=google tf\_req\_id=fd11fdb4-f31d-9e86-457b-4c3fc3085aa6 tf\_rpc=ConfigureProvider tf\_mux\_provider=\*proto5server.Server tf\_provider\_addr=[Terraform Registry](http://registry.terraform.io/hashicorp/google) timestamp=2023-05-29T11:58:00.655-0700  
2023-05-29T11:58:00.740-0700

but I am getting still the error:

2023-05-29T12:26:39.109-0700 [ERROR] vertex “module.gke\_cluster.google\_container\_cluster.ml\_cluster” error: googleapi: Error 400: Failed precondition: failed to check status for “…”; Verify if principal exists and is valid., failedPrecondition  
╷  
│ Error: googleapi: Error 400: Failed precondition: failed to check status for “…”; Verify if principal exists and is valid., failedPrecondition  
│  
│ with module.gke\_cluster.google\_container\_cluster.ml\_cluster,  
│ on modules/gke\_cluster/main.tf line 21, in resource “google\_container\_cluster” “ml\_cluster”:  
│ 21: resource “google\_container\_cluster” “ml\_cluster” {

---

<div class="post-metadata">

**Author:** ![mark.c](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@mark.c](https://discuss.ray.io/u/mark.c)\
**Post date:** [May 29, 2023, 9:57pm UTC](https://discuss.ray.io/t/running-the-ray-on-gke-terraform-script-failed-due-to-principle-doesnt-exist/10826/2 "2023-05-29T21:57:51Z")

</div>

it looks like adding node\_config as shown below solved the above.

resource “google\_container\_cluster” “ml\_cluster” {  
name = var.cluster\_name  
location = var.region  
network = var.network  
subnetwork = var.subnetwork  
initial\_node\_count = 3  
node\_config {  
service\_account = var.service\_account\_email  
}
