Google Cloud Platform (GCP) Cloud Functions discovery using patterns
Summarize
Summary of Google Cloud Platform (GCP) Cloud Functions discovery using patterns
The Google Cloud Platform (GCP) - Cloud Functions discovery pattern enables ServiceNow customers to automatically discover and map Cloud Functions resources within a GCP deployment during horizontal discovery. This pattern integrates discovered data into the CMDB, allowing visibility into Cloud Functions and their relationships within the GCP environment.
Show less
To use this pattern effectively, customers must meet GCP discovery prerequisites and enable the Cloud Functions pattern, which is disabled by default. Activating or deactivating patterns no longer counts as customization and patterns reset to the latest version after upgrades while retaining activation status.
Key Features
- Resource Discovery: Automatically identifies key GCP resources including Cloud Service Accounts, Availability Zones, Google Datacenters, and Cloud Functions.
- CMDB Population: Discovers and populates detailed attributes for each resource type into corresponding CMDB tables, such as account IDs, datacenter regions, function versions, runtime languages, and operational status.
- Dependency Mapping: Creates CI relationships showing hierarchical and hosting connections between resources, such as Cloud Functions hosted on Datacenters and Cloud Service Accounts.
- Tag Collection: Gathers tags from Cloud Functions and stores them as key-value pairs linked to the Cloud Function CIs, aiding in resource categorization and filtering.
- Visibility: Supports visualization of GCP Cloud Functions and their relationships through Dependency Views, enhancing understanding of resource topology.
What to Expect
By implementing the GCP Cloud Functions discovery pattern, ServiceNow customers gain comprehensive visibility into their serverless functions running on GCP. The discovery process enriches the CMDB with accurate and current data, enabling improved asset management, impact analysis, and operational insight. The dependency mapping aids in understanding resource interdependencies, critical for troubleshooting and change management.
Enabling this pattern ensures continuous updates to discovered data with each discovery run, supporting dynamic GCP environments. Customers can leverage the detailed attributes and tag data to drive automation, compliance, and reporting initiatives effectively.
Discovery and Service Mapping Patterns uses the Google Cloud Platform (GCP) - Cloud Functions pattern to discover Cloud Functions in a Google Cloud Platform (GCP) deployment during horizontal discovery. Discovering some of these resources may require updating to the latest version of the Discovery and Service Mapping Patterns application from the ServiceNow Store.
Pattern-based discovery and mapping requirements
- Verify the GCP discovery prerequisites
- For more information, see the prerequisites section in Google Cloud Platform (GCP) Cloud discovery using Patterns.
- Enable the relevant pattern
- The pattern for this service is disabled by default. Starting with Visibility Content version 6.28.0, activating or deactivating a pattern won't be considered a customization, and it will continue to receive updates. Patterns that were previously activated or deactivated will reset to the latest predefined version after upgrading while retaining the last active field value. For more information on enabling patterns, see Activate a disabled pattern.
Data collected by Discovery during horizontal discovery
Discovery populates the data in the CMDB when running the Google Cloud Platform (GCP) - Cloud Functions pattern.
| Field | Description |
|---|---|
| Account Id [account_id] | Name of the project used for the discovery. |
| Object ID [object_id] | Name of the project used for the discovery. |
| Datacenter Type [datacenter_type] | Datacenter type: Google Datacenter [cmdb_ci_google_datacenter]. |
| Field | Description |
|---|---|
| Name [name] | Name of the availability zone. |
| Description [short_description] | Description of the availability zone. |
| State [state] | State of the Availability Zone. Possible values are Available or Terminated. |
| Field | Description |
|---|---|
| Name [name] | Datacenter or region name. |
| Region [region] | Datacenter or region name. |
| Object ID [object_id] | Unique identifier allocated by GCP for this resource. |
| Description [short_description] | Datacenter or region description. |
| Field | Description |
|---|---|
| Version [version] | Version ID of the function, available only for Gen1 Cloud Functions. |
| Object ID [object_id] | Name fetched from the API response. For example: projects/automation-226410/locations/us-central1/functions/auto-labeller. |
| Name [name] | Name parsed from the API response. For example: auto-labeller. |
| Function Last Modified [function_last_modified] | Timestamp indicating the last time the function was updated. |
| CodeSha256 [codesha256] | SHA-256 hash algorithm of the function's code used to verify the integrity of the build. For example: |
| Language [language] | Runtime environment or programming language used for the function. |
| Install Status [install_status] | Install status of the function. Default value is Installed. |
| Operational status [operational_status] | Operational status of the function. Default value is Operational. |
On the Dependency Views map, you can view all discovered GCP Cloud Functions resources in your organization and the relationships between them.
CI relationships
Discovery creates these relationships to support the GCP Cloud Functions discovery.
| CI | Relationship | CI |
|---|---|---|
| Google Datacenter [cmdb_ci_google_datacenter] | Contains::Contained by | Availability Zone [cmdb_ci_availability_zone] |
| Google Datacenter [cmdb_ci_google_datacenter] | Hosted on::Hosts | Cloud Service Account [cmdb_ci_cloud_service_account] |
| Cloud Function [cmdb_ci_cloud_function] | Hosted on::Hosts | Google Datacenter [cmdb_ci_google_datacenter] |
| Key Value [cmdb_key_value] | References | Cloud Function [cmdb_ci_cloud_function] |
Tag discovery
The Google Cloud Platform (GCP) - Cloud Functions pattern collects tags and populates them in the Key Value [cmdb_key_value] table.
| Field | Description |
|---|---|
| Key [key] | Tag name. |
| Value [value] | Tag value. |
| Configuration item [configuration_item] | References the Cloud Function [cmdb_ci_cloud_function] table. |