Skip to content

Data Source: azurermNetworkServiceTags

Use this data source to access information about Service Tags.

Example Usage

import * as cdktf from "cdktf";
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const dataAzurermNetworkServiceTagsExample =
  new azurerm.dataAzurermNetworkServiceTags.DataAzurermNetworkServiceTags(
    this,
    "example",
    {
      location: "westcentralus",
      location_filter: "northeurope",
      service: "AzureKeyVault",
    }
  );
new cdktf.TerraformOutput(this, "address_prefixes", {
  value: dataAzurermNetworkServiceTagsExample.addressPrefixes,
});
new cdktf.TerraformOutput(this, "ipv4_cidrs", {
  value: dataAzurermNetworkServiceTagsExample.ipv4Cidrs,
});

Arguments Reference

The following arguments are supported:

  • location - (Required) The Azure Region where the Service Tags exists. This value is not used to filter the results but for specifying the region to request. For filtering by region use locationFilter instead. More information can be found here: Service Tags URL parameters.

  • service - (Required) The type of the service for which address prefixes will be fetched. Available service tags can be found here: Available service tags.


  • locationFilter - (Optional) Changes the scope of the service tags. Can be any value that is also valid for location. If this field is empty then all address prefixes are considered instead of only location specific ones.

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

  • id - The ID of this Service Tags block.

  • addressPrefixes - List of address prefixes for the service type (and optionally a specific region).

  • ipv4Cidrs - List of IPv4 addresses for the service type (and optionally a specific region)

  • ipv6Cidrs - List of IPv6 addresses for the service type (and optionally a specific region)

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • read - (Defaults to 5 minutes) Used when retrieving the Service Tags.