Configure Azure Traffic Manager Endpoints

The azure-native:trafficmanager:Endpoint resource, part of the Pulumi Azure Native provider, defines Traffic Manager endpoints that represent backend targets for DNS-based traffic routing. This guide focuses on three capabilities: Performance routing with endpoint location, geographic and subnet-based routing, and custom headers for health probes.

Endpoints belong to Traffic Manager profiles that define routing methods. The examples reference existing profiles and resource groups. The examples are intentionally small. Combine them with your own Traffic Manager profiles and backend infrastructure.

Route traffic to an external endpoint with location

Global applications route users to the nearest datacenter based on geographic proximity, reducing latency for distributed workloads.

import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const endpoint = new azure_native.trafficmanager.Endpoint("endpoint", {
    endpointLocation: "North Europe",
    endpointName: "azsmnet7187",
    endpointStatus: azure_native.trafficmanager.EndpointStatus.Enabled,
    endpointType: "ExternalEndpoints",
    name: "azsmnet7187",
    profileName: "azsmnet6386",
    resourceGroupName: "azuresdkfornetautoresttrafficmanager1421",
    target: "foobar.contoso.com",
    type: "Microsoft.network/TrafficManagerProfiles/ExternalEndpoints",
});
import pulumi
import pulumi_azure_native as azure_native

endpoint = azure_native.trafficmanager.Endpoint("endpoint",
    endpoint_location="North Europe",
    endpoint_name="azsmnet7187",
    endpoint_status=azure_native.trafficmanager.EndpointStatus.ENABLED,
    endpoint_type="ExternalEndpoints",
    name="azsmnet7187",
    profile_name="azsmnet6386",
    resource_group_name="azuresdkfornetautoresttrafficmanager1421",
    target="foobar.contoso.com",
    type="Microsoft.network/TrafficManagerProfiles/ExternalEndpoints")
package main

import (
	trafficmanager "github.com/pulumi/pulumi-azure-native-sdk/trafficmanager/v3"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := trafficmanager.NewEndpoint(ctx, "endpoint", &trafficmanager.EndpointArgs{
			EndpointLocation:  pulumi.String("North Europe"),
			EndpointName:      pulumi.String("azsmnet7187"),
			EndpointStatus:    pulumi.String(trafficmanager.EndpointStatusEnabled),
			EndpointType:      pulumi.String("ExternalEndpoints"),
			Name:              pulumi.String("azsmnet7187"),
			ProfileName:       pulumi.String("azsmnet6386"),
			ResourceGroupName: pulumi.String("azuresdkfornetautoresttrafficmanager1421"),
			Target:            pulumi.String("foobar.contoso.com"),
			Type:              pulumi.String("Microsoft.network/TrafficManagerProfiles/ExternalEndpoints"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var endpoint = new AzureNative.TrafficManager.Endpoint("endpoint", new()
    {
        EndpointLocation = "North Europe",
        EndpointName = "azsmnet7187",
        EndpointStatus = AzureNative.TrafficManager.EndpointStatus.Enabled,
        EndpointType = "ExternalEndpoints",
        Name = "azsmnet7187",
        ProfileName = "azsmnet6386",
        ResourceGroupName = "azuresdkfornetautoresttrafficmanager1421",
        Target = "foobar.contoso.com",
        Type = "Microsoft.network/TrafficManagerProfiles/ExternalEndpoints",
    });

});
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.trafficmanager.Endpoint;
import com.pulumi.azurenative.trafficmanager.EndpointArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var endpoint = new Endpoint("endpoint", EndpointArgs.builder()
            .endpointLocation("North Europe")
            .endpointName("azsmnet7187")
            .endpointStatus("Enabled")
            .endpointType("ExternalEndpoints")
            .name("azsmnet7187")
            .profileName("azsmnet6386")
            .resourceGroupName("azuresdkfornetautoresttrafficmanager1421")
            .target("foobar.contoso.com")
            .type("Microsoft.network/TrafficManagerProfiles/ExternalEndpoints")
            .build());

    }
}
resources:
  endpoint:
    type: azure-native:trafficmanager:Endpoint
    properties:
      endpointLocation: North Europe
      endpointName: azsmnet7187
      endpointStatus: Enabled
      endpointType: ExternalEndpoints
      name: azsmnet7187
      profileName: azsmnet6386
      resourceGroupName: azuresdkfornetautoresttrafficmanager1421
      target: foobar.contoso.com
      type: Microsoft.network/TrafficManagerProfiles/ExternalEndpoints

