Setting up Azure Virtual Network tag filters - Adaptive Applications - BlueCat Gateway - 25.3

Cloud Discovery & Visibility Administration Guide

ft:locale
en-US
Product name
BlueCat Gateway
Version
25.3

When setting up Discovery options for Azure discovery or visibility, you can configure Virtual Network tag filters. These let you exclude Azure Virtual Networks based on the Azure tags associated with them within Microsoft Azure.

Tip: Virtual Network filter options appear at the bottom of the Azure Discovery option settings when configuring discovery or visibility. When setting up a new Discovery, Discovery options are available only when using Advanced setup.

You can edit and assign tags to a network when setting up a Virtual Network in Microsoft Azure. Tags are listed as key/value pairs, such as role:primary (a tag key of role and a value of primary).

Within Cloud Discovery & Visibility (CDV), you specify a list of Microsoft Azure tags and tag values. During Discovery (and Visibility), when CDV encounters a Virtual Network with an Azure tag that matches one of the tag keys and tag values, CDV does not include it in discovery or visibiltiy.

Warning: If you update the Virtual Network Filter for an existing Schedule manager or Visibility manager, the updated filter will apply to subsequent runs of the jobs within those managers. This can cause Virtual Networks to be removed from Address Manager, along with their resources.

Using tag filters in API endpoints

Some CDV API endpoints for Microsoft Azure infrastructures now support the tag_filter field. This field lets you specify a tag filter to apply to Azure Virtual Networks to exclude matching networks from jobs in the Schedule Manager or Visibility manager.

API endpoints that use the tag_filter field:

  • POST azure/discovery
  • PUT /schedule/{schedule_id}/tag-filter
  • PUT /visibility-manager/{visibility_manager_id}/tag-filter

The format of the tag_filter field is as follows:

{
   "private_networks":{
      "exclude_tags":{
         "<Tag key 1>":[
            "<Tag value 1>",
            "<Tag value 2>"
         ],
         "<Tag key 2>":[
            "<Tag value 3>"
         ]
      }
   }
}

Here, tag key 1 and tag key 2 are the tag keys of the tags by which you want to filter. The values tag value 1, tag value 2, and tag value 3 are the values to exclude for their associated tag keys. You can include as many tag keys and tag values as you want.

Note: Within a <Tag key>, if you want to use a backslash character (\) or quotation mark (") in the tag key or value, you must precede it with a backslash character. For example, if you want to exclude networks with a tag key of MusicFolder and a tag value of \jazz, you could use:
{
   "private_networks":{
      "exclude_tags":{
         "MusicFolder":[
            "\\jazz"
         ]
      }
   }
}