Error: permission denied on resource project when launching Dataproc cluster

Viewed 11036

I was successfully able to launch a dataproc cluster by manually creating one via gcloud dataproc clusters create.... However, when I try to launch one through a script (that automatically provisions and stops clusters), it says ERROR: (gcloud.dataproc.clusters.create) PERMISSION_DENIED: Permission denied on resource project hail-test-project (#0). I don't understand why, because the script uses the same command.

2 Answers

It sounds like the script might be running as a different user than when you run gcloud dataproc clusters create... manually. gcloud uses your home directory for configuration, so the body of your script will be dependent on the user it runs as.

Related