When a Traffic Manager profile uses Performance routing, it calculates latency from the user’s DNS resolver to each endpoint. The endpointLocation property tells Traffic Manager where this endpoint physically resides, enabling accurate latency calculations. The target property specifies the DNS name or IP address that Traffic Manager returns to clients.

Map geographic regions to specific endpoints

Applications with data residency requirements or region-specific content route users based on their geographic location rather than network latency.

import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const endpoint = new azure_native.trafficmanager.Endpoint("endpoint", {
    endpointName: "My%20external%20endpoint",
    endpointStatus: azure_native.trafficmanager.EndpointStatus.Enabled,
    endpointType: "ExternalEndpoints",
    geoMapping: [
        "GEO-AS",
        "GEO-AF",
    ],
    name: "My external endpoint",
    profileName: "azuresdkfornetautoresttrafficmanager8224",
    resourceGroupName: "azuresdkfornetautoresttrafficmanager2191",
    target: "foobar.contoso.com",
    type: "Microsoft.network/TrafficManagerProfiles/ExternalEndpoints",
});
import pulumi
import pulumi_azure_native as azure_native

endpoint = azure_native.trafficmanager.Endpoint("endpoint",
    endpoint_name="My%20external%20endpoint",
    endpoint_status=azure_native.trafficmanager.EndpointStatus.ENABLED,
    endpoint_type="ExternalEndpoints",
    geo_mapping=[
        "GEO-AS",
        "GEO-AF",
    ],
    name="My external endpoint",
    profile_name="azuresdkfornetautoresttrafficmanager8224",
    resource_group_name="azuresdkfornetautoresttrafficmanager2191",
    target="foobar.contoso.com",
    type="Microsoft.network/TrafficManagerProfiles/ExternalEndpoints")
package main

import (
	trafficmanager "github.com/pulumi/pulumi-azure-native-sdk/trafficmanager/v3"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := trafficmanager.NewEndpoint(ctx, "endpoint", &trafficmanager.EndpointArgs{
			EndpointName:   pulumi.String("My%20external%20endpoint"),
			EndpointStatus: pulumi.String(trafficmanager.EndpointStatusEnabled),
			EndpointType:   pulumi.String("ExternalEndpoints"),
			GeoMapping: pulumi.StringArray{
				pulumi.String("GEO-AS"),
				pulumi.String("GEO-AF"),
			},
			Name:              pulumi.String("My external endpoint"),
			ProfileName:       pulumi.String("azuresdkfornetautoresttrafficmanager8224"),
			ResourceGroupName: pulumi.String("azuresdkfornetautoresttrafficmanager2191"),
			Target:            pulumi.String("foobar.contoso.com"),
			Type:              pulumi.String("Microsoft.network/TrafficManagerProfiles/ExternalEndpoints"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var endpoint = new AzureNative.TrafficManager.Endpoint("endpoint", new()
    {
        EndpointName = "My%20external%20endpoint",
        EndpointStatus = AzureNative.TrafficManager.EndpointStatus.Enabled,
        EndpointType = "ExternalEndpoints",
        GeoMapping = new[]
        {
            "GEO-AS",
            "GEO-AF",
        },
        Name = "My external endpoint",
        ProfileName = "azuresdkfornetautoresttrafficmanager8224",
        ResourceGroupName = "azuresdkfornetautoresttrafficmanager2191",
        Target = "foobar.contoso.com",
        Type = "Microsoft.network/TrafficManagerProfiles/ExternalEndpoints",
    });

});
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.trafficmanager.Endpoint;
import com.pulumi.azurenative.trafficmanager.EndpointArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var endpoint = new Endpoint("endpoint", EndpointArgs.builder()
            .endpointName("My%20external%20endpoint")
            .endpointStatus("Enabled")
            .endpointType("ExternalEndpoints")
            .geoMapping(            
                "GEO-AS",
                "GEO-AF")
            .name("My external endpoint")
            .profileName("azuresdkfornetautoresttrafficmanager8224")
            .resourceGroupName("azuresdkfornetautoresttrafficmanager2191")
            .target("foobar.contoso.com")
            .type("Microsoft.network/TrafficManagerProfiles/ExternalEndpoints")
            .build());

    }
}
resources:
  endpoint:
    type: azure-native:trafficmanager:Endpoint
    properties:
      endpointName: My%20external%20endpoint
      endpointStatus: Enabled
      endpointType: ExternalEndpoints
      geoMapping:
        - GEO-AS
        - GEO-AF
      name: My external endpoint
      profileName: azuresdkfornetautoresttrafficmanager8224
      resourceGroupName: azuresdkfornetautoresttrafficmanager2191
      target: foobar.contoso.com
      type: Microsoft.network/TrafficManagerProfiles/ExternalEndpoints

