GCPEnhanced is a custom open-sourced app that allows you to expand ServiceNow’s out-of-the-box cloud discovery capabilities. The app provides extended clarity into the resources within your Google Cloud Platform, allowing for more complete Service Maps and Visibility. It enables organizations to gain better visibility into their Google platform by targeting specific resources: Storage Buckets, Load Balancers, Pub/Sub Topics, and Cloud Functions. Resources are stored in an OOTB table called Cloud Resources and categorized in a Resource Type field.
Behind the scenes, GCPEnhanced leverages the OOTB pattern - “Google Cloud Platform (GCP) - Logical Datacenters.” It extends the pattern in an extension section called “Extra GCP Resources.” This extension section calls different shared libraries, each responsible for discovering the various resources. The shared libraries work independently by making separate API calls to Google for the particular resource.
After making a successful API call, the library parses the JSON response and extracts the values into the Cloud Resource Table. Then, a custom EVAL script parses the API response again and targets any associated labels to these resources.
For Storage Buckets, the Eval script loops through each Storage Bucket in the response and checks if it has any labels. If it does, the script creates a row in the storageBucketLabels table, which later generates tags in the cmdb_key_value table.
Each resource is then linked to a Datacenter if it has a region or a Project Folder if no region is associated with the resource. Everything the app discovers can be found in the Cloud Resources table.