Google Cloud Organization help

Hi,  Our company has setup an organization and there are about 30 or so projects under it.  Someone asked me if I could find out what region each projects resources are.  No idea why, but so far I can't figure out how to do this.  I've only been using the console, I thought maybe billing but don't see anyway there.  I am happy to do it via console or gcloud but I could definitely use a point in the right direction seeing as I've just ben google certified and now my boss is asking me for practical use - unforunately didn't get to do much with organizations in the free google account.  Thanks for any advice at all.
  • post-author-pic
    Broadus P
    11-15-2018

    Hey William,

    You should be able to go to your organization through the console and up top be able to see all projects attached the organization in the drop down

  • post-author-pic
    Broadus P
    11-15-2018

    So you can go to the console.

    Select Organization from the drop down above.
    Select projects and "View More Projects" 
    then you should see all projects attached to that organization 

  • post-author-pic
    William D
    11-15-2018

    Thanks,  I know how to view all the projects, billing works well for that also, and exporting the billing info to S3 or Bigquery gives me a lot of good info, but what my manager was looking for was a way to see which region resources (VMs) are located in.  I have no idea why at this point, and from what research I have done, the billing export is about as close as I got to it...  

  • post-author-pic
    Joseph L
    11-16-2018

    From the console, go to Compute Engine > Zones. There you'll see a full list of the regions broken down by zone. The zones will list the number of instances and disks in each one. AFAIK, there's no way to just show what you have - tho, that'd be super handy - so you just need to scan the list. Does that give you what you need?

  • post-author-pic
    William D
    11-16-2018

    Thanks, thats very useful!  Only issue is you have to go into each project - I think they are looking for a single pane of glass for the whole organization and all the projects underneat.  I don't think that works does it?  Or maybe I need another permission?  When I go to the console and just my oranization before a project is seleted it says I don't have permissions, but I am super admin on the organization so I am just assuming that a project has to be selected?  Didn't get a lot of experniece with Organizations until now as I was just using my free personal account.  Thanks again for the advice... if this is how it works I can probably pull info with the cli and iterate over the accounts and use powerbi or something to build them a dashboard.

  • post-author-pic
    Ben L
    11-16-2018

    Hey William, there's a fairly new API (Cloud Asset API) that may help. However, I've not yet tested it. The data may require some additional querying / transformation to get just the specifics you need. 


    Here's Google's blog post talking about it: 

    https://cloud.google.com/blog/products/gcp/gain-insights-about-your-gcp-resources-with-asset-inventory


    https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/reference/rest/


    I hope this gets you a bit closer to the data you're looking for! :)


    --Ben

  • post-author-pic
    William D
    11-16-2018

    Hey, that sounds REALLY interesting - one of the goals of my current project is asset/inventory and plugging it all into CMDB,   I will have  a look - pulling info using gcloud per project -

     gcloud computer regions list
    actually gives me pretty much all I need and I can just iterate over the projects and then pull the data into power bi and give them a dashboard.  Made a lot of progress today, thanks for all the helpful advice, its great!

Looking For Team Training?

Learn More