The geoMapping property lists geographic codes that map to this endpoint. When a user’s DNS resolver originates from one of these regions, Traffic Manager directs them to this target. Geographic codes follow Traffic Manager’s hierarchy: continents (GEO-AS for Asia, GEO-AF for Africa), countries, and states. This configuration requires a Traffic Manager profile with Geographic routing enabled.

Route traffic based on client IP subnets

Organizations with known client IP ranges can direct traffic based on subnet membership, useful for routing internal users or specific ISPs to dedicated endpoints.

import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const endpoint = new azure_native.trafficmanager.Endpoint("endpoint", {
    endpointName: "My%20external%20endpoint",
    endpointStatus: azure_native.trafficmanager.EndpointStatus.Enabled,
    endpointType: "ExternalEndpoints",
    name: "My external endpoint",
    profileName: "azuresdkfornetautoresttrafficmanager8224",
    resourceGroupName: "azuresdkfornetautoresttrafficmanager2191",
    subnets: [
        {
            first: "1.2.3.0",
            scope: 24,
        },
        {
            first: "25.26.27.28",
            last: "29.30.31.32",
        },
    ],
    target: "foobar.contoso.com",
    type: "Microsoft.network/TrafficManagerProfiles/ExternalEndpoints",
});
import pulumi
import pulumi_azure_native as azure_native

endpoint = azure_native.trafficmanager.Endpoint("endpoint",
    endpoint_name="My%20external%20endpoint",
    endpoint_status=azure_native.trafficmanager.EndpointStatus.ENABLED,
    endpoint_type="ExternalEndpoints",
    name="My external endpoint",
    profile_name="azuresdkfornetautoresttrafficmanager8224",
    resource_group_name="azuresdkfornetautoresttrafficmanager2191",
    subnets=[
        {
            "first": "1.2.3.0",
            "scope": 24,
        },
        {
            "first": "25.26.27.28",
            "last": "29.30.31.32",
        },
    ],
    target="foobar.contoso.com",
    type="Microsoft.network/TrafficManagerProfiles/ExternalEndpoints")
package main

