I have provisioned a shared VPC in Google cloud. I can create a VM in the service project with the shared VPC with my user account (under organization) through the web console without any issue.
However, if I tried to list networks using a service account under the service project (Project:service-project), it returns error.
`$ gcloud compute networks list –uri –project=long-shared-vpc
ERROR: (gcloud.compute.networks.list) Some requests did not succeed:
- Required ‘compute.networks.list’ permission for ‘projects/long-shared-vpc’`
How can I grant my service account (Under service-project) the access to the shared VPC (Host Project:long-shared-vpc) in the host project?
I have tried to look for IAM but looks like there is no option to grant ‘compute.networks.list’ access to other project. What am I missing?
Long Shum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.