Google Cloud Platform (GCP) Cloud Functions discovery using patterns

  • Release version: Xanadu
  • Updated June 26, 2025
  • 2 minutes to read
  • 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.

    Table 1. Cloud Service Account [cmdb_ci_cloud_service_account]
    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].
    Table 2. Availability Zone [cmdb_ci_availability_zone]
    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.
    Table 3. Google Datacenter [cmdb_ci_google_datacenter]
    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.
    Table 4. Cloud Function [cmdb_ci_cloud_function]
    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: 273a583f-ef1c-49c2-9bae-7d21bf3b5f7a.

    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.

    Figure 1. GCP Cloud Functions dependency view
    GCP Cloud Functions CIs and connections on a Dependency Views map

    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.

    Table 5. Key Value [cmdb_key_value]
    Field Description
    Key [key] Tag name.
    Value [value] Tag value.
    Configuration item [configuration_item] References the Cloud Function [cmdb_ci_cloud_function] table.