import (
	trafficmanager "github.com/pulumi/pulumi-azure-native-sdk/trafficmanager/v3"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := trafficmanager.NewEndpoint(ctx, "endpoint", &trafficmanager.EndpointArgs{
			EndpointName:      pulumi.String("My%20external%20endpoint"),
			EndpointStatus:    pulumi.String(trafficmanager.EndpointStatusEnabled),
			EndpointType:      pulumi.String("ExternalEndpoints"),
			Name:              pulumi.String("My external endpoint"),
			ProfileName:       pulumi.String("azuresdkfornetautoresttrafficmanager8224"),
			ResourceGroupName: pulumi.String("azuresdkfornetautoresttrafficmanager2191"),
			Subnets: trafficmanager.EndpointPropertiesSubnetsArray{
				&trafficmanager.EndpointPropertiesSubnetsArgs{
					First: pulumi.String("1.2.3.0"),
					Scope: pulumi.Int(24),
				},
				&trafficmanager.EndpointPropertiesSubnetsArgs{
					First: pulumi.String("25.26.27.28"),
					Last:  pulumi.String("29.30.31.32"),
				},
			},
			Target: pulumi.String("foobar.contoso.com"),
			Type:   pulumi.String("Microsoft.network/TrafficManagerProfiles/ExternalEndpoints"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var endpoint = new AzureNative.TrafficManager.Endpoint("endpoint", new()
    {
        EndpointName = "My%20external%20endpoint",
        EndpointStatus = AzureNative.TrafficManager.EndpointStatus.Enabled,
        EndpointType = "ExternalEndpoints",
        Name = "My external endpoint",
        ProfileName = "azuresdkfornetautoresttrafficmanager8224",
        ResourceGroupName = "azuresdkfornetautoresttrafficmanager2191",
        Subnets = new[]
        {
            new AzureNative.TrafficManager.Inputs.EndpointPropertiesSubnetsArgs
            {
                First = "1.2.3.0",
                Scope = 24,
            },
            new AzureNative.TrafficManager.Inputs.EndpointPropertiesSubnetsArgs
            {
                First = "25.26.27.28",
                Last = "29.30.31.32",
            },
        },
        Target = "foobar.contoso.com",
        Type = "Microsoft.network/TrafficManagerProfiles/ExternalEndpoints",
    });

});
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.trafficmanager.Endpoint;
import com.pulumi.azurenative.trafficmanager.EndpointArgs;
import com.pulumi.azurenative.trafficmanager.inputs.EndpointPropertiesSubnetsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var endpoint = new Endpoint("endpoint", EndpointArgs.builder()
            .endpointName("My%20external%20endpoint")
            .endpointStatus("Enabled")
            .endpointType("ExternalEndpoints")
            .name("My external endpoint")
            .profileName("azuresdkfornetautoresttrafficmanager8224")
            .resourceGroupName("azuresdkfornetautoresttrafficmanager2191")
            .subnets(            
                EndpointPropertiesSubnetsArgs.builder()
                    .first("1.2.3.0")
                    .scope(24)
                    .build(),
                EndpointPropertiesSubnetsArgs.builder()
                    .first("25.26.27.28")
                    .last("29.30.31.32")
                    .build())
            .target("foobar.contoso.com")
            .type("Microsoft.network/TrafficManagerProfiles/ExternalEndpoints")
            .build());

    }
}
resources:
  endpoint:
    type: azure-native:trafficmanager:Endpoint
    properties:
      endpointName: My%20external%20endpoint
      endpointStatus: Enabled
      endpointType: ExternalEndpoints
      name: My external endpoint
      profileName: azuresdkfornetautoresttrafficmanager8224
      resourceGroupName: azuresdkfornetautoresttrafficmanager2191
      subnets:
        - first: 1.2.3.0
          scope: 24
        - first: 25.26.27.28
          last: 29.30.31.32
      target: foobar.contoso.com
      type: Microsoft.network/TrafficManagerProfiles/ExternalEndpoints

The subnets property defines IP ranges that map to this endpoint. Each subnet entry can specify a CIDR block (first and scope) or an IP range (first and last). When a DNS query originates from a matching subnet, Traffic Manager returns this endpoint’s target. Subnet routing requires a Traffic Manager profile configured with Subnet routing method.

Add custom headers to health probe requests

Backend services sometimes require specific headers for authentication or routing, and Traffic Manager injects these headers into health probe requests.

import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const endpoint = new azure_native.trafficmanager.Endpoint("endpoint", {
    customHeaders: [
        {
            name: "header-1",
            value: "value-1",
        },
        {
            name: "header-2",
            value: "value-2",
        },
    ],
    endpointLocation: "North Europe",
    endpointName: "azsmnet7187",
    endpointStatus: azure_native.trafficmanager.EndpointStatus.Enabled,
    endpointType: "ExternalEndpoints",
    name: "azsmnet7187",
    profileName: "azsmnet6386",
    resourceGroupName: "azuresdkfornetautoresttrafficmanager1421",
    target: "foobar.contoso.com",
    type: "Microsoft.network/TrafficManagerProfiles/ExternalEndpoints",
});
import pulumi
import pulumi_azure_native as azure_native

