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 identify and map Cloud Functions within a GCP environment during horizontal discovery. This pattern integrates with the Discovery and Service Mapping Patterns application and requires the latest version for optimal functionality. It supports populating detailed configuration management database (CMDB) records and visualizing resource relationships to enhance visibility and management of serverless functions in GCP.
Show less
Key Features
- Pattern Activation: The GCP Cloud Functions pattern is disabled by default. Starting with Visibility Content version 6.28.0, enabling or disabling patterns does not count as a customization, and patterns reset to the latest version after upgrades while preserving their activation status.
- Prerequisites: Customers must ensure GCP discovery prerequisites are met as outlined in related documentation for Google Cloud Platform Cloud components discovery.
- Data Collection: During discovery, the pattern collects detailed data about Cloud Service Accounts, Availability Zones, Google Datacenters, and Cloud Functions including key attributes like function version, last modified timestamp, runtime language, installation status, and operational status.
- Relationship Mapping: The pattern automatically creates CI relationships such as containment between datacenters and availability zones, hosting relationships between service accounts and cloud functions, and references for tags, providing a comprehensive dependency view within the CMDB.
- Tag Discovery: Tags associated with Cloud Functions are discovered and stored in the Key Value table, linking tag keys and values directly to their respective Cloud Functions for enhanced metadata management.
Key Outcomes
- Enhanced Visibility: Customers gain a clear, visual dependency map of GCP Cloud Functions and related infrastructure components, facilitating better impact analysis and operational understanding.
- Accurate CMDB Data: Comprehensive and up-to-date CMDB records for Cloud Functions and their environment improve asset management, governance, and compliance capabilities.
- Streamlined Management: Automated discovery and relationship mapping reduce manual effort and errors, enabling IT teams to efficiently manage serverless resources within GCP.
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 components 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. |