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.
One possible reason is you are using a wrong project. You should use your project id, not your project name. Sometimes they are the same, sometimes not. I just met this problem and I think this could be the possible reason, and it will be useful for other people that find this question in the future.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With