Policy types for @turbot/servicenow-gcp-dns

GCP > DNS > Managed Zone > ServiceNow

URI
tmod:@turbot/servicenow-gcp-dns#/policy/types/managedZoneServiceNow
Targets

GCP > DNS > Managed Zone > ServiceNow > Configuration Item

Synchronize the data for the GCP > DNS > Managed Zone based on the policies GCP > DNS > Managed Zone > ServiceNow > Configuration Item > *

The Configuration Item control is responsible for automatically synchronizing records in a designated ServiceNow table, maintaining an up-to-date reflection of the GCP > DNS > Managed Zone information within the ServiceNow CMDB.

URI
tmod:@turbot/servicenow-gcp-dns#/policy/types/managedZoneServiceNowConfigurationItem
Valid Value
[
"Skip",
"Check: Archived",
"Check: Deleted",
"Check: Sync",
"Enforce: Archived",
"Enforce: Deleted",
"Enforce: Sync",
"Enforce: Sync, archive on delete"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Check: Archived",
"Check: Deleted",
"Check: Sync",
"Enforce: Archived",
"Enforce: Deleted",
"Enforce: Sync",
"Enforce: Sync, archive on delete"
],
"example": [
"Skip"
],
"default": "Skip"
}

GCP > DNS > Managed Zone > ServiceNow > Configuration Item > Record

The policy facilitates the accurate representation of cloud resource within the ServiceNow environment, ensuring that critical data is effectively mapped and managed. Attribute of an GCP > DNS > Managed Zone is systematically mapped to a specific column in a ServiceNow table.

The policy allows enabling organizations to select and map only those attributes that are most relevant to their operational needs. It significantly reduces the manual effort involved in data transfer and minimizes the risk of errors, thereby enhancing the overall efficiency of data management.

URI
tmod:@turbot/servicenow-gcp-dns#/policy/types/managedZoneServiceNowConfigurationItemRecord
Default Template Input
"{\n resource: managedZone{\n data\n metadata\n turbot {\n akas\n id\n tags\n title\n }\n }\n}\n"
Default Template
"cloudloggingconfig: {{ $.resource.data.cloudLoggingConfig | dump | safe }}\ncreation_time: {{ $.resource.data.creationTime | dump | safe }}\ndescription: {{ $.resource.data.description | dump | safe }}\ndns_name: {{ $.resource.data.dnsName | dump | safe }}\ndnssec_config: {{ $.resource.data.dnssecConfig | dump | safe }}\nforwarding_config: {{ $.resource.data.forwardingConfig | dump | safe }}\nkind: {{ $.resource.data.kind | dump | safe }}\nlabels: {{ $.resource.data.labels | dump | safe }}\nmanaged_zone_id: {{ $.resource.data.id | dump | safe }}\nmanaged_zone_name: {{ $.resource.data.name | dump | safe }}\nname_server_set: {{ $.resource.data.nameServerSet | dump | safe }}\nname_servers: {{ $.resource.data.nameServers | dump | safe }}\npeering_config: {{ $.resource.data.peeringConfig | dump | safe }}\nprivate_visibility_config: {{ $.resource.data.privateVisibilityConfig | dump | safe }}\nproject_id: {{ $.resource.metadata.gcp.projectId | dump | safe }}\nreverse_lookup_config: {{ $.resource.data.reverseLookupConfig | dump | safe }}\nservice_directory_config: {{ $.resource.data.serviceDirectoryConfig | dump | safe }}\nvisibility: {{ $.resource.data.visibility | dump | safe }}\n"
Schema
{
"type": "object"
}

GCP > DNS > Managed Zone > ServiceNow > Configuration Item > Table Definition

This policy specifically allows users to define two key aspects: the name of the ServiceNow table where the GCP > DNS > Managed Zone data will be stored, and the details of the columns used for archiving purposes.

