Tag Synchronization for Business Unit in Azure

Connector Applicability

Applies to Source Connectors

Azure

Applies to Destination Connectors

All

Assumptions

These instructions assume you have already setup a source connection in CI Sync for Azure using the CI Sync instructions here: Add Azure to SaaS Agent

Pre-Read

Syncfish recommend customers read the following documentation before changing the Connection Setting/s described below.

  1. Understanding the use of CI Sync Connection Settings

  2. Rule 13 - Azure Tag Synchronization

  3. FAQ - Overview of Cloud Tag and Label Synchronization Capabilities of CI Sync

Locating and Amending the Connection Setting in the CI Sync UI

  1. Navigate to the Settings page

  2. Under the Source Connections heading (list), locate your Azure connection.

  3. Click the Update link on the right hand side of the Azure connection.

  4. Scroll down and locate the Section Heading and view the Individual Settings.

azure business unit 2.jpg

The screen shot is provided only as sample to assist when reading this page. The state of your own CI Sync UI will depend on whether you are starting from the CI Sync default position or if you have already amended one/more of the settings.

  1. Tick the Override default box/boxes and then use the sliders related to the individual settings. The following table elaborates any further information about these particular settings.

Setting

Type

Additional Notes

Enable for Business Unit

Slider

If enabled, the defined Tags will be synchronized to the discrete business_unit field against each CI in the CMDB.

When enabled, the Business Unit Tag RegEx field will be exposed (see below).

Business Unit Tag RegEx

RegEx

Enter a Regular Expression that matches one or more Tag names in Azure (i.e. one or more Tags that represent the Business Unit associated with the Azure resource).

Example RegEx

/^BusinessUnit$|^Business Unit$|^BusinessUnitLabel$/

RegEx Explained

This RegEx will identify Tags named “BusinessUnit”, “Business Unit” or “BusinessUnitLabel” (i.e. three variations) and sync’d the associated values into ServiceNow.

Sync Behaviour and ServiceNow Data Explained

  1. If there are multiple Tags that match the defined regEx for a field, the value within each Tag will be searched against the ServiceNow business_unit table with the first matching value returned.

  2. If there are multiple values within a given Tag (including multiple Tags), either comma or semi-colon separated, the individual values will be extracted and searched individually against the ServiceNow business_unit table with the first matching value returned.

  3. Once a match is returned, CI Sync will store the sys_id of the business_unit record against the business_unit field on the CI. If no match is found, the business_unit attribute on the CI will be blank.

  4. Regardless of whether a match is found (or not), CI Sync will also populate the ServiceNow cmdb_key_value table with the raw Tag data (i.e. an entry will be created in cmdb_key_value for each Tag and it’s raw value).

Syncfish recommend customers read the following FAQ for more information about the behaviour of Tag (or Label) synchronization into ServiceNow.

FAQ - Overview of Cloud Tag and Label Synchronization Capabilities of CI Sync

Business Unit Value Replacements

RegEx

This setting allows customers to define a search and replace RegEx express that acts on the values read from a given Tag.

Enter a Regular Expression that defines the search string and the replacement value string.

The RegEx format consists of a two element array. The first element is the search RegEx and the second element is the replacement text.

Example RegEx

[['/_/', ' ']]

RegEx Explained

This RegEx will replace “_” characters with space characters. For example: “123_456” will be transformed to “123 456” (without the quotes.. they are just for reference in this documentation)

  1. After modifying the settings, scroll to the bottom of the page, tick the “I consent…” checkbox and finally click the Save connection button.

  2. You can now run a sync job and the amended settings will be applied causing the CI Sync Data Sync rules to be modified accordingly.

Importantly

Make sure you consciously override the setting against either your TEST or PROD environment (i.e. your TEST vs PROD sync jobs).

For more information on how to use TEST vs PROD Connection Settings please read Understanding the use of CI Sync Connection Settings.

Syncfish strongly recommend making changes for TEST environment/sync jobs first. Only modify PROD related settings after thoroughly validating the intended results in TEST.