I am trying to create a docker swarm node on a VM instance on GCP using docker-machine.
docker-machine create swarm-node -d google --google-machine-type e2-standard-2 --google-zone europe-north1-a --google-project myproject-name
I use a GCP Service Account in localhost docker-machine CLI.
export GOOGLE_APPLICATION_CREDENTIALS="/home/my-name-here/.gcp/path-to-my-service-account-keyfile.json"
But I got this error:
Error with pre-create check: "Project with ID \"myproject-name\" not found. googleapi: Error 403: Required 'compute.projects.get' permission for 'projects/myproject-name', forbidden"
How can I add compute.projects.get GCP IAM access to the GCP Service Account?
Finally I figured out, as explained at: https://cloud.google.com/iam/docs/granting-changing-revoking-access
Compute AdminEt voilà
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