Policy types for @turbot/servicenow-azure-aks

Azure > AKS > Managed Cluster > ServiceNow

URI
tmod:@turbot/servicenow-azure-aks#/policy/types/managedClusterServiceNow
Targets

Azure > AKS > Managed Cluster > ServiceNow > Configuration Item

Synchronize the data for the Azure > AKS > Managed Cluster based on the policies Azure > AKS > Managed Cluster > 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 Azure > AKS > Managed Cluster information within the ServiceNow CMDB.

URI
tmod:@turbot/servicenow-azure-aks#/policy/types/managedClusterServiceNowConfigurationItem
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"
}

Azure > AKS > Managed Cluster > 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 Azure > AKS > Managed Cluster 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-azure-aks#/policy/types/managedClusterServiceNowConfigurationItemRecord
Default Template Input
"{\n resource: managedCluster{\n data\n metadata\n turbot {\n akas\n id\n tags\n title\n }\n }\n}\n"
Default Template
"aad_profile: {{ $.resource.data.aadProfile | dump | safe }}\naddon_profiles: {{ $.resource.data.addonProfiles | dump | safe }}\nagent_pool_profiles: {{ $.resource.data.agentPoolProfiles | dump | safe }}\napi_server_access_profile: {{ $.resource.data.apiServerAccessProfile | dump | safe }}\ndns_prefix: {{ $.resource.data.dnsPrefix | dump | safe }}\nenable_rbac: {{ $.resource.data.enableRBAC | dump | safe }}\nid: {{ $.resource.data.id | dump | safe }}\nidentity: {{ $.resource.data.identity | dump | safe }}\nkubernetes_version: {{ $.resource.data.kubernetesVersion | dump | safe }}\nmanaged_cluster_fqdn: {{ $.resource.data.fqdn | dump | safe }}\nmanaged_cluster_location: {{ $.resource.data.location | dump | safe }}\nmanaged_cluster_name: {{ $.resource.data.name | dump | safe }}\nmax_agent_pools: {{ $.resource.data.maxAgentPools | dump | safe }}\nnetwork_profile: {{ $.resource.data.networkProfile | dump | safe }}\nnode_resource_group: {{ $.resource.data.nodeResourceGroup | dump | safe }}\nprovisioning_state: {{ $.resource.data.provisioningState | dump | safe }}\nresource_group: {{ $.resource.metadata.azure.resourceGroupName | dump | safe }}\nservice_principal_profile: {{ $.resource.data.servicePrincipalProfile | dump | safe }}\nsubscription_id: {{ $.resource.metadata.azure.subscriptionId | dump | safe }}\ntags: {{ $.resource.turbot.tags | dump | safe }}\n"
Schema
{
"type": "object"
}

Azure > AKS > Managed Cluster > ServiceNow > Configuration Item > Table Definition

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

URI
tmod:@turbot/servicenow-azure-aks#/policy/types/managedClusterServiceNowConfigurationItemTableDefinition
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-azure-aks#/policy/types/managedClusterServiceNowTableDefinition 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"
}
}
}

Azure > AKS > Managed Cluster > ServiceNow > Table

Configure a Table for Azure > AKS > Managed Cluster resource type in ServiceNow via the Azure > AKS > Managed Cluster > ServiceNow > Table > * policies.

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

Azure > AKS > Managed Cluster > 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 Azure > AKS > Managed Cluster data.

URI
tmod:@turbot/servicenow-azure-aks#/policy/types/managedClusterServiceNowTableDefinition
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_azure_aks_managedcluster",
"label": "Azure > AKS > Managed Cluster",
"extendsTable": "cmdb_ci"
},
"columns": [
{
"name": "aad_profile",
"label": "AAD Profile",
"type": "string",
"size": 1000
},
{
"name": "addon_profiles",
"label": "Addon Profiles",
"type": "string",
"size": 1000
},
{
"name": "agent_pool_profiles",
"label": "Agent Pool Profiles",
"type": "string",
"size": 1000
},
{
"name": "api_server_access_profile",
"label": "API Server Access Profile",
"type": "string",
"size": 1000
},
{
"name": "dns_prefix",
"label": "DNS Prefix"
},
{
"name": "enable_rbac",
"label": "Enable RBAC",
"type": "boolean"
},
{
"name": "id",
"label": "ID"
},
{
"name": "identity",
"label": "Identity",
"type": "string",
"size": 1000
},
{
"name": "kubernetes_version",
"label": "Kubernetes Version"
},
{
"name": "managed_cluster_fqdn",
"label": "FQDN"
},
{
"name": "managed_cluster_location",
"label": "Location"
},
{
"name": "managed_cluster_name",
"label": "Name"
},
{
"name": "max_agent_pools",
"label": "Max Agent Pools"
},
{
"name": "network_profile",
"label": "Network Profile",
"type": "string",
"size": 1000
},
{
"name": "node_resource_group",
"label": "Node Resource Group"
},
{
"name": "provisioning_state",
"label": "Provisioning State"
},
{
"name": "resource_group",
"label": "Resource Group"
},
{
"name": "service_principal_profile",
"label": "Service Principal Profile",
"type": "string",
"size": 1000
},
{
"name": "subscription_id",
"label": "Subscription ID"
},
{
"name": "tags",
"label": "Tags",
"type": "string",
"size": 1000
}
]
}
}