GCP Spanner pattern-based discovery

  • Release version: Yokohama
  • Updated January 11, 2025
  • 2 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of GCP Spanner pattern-based discovery

    The GCP Spanner pattern-based discovery enables ServiceNow customers to automatically find and map Google Cloud Spanner instances and databases within their cloud environments. This discovery process populates the Configuration Management Database (CMDB) with detailed information about Spanner resources, supporting better visibility and management of cloud assets.

    Show full answer Show less

    To use this pattern effectively, customers should ensure they meet the GCP discovery prerequisites and consider updating to the latest Discovery and Service Mapping Patterns application from the ServiceNow Store.

    Data Collected and CMDB Population

    The discovery gathers and populates key data into various CMDB tables, including:

    • Cloud Service Account: Captures project account ID, object ID, and datacenter type.
    • Availability Zone: Stores availability zone name, description, and state (Available or Terminated).
    • Google Datacenter: Includes datacenter/region name, region, unique GCP identifier, and description.
    • Cloud Database (Spanner instance): Records full resource name, display name, install and operational status, state, type, node count, processing units, and fully qualified domain name.
    • Database: Contains the name, type, and install status of individual Spanner databases.

    Configuration Item (CI) Relationships

    The discovery establishes important relationships among CIs to represent the cloud infrastructure accurately:

    • Google Datacenter contains Availability Zones.
    • Availability Zones are contained by Google Datacenters.
    • Google Datacenters host Cloud Service Accounts.
    • Cloud Databases contain Databases.
    • Cloud Databases are hosted on Google Datacenters.
    • Cloud Databases replicate to Google Datacenters.
    • Key Value entries reference Cloud Databases.

    GCP Tag Discovery

    Tags associated with Spanner instances are collected and stored in the Key Value table. Each tag’s name and value are linked back to the respective Cloud Database CI, enabling enhanced tagging-based filtering and reporting.

    Discovery and Service Mapping Patterns finds GCP Spanner instances and databases on your cloud environment. 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 section in Google Cloud Platform (GCP) Cloud components discovery using Patterns.

    Data collected by Discovery during horizontal discovery

    Discovery populates the data in the CMDB when running the Google Cloud Platform (GCP) - Spanner DB 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 DataBase [cmdb_ci_cloud_database]
    Field Description
    Object ID [object_id] The full resource name of the Spanner instance.
    Name [name] The display name of the Spanner instance.
    Install Status [install_status] Install status of the resource. Default value is Installed.
    Operational status [operational_status] Operational status of the resource. Default value is Operational.
    State [state] The state of the Spanner instance.
    Type [type] The type of cloud database resource.
    Node Count [node_count] The number of nodes allocated to the Spanner instance.
    Processing Units [processing_units] The number of processing units allocated to the Spanner instance.
    Fully qualified domain name [fqdn] The fully qualified domain name (FQDN) for the Spanner instance.
    Table 5. Database [cmdb_ci_database]
    Field Description
    Name [name] The name of the Spanner database.
    Type [type] The type of database.
    Install Status [install_status] Install status of the resource. Default value is Installed.

    CI relationships

    The Google Cloud Platform (GCP) - Spanner DB pattern creates these relationships to support GCP Spanner 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 DataBase [cmdb_ci_cloud_database] Contains::Contained by Database [cmdb_ci_database]
    Cloud DataBase [cmdb_ci_cloud_database] Hosted on::Hosts Google Datacenter [cmdb_ci_google_datacenter]
    Cloud DataBase [cmdb_ci_cloud_database] Replicates to::Replicated by Google Datacenter [cmdb_ci_google_datacenter]
    Key Value [cmdb_key_value] References Cloud DataBase [cmdb_ci_cloud_database]

    GCP Tag discovery

    The Google Cloud Platform (GCP) - Spanner DB pattern collects tags and populates them in the Key Value [cmdb_key_value] table.

    Table 6. Key Value [cmdb_key_value]
    Field Description
    Key [key] Tag name.
    Value [value] Tag value.
    Configuration item [configuration_item] References the Cloud DataBase [cmdb_ci_cloud_database] table.