Here’s another way to list projects in a shared VPC.

gcloud compute shared-vpc list-associated-resources your-shared-host

Output:

project1  PROJECT
project2  PROJECT
project3  PROJECT
...