endpoint = azure_native.trafficmanager.Endpoint("endpoint",
    custom_headers=[
        {
            "name": "header-1",
            "value": "value-1",
        },
        {
            "name": "header-2",
            "value": "value-2",
        },
    ],
    endpoint_location="North Europe",
    endpoint_name="azsmnet7187",
    endpoint_status=azure_native.trafficmanager.EndpointStatus.ENABLED,
    endpoint_type="ExternalEndpoints",
    name="azsmnet7187",
    profile_name="azsmnet6386",
    resource_group_name="azuresdkfornetautoresttrafficmanager1421",
    target="foobar.contoso.com",
    type="Microsoft.network/TrafficManagerProfiles/ExternalEndpoints")
package main

import (
	trafficmanager "github.com/pulumi/pulumi-azure-native-sdk/trafficmanager/v3"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := trafficmanager.NewEndpoint(ctx, "endpoint", &trafficmanager.EndpointArgs{
			CustomHeaders: trafficmanager.EndpointPropertiesCustomHeadersArray{
				&trafficmanager.EndpointPropertiesCustomHeadersArgs{
					Name:  pulumi.String("header-1"),
					Value: pulumi.String("value-1"),
				},
				&trafficmanager.EndpointPropertiesCustomHeadersArgs{
					Name:  pulumi.String("header-2"),
					Value: pulumi.String("value-2"),
				},
			},
			EndpointLocation:  pulumi.String("North Europe"),
			EndpointName:      pulumi.String("azsmnet7187"),
			EndpointStatus:    pulumi.String(trafficmanager.EndpointStatusEnabled),
			EndpointType:      pulumi.String("ExternalEndpoints"),
			Name:              pulumi.String("azsmnet7187"),
			ProfileName:       pulumi.String("azsmnet6386"),
			ResourceGroupName: pulumi.String("azuresdkfornetautoresttrafficmanager1421"),
			Target:            pulumi.String("foobar.contoso.com"),
			Type:              pulumi.String("Microsoft.network/TrafficManagerProfiles/ExternalEndpoints"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var endpoint = new AzureNative.TrafficManager.Endpoint("endpoint", new()
    {
        CustomHeaders = new[]
        {
            new AzureNative.TrafficManager.Inputs.EndpointPropertiesCustomHeadersArgs
            {
                Name = "header-1",
                Value = "value-1",
            },
            new AzureNative.TrafficManager.Inputs.EndpointPropertiesCustomHeadersArgs
            {
                Name = "header-2",
                Value = "value-2",
            },
        },
        EndpointLocation = "North Europe",
        EndpointName = "azsmnet7187",
        EndpointStatus = AzureNative.TrafficManager.EndpointStatus.Enabled,
        EndpointType = "ExternalEndpoints",
        Name = "azsmnet7187",
        ProfileName = "azsmnet6386",
        ResourceGroupName = "azuresdkfornetautoresttrafficmanager1421",
        Target = "foobar.contoso.com",
        Type = "Microsoft.network/TrafficManagerProfiles/ExternalEndpoints",
    });

});
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.trafficmanager.Endpoint;
import com.pulumi.azurenative.trafficmanager.EndpointArgs;
import com.pulumi.azurenative.trafficmanager.inputs.EndpointPropertiesCustomHeadersArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var endpoint = new Endpoint("endpoint", EndpointArgs.builder()
            .customHeaders(            
                EndpointPropertiesCustomHeadersArgs.builder()
                    .name("header-1")
                    .value("value-1")
                    .build(),
                EndpointPropertiesCustomHeadersArgs.builder()
                    .name("header-2")
                    .value("value-2")
                    .build())
            .endpointLocation("North Europe")
            .endpointName("azsmnet7187")
            .endpointStatus("Enabled")
            .endpointType("ExternalEndpoints")
            .name("azsmnet7187")
            .profileName("azsmnet6386")
            .resourceGroupName("azuresdkfornetautoresttrafficmanager1421")
            .target("foobar.contoso.com")
            .type("Microsoft.network/TrafficManagerProfiles/ExternalEndpoints")
            .build());

    }
}
resources:
  endpoint:
    type: azure-native:trafficmanager:Endpoint
    properties:
      customHeaders:
        - name: header-1
          value: value-1
        - name: header-2
          value: value-2
      endpointLocation: North Europe
      endpointName: azsmnet7187
      endpointStatus: Enabled
      endpointType: ExternalEndpoints
      name: azsmnet7187
      profileName: azsmnet6386
      resourceGroupName: azuresdkfornetautoresttrafficmanager1421
      target: foobar.contoso.com
      type: Microsoft.network/TrafficManagerProfiles/ExternalEndpoints