URI
tmod:@turbot/servicenow-gcp-dns#/policy/types/managedZoneServiceNowConfigurationItemTableDefinition
Default Template Input
[
"{\n serviceNowInstance: resources(filter: \"resourceTypeId:tmod:@turbot/servicenow#/resource/types/instance level:self limit:1\") {\n items {\n turbot {\n id\n }\n }\n }\n}\n",
"{\n tableDefinition: policyValues(filter: \"policyTypeId:tmod:@turbot/servicenow-gcp-dns#/policy/types/managedZoneServiceNowTableDefinition resourceId:{{$.serviceNowInstance.items[0].turbot.id}} level:self\") {\n items {\n value\n }\n }\n applicationScope: policyValues(filter: \"policyTypeId:tmod:@turbot/servicenow#/policy/types/serviceNowApplicationScope resourceId:{{$.serviceNowInstance.items[0].turbot.id}} level:self\") {\n items {\n value\n }\n }\n}\n"
]
Default Template
"tableName: "{%- if $.applicationScope.items | length == 0 or $.tableDefinition.items | length == 0 %} {%- else %}{{$.applicationScope.items[0].value}}_{{$.tableDefinition.items[0].value.table.name | lower}}{% endif %}"\n"
Schema
{
"type": "object",
"additionalProperties": false,
"required": [
"tableName"
],
"properties": {
"tableName": {
"type": "string"
},
"archiveColumns": {
"type": "object"
}
}
}

GCP > DNS > Managed Zone > ServiceNow > Table

Configure a Table for GCP > DNS > Managed Zone resource type in ServiceNow via the GCP > DNS > Managed Zone > ServiceNow > Table > * policies.

URI
tmod:@turbot/servicenow-gcp-dns#/policy/types/managedZoneServiceNowTable
Valid Value
[
"Skip",
"Check: Configured",
"Enforce: Configured"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Check: Configured",
"Enforce: Configured"
],
"example": [
"Skip"
],
"default": "Skip"
}

GCP > DNS > Managed Zone > ServiceNow > Table > Definition

The policy enables the definition of ServiceNow table properties, including its name and the base table from which it extends, and details the specific columns required for representing GCP > DNS > Managed Zone data.

URI
tmod:@turbot/servicenow-gcp-dns#/policy/types/managedZoneServiceNowTableDefinition
Schema
{
"type": "object",
"additionalProperties": false,
"required": [
"table",
"columns"
],
"properties": {
"table": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"pattern": "^([0-9a-z_])+$"
},
"label": {
"type": "string"
},
"extendsTable": {
"type": "string",
"pattern": "^([0-9a-z_])+$"
}
}
},
"columns": {
"type": "array",
"description": "An array of columns with their mappings to the CMDB.",
"default": [],
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the column in the table.",
"pattern": "^([0-9a-z_])+$"
},
"label": {
"type": "string",
"description": "The label for the column."
},
"type": {
"description": "The data type of the column.",
"type": "string"
},
"size": {
"type": "integer",
"description": "The length for data type."
}
}
}
}
},
"default": {
"table": {
"name": "guardrails_gcp_dns_managedzone",
"label": "GCP > DNS > Managed Zone",
"extendsTable": "cmdb_ci"
},
"columns": [
{
"name": "cloudloggingconfig",
"label": "Cloud Logging Config"
},
{
"name": "creation_time",
"label": "Creation Time"
},
{
"name": "description",
"label": "Description"
},
{
"name": "dns_name",
"label": "DNS Name"
},
{
"name": "dnssec_config",
"label": "DNSSEC Config",
"type": "string",
"size": 1000
},
{
"name": "forwarding_config",
"label": "Forwarding Config",
"type": "string",
"size": 1000
},
{
"name": "kind",
"label": "Kind"
},
{
"name": "labels",
"label": "Labels",
"type": "string",
"size": 1000
},
{
"name": "managed_zone_id",
"label": "ID"
},
{
"name": "managed_zone_name",
"label": "Name"
},
{
"name": "name_server_set",
"label": "Name Server Set"
},
{
"name": "name_servers",
"label": "Name Servers",
"type": "string",
"size": 1000
},
{
"name": "peering_config",
"label": "Peering Config",
"type": "string",
"size": 1000
},
{
"name": "private_visibility_config",
"label": "Private Visibility Config",
"type": "string",
"size": 1000
},
{
"name": "project_id",
"label": "Project ID"
},
{
"name": "reverse_lookup_config",
"label": "Reverse Lookup Config"
},
{
"name": "service_directory_config",
"label": "Service Directory Config"
},
{
"name": "visibility",
"label": "Visibility"
}
]
}
}