Terraform
Google Cloud Platform
This page provides details on how Google Cloud resources, set up using Terraform, are corresponded to the classes within the ServiceNow CMDB.
Mapping of Terraform resources to CMDB CI Classes
Google resource | Terraform resource name | ServiceNow CMDB CI Class | ServiceNow CMDB Category Name |
---|---|---|---|
Project ID | N/A | cmdb_ci_cloud_service_account | Cloud Service Account |
Region (location) | N/A | cmdb_ci_google_datacenter | Google Datacenter |
Virtual Machine Instance | google_compute_instance | cmdb_ci_vm_instance | Virtual Machine Instance |
Kubernetes Cluster | google_container_cluster | cmdb_ci_kubernetes_cluster | Kubernetes Cluster |
Google Storage | google_storage_bucket | cmdb_ci_cloud_storage_account | Cloud Storage Account |
Google BigQuery | google_bigquery_table | cmdb_ci_cloud_database | Cloud DataBase |
Google SQL | google_sql_database | cmdb_ci_cloud_database | Cloud DataBase |
Google Compute Firewall | google_compute_firewall | cmdb_ci_compute_security_group | Compute Security Group |
Cloud Function | google_cloudfunctions_function or google_cloudfunctions2_function | cmdb_ci_cloud_function | Cloud Function |
Load Balancer | google_compute_forwarding_rule | cmdb_ci_cloud_load_balancer | Cloud Load Balancer |
VPC | google_compute_network | cmdb_ci_network | Cloud Network |
Tags | N/A | cmdb_key_value | Key Value |
Resource relationships
Child CI Class | Relationship type | Parent CI Class |
---|---|---|
Google Datacenter 1 (cmdb_ci_google_datacenter ) | Hosted On::Hosts | Cloud Service Account 4 (cmdb_ci_cloud_service_account ) |
Google Datacenter 2 (cmdb_ci_google_datacenter ) | Hosted On::Hosts | Cloud Service Account 4 (cmdb_ci_cloud_service_account ) |
Virtual Machine Instance 4 (cmdb_ci_vm_instance ) | Hosted On::Hosts | Google Datacenter 1 (cmdb_ci_google_datacenter ) |
Virtual Machine Instance 4 (cmdb_ci_vm_instance ) | Reference | Key Value 13 (cmdb_key_value ) |
Cloud Network 3 (cmdb_ci_network ) | Hosted On::Hosts | Google Datacenter 1 (cmdb_ci_google_datacenter ) |
Cloud Network 3 (cmdb_ci_network ) | Reference | Key Value 18 (cmdb_key_value ) |
Compute Security Group 3 (cmdb_ci_compute_security_group ) | Hosted On::Hosts | Google Datacenter 1 (cmdb_ci_google_datacenter ) |
Compute Security Group 3 (cmdb_ci_compute_security_group ) | Reference | Key Value 21 (cmdb_key_value ) |
Kubernetes Cluster 3 (cmdb_ci_kubernetes_cluster ) | Hosted On::Hosts | Google Datacenter 1 (cmdb_ci_google_datacenter ) |
Kubernetes Cluster 3 (cmdb_ci_kubernetes_cluster ) | Reference | Key Value 22 (cmdb_key_value ) |
Cloud DataBase 3 (cmdb_ci_cloud_database ) | Hosted On::Hosts | Google Datacenter 1 (cmdb_ci_google_datacenter ) |
Cloud DataBase 2 (cmdb_ci_cloud_database ) | Reference | Key Value 24 (cmdb_key_value ) |
Cloud Function 3 (cmdb_ci_cloud_function ) | Hosted On::Hosts | Google Datacenter 1 (cmdb_ci_google_datacenter ) |
Cloud Function 3 (cmdb_ci_cloud_function ) | Reference | Key Value 25 (cmdb_key_value ) |
Cloud Load Balancer 2 (cmdb_ci_cloud_load_balancer ) | Hosted On::Hosts | Google Datacenter 1 (cmdb_ci_google_datacenter ) |
Cloud Load Balancer 2 (cmdb_ci_cloud_load_balancer ) | Reference | Key Value 26 (cmdb_key_value ) |
Cloud Storage Account 2 (cmdb_ci_cloud_storage_account ) | Hosted On::Hosts | Google Datacenter 2 (cmdb_ci_google_datacenter ) |
Cloud Storage Account 2 (cmdb_ci_cloud_storage_account ) | Reference | Key Value 23 (cmdb_key_value ) |
Field attributes mapping
Cloud Service Account (cmdb_ci_cloud_service_account
)
CMDB field | Terraform state field |
---|---|
Source Native Key | project |
Account Id | project |
Datacenter Type | Defaults to google |
Object ID | project |
Name | project |
Operational Status | Defaults to "1" ("Operational") |
Google Datacenter (cmdb_ci_google_datacenter
)
CMDB field | Terraform state field |
---|---|
Source Native Key | Concatenation of project and region extracted from id |
Object Id | Region extracted from id |
Region | Region extracted from id |
Name | Region extracted from id |
Operational Status | Defaults to "1" ("Operational") |
Virtual Machine Instance (cmdb_ci_vm_instance
)
CMDB field | Terraform state field |
---|---|
Source Native Key | id |
Object Id | id |
Name | name |
Category | machine_type |
Operational Status | Defaults to "1" ("Operational") |
Cloud Network (cmdb_ci_network
)
CMDB field | Terraform state field |
---|---|
Source Native Key | id |
Object Id | id |
Name | name |
Operational Status | Defaults to "1" ("Operational") |
Compute Security Group (cmdb_ci_compute_security_group
)
CMDB field | Terraform state field |
---|---|
Source Native Key | id |
Object Id | id |
Name | name |
Operational Status | Defaults to "1" ("Operational") |
Kubernetes Cluster (cmdb_ci_kubernetes_cluster
)
CMDB field | Terraform state field |
---|---|
Source Native Key | arn |
IP Address | endpoint |
Port | Defaults to "6443" |
Name | name |
Operational Status | Defaults to "1" ("Operational") |
Cloud Object Storage (cmdb_ci_cloud_object_storage
)
CMDB field | Terraform state field |
---|---|
Source Native Key | arn |
Object Id | id |
Cloud Provider | Resource cloud provider extracted from arn |
Name | bucket |
Operational Status | Defaults to "1" ("Operational") |
Cloud Storage Account (cmdb_ci_cloud_storage_account
)
CMDB field | Terraform state field |
---|---|
Source Native Key | id |
Object Id | id |
Name | name |
Name | location |
Operational Status | Defaults to "1" ("Operational") |
Cloud DataBase (cmdb_ci_cloud_database
)
CMDB field | Terraform state field |
---|---|
Source Native Key | id |
Object Id | id |
Name | Name extracted from id |
Operational Status | Defaults to "1" ("Operational") |
Cloud Function (cmdb_ci_cloud_function
)
CMDB field | Terraform state field |
---|---|
Source Native Key | id |
Object Id | id |
Name | name |
Operational Status | Defaults to "1" ("Operational") |
Cloud Load Balancer (cmdb_ci_cloud_load_balancer
)
CMDB field | Terraform state field |
---|---|
Source Native Key | id |
Object Id | id |
Name | name |
Operational Status | Defaults to "1" ("Operational") |