The customHeaders property defines name-value pairs that Traffic Manager includes in HTTP health probe requests. This allows backends to authenticate probes, route them to specific handlers, or apply custom logic. Each header entry specifies a name and value; Traffic Manager sends these headers with every health check to the target endpoint.

Beyond these examples

These snippets focus on specific endpoint-level features: geographic and subnet-based routing, performance routing with endpoint location, and custom headers for health probes. They’re intentionally minimal rather than full traffic management solutions.

The examples reference pre-existing infrastructure such as Traffic Manager profiles with configured routing methods, resource groups, and external DNS targets or Azure resources. They focus on configuring the endpoint rather than provisioning the profile or backend infrastructure.

To keep things focused, common endpoint patterns are omitted, including:

  • Priority and weight-based routing (priority, weight properties)
  • Nested endpoints and child profile thresholds (minChildEndpoints)
  • Always-serve mode for bypassing health checks (alwaysServe)
  • Azure resource endpoints via targetResourceId

These omissions are intentional: the goal is to illustrate how each endpoint feature is wired, not provide drop-in traffic management modules. See the Traffic Manager Endpoint resource reference for all available configuration options.

Let's configure Azure Traffic Manager Endpoints

Get started with Pulumi Cloud, then follow our quick setup guide to deploy this infrastructure.

Try Pulumi Cloud for FREE

Frequently Asked Questions

Endpoint Configuration & Immutability
What properties can't I change after creating an endpoint?
Four properties are immutable and require resource replacement: endpointName, endpointType, profileName, and resourceGroupName. Plan these values carefully during initial creation.
What's the difference between target and targetResourceId?
Use target for the DNS name or IP address of any endpoint. Use targetResourceId for the Azure Resource URI of Azure endpoints only—it’s not applicable to ExternalEndpoints.
How do I configure nested endpoints?
Set endpointType to NestedEndpoints and use minChildEndpoints, minChildEndpointsIPv4, or minChildEndpointsIPv6 to specify the minimum number of available child endpoints required for the parent profile to be considered available.
Traffic Routing Methods
How do I configure different traffic routing methods?

Configure routing based on your method:

  • Priority - Set priority (1-1000, lower values = higher priority)
  • Weighted - Set weight (1-1000)
  • Geographic - Set geoMapping with country/region codes
  • Subnet - Set subnets with IP ranges
  • Performance - Set endpointLocation for external/nested endpoints
What are the two formats for subnet routing?
You can specify subnets using CIDR notation (first + scope) or IP range (first + last). For example, {first: "1.2.3.0", scope: 24} or {first: "25.26.27.28", last: "29.30.31.32"}.
Why am I getting an error about duplicate priority values?
When using Priority routing, each endpoint must have a unique priority value. No two endpoints can share the same priority value, and if you specify priority on one endpoint, you must specify it on all endpoints.
What geographic codes can I use for geo-routing?
Use codes like GEO-AS (Asia) or GEO-AF (Africa) in the geoMapping array. Consult the Traffic Manager Geographic documentation for the full list of accepted country and region codes.
Health Monitoring
How does endpoint health monitoring work?
When endpointStatus is Enabled, the endpoint is probed for health and included in routing. Set alwaysServe to Enabled to disable health probing and always include the endpoint in routing regardless of health status.
How do I add custom headers to health check probes?
Configure the customHeaders array with name/value pairs. For example, [{name: "header-1", value: "value-1"}, {name: "header-2", value: "value-2"}].

Using a different cloud?

Explore networking guides for other cloud providers: