1. Packages
  2. Packages
  3. Azure Classic
  4. API Docs
  5. network
  6. ExpressRouteConnection

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Manages an Express Route Connection.

    NOTE: The provider status of the Express Route Circuit must be set as provisioned while creating the Express Route Connection. See more details here.

    Example Usage

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
            {
                Location = "West Europe",
            });
            var exampleVirtualWan = new Azure.Network.VirtualWan("exampleVirtualWan", new Azure.Network.VirtualWanArgs
            {
                ResourceGroupName = exampleResourceGroup.Name,
                Location = exampleResourceGroup.Location,
            });
            var exampleVirtualHub = new Azure.Network.VirtualHub("exampleVirtualHub", new Azure.Network.VirtualHubArgs
            {
                ResourceGroupName = exampleResourceGroup.Name,
                Location = exampleResourceGroup.Location,
                VirtualWanId = exampleVirtualWan.Id,
                AddressPrefix = "10.0.1.0/24",
            });
            var exampleExpressRouteGateway = new Azure.Network.ExpressRouteGateway("exampleExpressRouteGateway", new Azure.Network.ExpressRouteGatewayArgs
            {
                ResourceGroupName = exampleResourceGroup.Name,
                Location = exampleResourceGroup.Location,
                VirtualHubId = exampleVirtualHub.Id,
                ScaleUnits = 1,
            });
            var exampleExpressRoutePort = new Azure.Network.ExpressRoutePort("exampleExpressRoutePort", new Azure.Network.ExpressRoutePortArgs
            {
                ResourceGroupName = exampleResourceGroup.Name,
                Location = exampleResourceGroup.Location,
                PeeringLocation = "Equinix-Seattle-SE2",
                BandwidthInGbps = 10,
                Encapsulation = "Dot1Q",
            });
            var exampleExpressRouteCircuit = new Azure.Network.ExpressRouteCircuit("exampleExpressRouteCircuit", new Azure.Network.ExpressRouteCircuitArgs
            {
                Location = exampleResourceGroup.Location,
                ResourceGroupName = exampleResourceGroup.Name,
                ExpressRoutePortId = exampleExpressRoutePort.Id,
                BandwidthInGbps = 5,
                Sku = new Azure.Network.Inputs.ExpressRouteCircuitSkuArgs
                {
                    Tier = "Standard",
                    Family = "MeteredData",
                },
            });
            var exampleExpressRouteCircuitPeering = new Azure.Network.ExpressRouteCircuitPeering("exampleExpressRouteCircuitPeering", new Azure.Network.ExpressRouteCircuitPeeringArgs
            {
                PeeringType = "AzurePrivatePeering",
                ExpressRouteCircuitName = exampleExpressRouteCircuit.Name,
                ResourceGroupName = exampleResourceGroup.Name,
                SharedKey = "ItsASecret",
                PeerAsn = 100,
                PrimaryPeerAddressPrefix = "192.168.1.0/30",
                SecondaryPeerAddressPrefix = "192.168.2.0/30",
                VlanId = 100,
            });
            var exampleExpressRouteConnection = new Azure.Network.ExpressRouteConnection("exampleExpressRouteConnection", new Azure.Network.ExpressRouteConnectionArgs
            {
                ExpressRouteGatewayId = exampleExpressRouteGateway.Id,
                ExpressRouteCircuitPeeringId = exampleExpressRouteCircuitPeering.Id,
            });
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/network"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleVirtualWan, err := network.NewVirtualWan(ctx, "exampleVirtualWan", &network.VirtualWanArgs{
    			ResourceGroupName: exampleResourceGroup.Name,
    			Location:          exampleResourceGroup.Location,
    		})
    		if err != nil {
    			return err
    		}
    		exampleVirtualHub, err := network.NewVirtualHub(ctx, "exampleVirtualHub", &network.VirtualHubArgs{
    			ResourceGroupName: exampleResourceGroup.Name,
    			Location:          exampleResourceGroup.Location,
    			VirtualWanId:      exampleVirtualWan.ID(),
    			AddressPrefix:     pulumi.String("10.0.1.0/24"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleExpressRouteGateway, err := network.NewExpressRouteGateway(ctx, "exampleExpressRouteGateway", &network.ExpressRouteGatewayArgs{
    			ResourceGroupName: exampleResourceGroup.Name,
    			Location:          exampleResourceGroup.Location,
    			VirtualHubId:      exampleVirtualHub.ID(),
    			ScaleUnits:        pulumi.Int(1),
    		})
    		if err != nil {
    			return err
    		}
    		exampleExpressRoutePort, err := network.NewExpressRoutePort(ctx, "exampleExpressRoutePort", &network.ExpressRoutePortArgs{
    			ResourceGroupName: exampleResourceGroup.Name,
    			Location:          exampleResourceGroup.Location,
    			PeeringLocation:   pulumi.String("Equinix-Seattle-SE2"),
    			BandwidthInGbps:   pulumi.Int(10),
    			Encapsulation:     pulumi.String("Dot1Q"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleExpressRouteCircuit, err := network.NewExpressRouteCircuit(ctx, "exampleExpressRouteCircuit", &network.ExpressRouteCircuitArgs{
    			Location:           exampleResourceGroup.Location,
    			ResourceGroupName:  exampleResourceGroup.Name,
    			ExpressRoutePortId: exampleExpressRoutePort.ID(),
    			BandwidthInGbps:    pulumi.Float64(5),
    			Sku: &network.ExpressRouteCircuitSkuArgs{
    				Tier:   pulumi.String("Standard"),
    				Family: pulumi.String("MeteredData"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleExpressRouteCircuitPeering, err := network.NewExpressRouteCircuitPeering(ctx, "exampleExpressRouteCircuitPeering", &network.ExpressRouteCircuitPeeringArgs{
    			PeeringType:                pulumi.String("AzurePrivatePeering"),
    			ExpressRouteCircuitName:    exampleExpressRouteCircuit.Name,
    			ResourceGroupName:          exampleResourceGroup.Name,
    			SharedKey:                  pulumi.String("ItsASecret"),
    			PeerAsn:                    pulumi.Int(100),
    			PrimaryPeerAddressPrefix:   pulumi.String("192.168.1.0/30"),
    			SecondaryPeerAddressPrefix: pulumi.String("192.168.2.0/30"),
    			VlanId:                     pulumi.Int(100),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = network.NewExpressRouteConnection(ctx, "exampleExpressRouteConnection", &network.ExpressRouteConnectionArgs{
    			ExpressRouteGatewayId:        exampleExpressRouteGateway.ID(),
    			ExpressRouteCircuitPeeringId: exampleExpressRouteCircuitPeering.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
    const exampleVirtualWan = new azure.network.VirtualWan("exampleVirtualWan", {
        resourceGroupName: exampleResourceGroup.name,
        location: exampleResourceGroup.location,
    });
    const exampleVirtualHub = new azure.network.VirtualHub("exampleVirtualHub", {
        resourceGroupName: exampleResourceGroup.name,
        location: exampleResourceGroup.location,
        virtualWanId: exampleVirtualWan.id,
        addressPrefix: "10.0.1.0/24",
    });
    const exampleExpressRouteGateway = new azure.network.ExpressRouteGateway("exampleExpressRouteGateway", {
        resourceGroupName: exampleResourceGroup.name,
        location: exampleResourceGroup.location,
        virtualHubId: exampleVirtualHub.id,
        scaleUnits: 1,
    });
    const exampleExpressRoutePort = new azure.network.ExpressRoutePort("exampleExpressRoutePort", {
        resourceGroupName: exampleResourceGroup.name,
        location: exampleResourceGroup.location,
        peeringLocation: "Equinix-Seattle-SE2",
        bandwidthInGbps: 10,
        encapsulation: "Dot1Q",
    });
    const exampleExpressRouteCircuit = new azure.network.ExpressRouteCircuit("exampleExpressRouteCircuit", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        expressRoutePortId: exampleExpressRoutePort.id,
        bandwidthInGbps: 5,
        sku: {
            tier: "Standard",
            family: "MeteredData",
        },
    });
    const exampleExpressRouteCircuitPeering = new azure.network.ExpressRouteCircuitPeering("exampleExpressRouteCircuitPeering", {
        peeringType: "AzurePrivatePeering",
        expressRouteCircuitName: exampleExpressRouteCircuit.name,
        resourceGroupName: exampleResourceGroup.name,
        sharedKey: "ItsASecret",
        peerAsn: 100,
        primaryPeerAddressPrefix: "192.168.1.0/30",
        secondaryPeerAddressPrefix: "192.168.2.0/30",
        vlanId: 100,
    });
    const exampleExpressRouteConnection = new azure.network.ExpressRouteConnection("exampleExpressRouteConnection", {
        expressRouteGatewayId: exampleExpressRouteGateway.id,
        expressRouteCircuitPeeringId: exampleExpressRouteCircuitPeering.id,
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
    example_virtual_wan = azure.network.VirtualWan("exampleVirtualWan",
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location)
    example_virtual_hub = azure.network.VirtualHub("exampleVirtualHub",
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location,
        virtual_wan_id=example_virtual_wan.id,
        address_prefix="10.0.1.0/24")
    example_express_route_gateway = azure.network.ExpressRouteGateway("exampleExpressRouteGateway",
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location,
        virtual_hub_id=example_virtual_hub.id,
        scale_units=1)
    example_express_route_port = azure.network.ExpressRoutePort("exampleExpressRoutePort",
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location,
        peering_location="Equinix-Seattle-SE2",
        bandwidth_in_gbps=10,
        encapsulation="Dot1Q")
    example_express_route_circuit = azure.network.ExpressRouteCircuit("exampleExpressRouteCircuit",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        express_route_port_id=example_express_route_port.id,
        bandwidth_in_gbps=5,
        sku=azure.network.ExpressRouteCircuitSkuArgs(
            tier="Standard",
            family="MeteredData",
        ))
    example_express_route_circuit_peering = azure.network.ExpressRouteCircuitPeering("exampleExpressRouteCircuitPeering",
        peering_type="AzurePrivatePeering",
        express_route_circuit_name=example_express_route_circuit.name,
        resource_group_name=example_resource_group.name,
        shared_key="ItsASecret",
        peer_asn=100,
        primary_peer_address_prefix="192.168.1.0/30",
        secondary_peer_address_prefix="192.168.2.0/30",
        vlan_id=100)
    example_express_route_connection = azure.network.ExpressRouteConnection("exampleExpressRouteConnection",
        express_route_gateway_id=example_express_route_gateway.id,
        express_route_circuit_peering_id=example_express_route_circuit_peering.id)
    

    Example coming soon!

    Create ExpressRouteConnection Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ExpressRouteConnection(name: string, args: ExpressRouteConnectionArgs, opts?: CustomResourceOptions);
    @overload
    def ExpressRouteConnection(resource_name: str,
                               args: ExpressRouteConnectionArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def ExpressRouteConnection(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               express_route_circuit_peering_id: Optional[str] = None,
                               express_route_gateway_id: Optional[str] = None,
                               authorization_key: Optional[str] = None,
                               enable_internet_security: Optional[bool] = None,
                               name: Optional[str] = None,
                               routing: Optional[ExpressRouteConnectionRoutingArgs] = None,
                               routing_weight: Optional[int] = None)
    func NewExpressRouteConnection(ctx *Context, name string, args ExpressRouteConnectionArgs, opts ...ResourceOption) (*ExpressRouteConnection, error)
    public ExpressRouteConnection(string name, ExpressRouteConnectionArgs args, CustomResourceOptions? opts = null)
    public ExpressRouteConnection(String name, ExpressRouteConnectionArgs args)
    public ExpressRouteConnection(String name, ExpressRouteConnectionArgs args, CustomResourceOptions options)
    
    type: azure:network:ExpressRouteConnection
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ExpressRouteConnectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ExpressRouteConnectionArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ExpressRouteConnectionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ExpressRouteConnectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ExpressRouteConnectionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var expressRouteConnectionResource = new Azure.Network.ExpressRouteConnection("expressRouteConnectionResource", new()
    {
        ExpressRouteCircuitPeeringId = "string",
        ExpressRouteGatewayId = "string",
        AuthorizationKey = "string",
        EnableInternetSecurity = false,
        Name = "string",
        Routing = new Azure.Network.Inputs.ExpressRouteConnectionRoutingArgs
        {
            AssociatedRouteTableId = "string",
            PropagatedRouteTable = new Azure.Network.Inputs.ExpressRouteConnectionRoutingPropagatedRouteTableArgs
            {
                Labels = new[]
                {
                    "string",
                },
                RouteTableIds = new[]
                {
                    "string",
                },
            },
        },
        RoutingWeight = 0,
    });
    
    example, err := network.NewExpressRouteConnection(ctx, "expressRouteConnectionResource", &network.ExpressRouteConnectionArgs{
    	ExpressRouteCircuitPeeringId: pulumi.String("string"),
    	ExpressRouteGatewayId:        pulumi.String("string"),
    	AuthorizationKey:             pulumi.String("string"),
    	EnableInternetSecurity:       pulumi.Bool(false),
    	Name:                         pulumi.String("string"),
    	Routing: &network.ExpressRouteConnectionRoutingArgs{
    		AssociatedRouteTableId: pulumi.String("string"),
    		PropagatedRouteTable: &network.ExpressRouteConnectionRoutingPropagatedRouteTableArgs{
    			Labels: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			RouteTableIds: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    	},
    	RoutingWeight: pulumi.Int(0),
    })
    
    var expressRouteConnectionResource = new ExpressRouteConnection("expressRouteConnectionResource", ExpressRouteConnectionArgs.builder()
        .expressRouteCircuitPeeringId("string")
        .expressRouteGatewayId("string")
        .authorizationKey("string")
        .enableInternetSecurity(false)
        .name("string")
        .routing(ExpressRouteConnectionRoutingArgs.builder()
            .associatedRouteTableId("string")
            .propagatedRouteTable(ExpressRouteConnectionRoutingPropagatedRouteTableArgs.builder()
                .labels("string")
                .routeTableIds("string")
                .build())
            .build())
        .routingWeight(0)
        .build());
    
    express_route_connection_resource = azure.network.ExpressRouteConnection("expressRouteConnectionResource",
        express_route_circuit_peering_id="string",
        express_route_gateway_id="string",
        authorization_key="string",
        enable_internet_security=False,
        name="string",
        routing={
            "associated_route_table_id": "string",
            "propagated_route_table": {
                "labels": ["string"],
                "route_table_ids": ["string"],
            },
        },
        routing_weight=0)
    
    const expressRouteConnectionResource = new azure.network.ExpressRouteConnection("expressRouteConnectionResource", {
        expressRouteCircuitPeeringId: "string",
        expressRouteGatewayId: "string",
        authorizationKey: "string",
        enableInternetSecurity: false,
        name: "string",
        routing: {
            associatedRouteTableId: "string",
            propagatedRouteTable: {
                labels: ["string"],
                routeTableIds: ["string"],
            },
        },
        routingWeight: 0,
    });
    
    type: azure:network:ExpressRouteConnection
    properties:
        authorizationKey: string
        enableInternetSecurity: false
        expressRouteCircuitPeeringId: string
        expressRouteGatewayId: string
        name: string
        routing:
            associatedRouteTableId: string
            propagatedRouteTable:
                labels:
                    - string
                routeTableIds:
                    - string
        routingWeight: 0
    

    ExpressRouteConnection Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ExpressRouteConnection resource accepts the following input properties:

    ExpressRouteCircuitPeeringId string
    The ID of the Express Route Circuit Peering that this Express Route Connection connects with. Changing this forces a new resource to be created.
    ExpressRouteGatewayId string
    The ID of the Express Route Gateway that this Express Route Connection connects with. Changing this forces a new resource to be created.
    AuthorizationKey string
    The authorization key to establish the Express Route Connection.
    EnableInternetSecurity bool
    Is Internet security enabled for this Express Route Connection?
    Name string
    The name which should be used for this Express Route Connection. Changing this forces a new resource to be created.
    Routing ExpressRouteConnectionRouting
    A routing block as defined below.
    RoutingWeight int
    The routing weight associated to the Express Route Connection. Possible value is between 0 and 32000. Defaults to 0.
    ExpressRouteCircuitPeeringId string
    The ID of the Express Route Circuit Peering that this Express Route Connection connects with. Changing this forces a new resource to be created.
    ExpressRouteGatewayId string
    The ID of the Express Route Gateway that this Express Route Connection connects with. Changing this forces a new resource to be created.
    AuthorizationKey string
    The authorization key to establish the Express Route Connection.
    EnableInternetSecurity bool
    Is Internet security enabled for this Express Route Connection?
    Name string
    The name which should be used for this Express Route Connection. Changing this forces a new resource to be created.
    Routing ExpressRouteConnectionRoutingArgs
    A routing block as defined below.
    RoutingWeight int
    The routing weight associated to the Express Route Connection. Possible value is between 0 and 32000. Defaults to 0.
    expressRouteCircuitPeeringId String
    The ID of the Express Route Circuit Peering that this Express Route Connection connects with. Changing this forces a new resource to be created.
    expressRouteGatewayId String
    The ID of the Express Route Gateway that this Express Route Connection connects with. Changing this forces a new resource to be created.
    authorizationKey String
    The authorization key to establish the Express Route Connection.
    enableInternetSecurity Boolean
    Is Internet security enabled for this Express Route Connection?
    name String
    The name which should be used for this Express Route Connection. Changing this forces a new resource to be created.
    routing ExpressRouteConnectionRouting
    A routing block as defined below.
    routingWeight Integer
    The routing weight associated to the Express Route Connection. Possible value is between 0 and 32000. Defaults to 0.
    expressRouteCircuitPeeringId string
    The ID of the Express Route Circuit Peering that this Express Route Connection connects with. Changing this forces a new resource to be created.
    expressRouteGatewayId string
    The ID of the Express Route Gateway that this Express Route Connection connects with. Changing this forces a new resource to be created.
    authorizationKey string
    The authorization key to establish the Express Route Connection.
    enableInternetSecurity boolean
    Is Internet security enabled for this Express Route Connection?
    name string
    The name which should be used for this Express Route Connection. Changing this forces a new resource to be created.
    routing ExpressRouteConnectionRouting
    A routing block as defined below.
    routingWeight number
    The routing weight associated to the Express Route Connection. Possible value is between 0 and 32000. Defaults to 0.
    express_route_circuit_peering_id str
    The ID of the Express Route Circuit Peering that this Express Route Connection connects with. Changing this forces a new resource to be created.
    express_route_gateway_id str
    The ID of the Express Route Gateway that this Express Route Connection connects with. Changing this forces a new resource to be created.
    authorization_key str
    The authorization key to establish the Express Route Connection.
    enable_internet_security bool
    Is Internet security enabled for this Express Route Connection?
    name str
    The name which should be used for this Express Route Connection. Changing this forces a new resource to be created.
    routing ExpressRouteConnectionRoutingArgs
    A routing block as defined below.
    routing_weight int
    The routing weight associated to the Express Route Connection. Possible value is between 0 and 32000. Defaults to 0.
    expressRouteCircuitPeeringId String
    The ID of the Express Route Circuit Peering that this Express Route Connection connects with. Changing this forces a new resource to be created.
    expressRouteGatewayId String
    The ID of the Express Route Gateway that this Express Route Connection connects with. Changing this forces a new resource to be created.
    authorizationKey String
    The authorization key to establish the Express Route Connection.
    enableInternetSecurity Boolean
    Is Internet security enabled for this Express Route Connection?
    name String
    The name which should be used for this Express Route Connection. Changing this forces a new resource to be created.
    routing Property Map
    A routing block as defined below.
    routingWeight Number
    The routing weight associated to the Express Route Connection. Possible value is between 0 and 32000. Defaults to 0.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ExpressRouteConnection resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ExpressRouteConnection Resource

    Get an existing ExpressRouteConnection resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ExpressRouteConnectionState, opts?: CustomResourceOptions): ExpressRouteConnection
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            authorization_key: Optional[str] = None,
            enable_internet_security: Optional[bool] = None,
            express_route_circuit_peering_id: Optional[str] = None,
            express_route_gateway_id: Optional[str] = None,
            name: Optional[str] = None,
            routing: Optional[ExpressRouteConnectionRoutingArgs] = None,
            routing_weight: Optional[int] = None) -> ExpressRouteConnection
    func GetExpressRouteConnection(ctx *Context, name string, id IDInput, state *ExpressRouteConnectionState, opts ...ResourceOption) (*ExpressRouteConnection, error)
    public static ExpressRouteConnection Get(string name, Input<string> id, ExpressRouteConnectionState? state, CustomResourceOptions? opts = null)
    public static ExpressRouteConnection get(String name, Output<String> id, ExpressRouteConnectionState state, CustomResourceOptions options)
    resources:  _:    type: azure:network:ExpressRouteConnection    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AuthorizationKey string
    The authorization key to establish the Express Route Connection.
    EnableInternetSecurity bool
    Is Internet security enabled for this Express Route Connection?
    ExpressRouteCircuitPeeringId string
    The ID of the Express Route Circuit Peering that this Express Route Connection connects with. Changing this forces a new resource to be created.
    ExpressRouteGatewayId string
    The ID of the Express Route Gateway that this Express Route Connection connects with. Changing this forces a new resource to be created.
    Name string
    The name which should be used for this Express Route Connection. Changing this forces a new resource to be created.
    Routing ExpressRouteConnectionRouting
    A routing block as defined below.
    RoutingWeight int
    The routing weight associated to the Express Route Connection. Possible value is between 0 and 32000. Defaults to 0.
    AuthorizationKey string
    The authorization key to establish the Express Route Connection.
    EnableInternetSecurity bool
    Is Internet security enabled for this Express Route Connection?
    ExpressRouteCircuitPeeringId string
    The ID of the Express Route Circuit Peering that this Express Route Connection connects with. Changing this forces a new resource to be created.
    ExpressRouteGatewayId string
    The ID of the Express Route Gateway that this Express Route Connection connects with. Changing this forces a new resource to be created.
    Name string
    The name which should be used for this Express Route Connection. Changing this forces a new resource to be created.
    Routing ExpressRouteConnectionRoutingArgs
    A routing block as defined below.
    RoutingWeight int
    The routing weight associated to the Express Route Connection. Possible value is between 0 and 32000. Defaults to 0.
    authorizationKey String
    The authorization key to establish the Express Route Connection.
    enableInternetSecurity Boolean
    Is Internet security enabled for this Express Route Connection?
    expressRouteCircuitPeeringId String
    The ID of the Express Route Circuit Peering that this Express Route Connection connects with. Changing this forces a new resource to be created.
    expressRouteGatewayId String
    The ID of the Express Route Gateway that this Express Route Connection connects with. Changing this forces a new resource to be created.
    name String
    The name which should be used for this Express Route Connection. Changing this forces a new resource to be created.
    routing ExpressRouteConnectionRouting
    A routing block as defined below.
    routingWeight Integer
    The routing weight associated to the Express Route Connection. Possible value is between 0 and 32000. Defaults to 0.
    authorizationKey string
    The authorization key to establish the Express Route Connection.
    enableInternetSecurity boolean
    Is Internet security enabled for this Express Route Connection?
    expressRouteCircuitPeeringId string
    The ID of the Express Route Circuit Peering that this Express Route Connection connects with. Changing this forces a new resource to be created.
    expressRouteGatewayId string
    The ID of the Express Route Gateway that this Express Route Connection connects with. Changing this forces a new resource to be created.
    name string
    The name which should be used for this Express Route Connection. Changing this forces a new resource to be created.
    routing ExpressRouteConnectionRouting
    A routing block as defined below.
    routingWeight number
    The routing weight associated to the Express Route Connection. Possible value is between 0 and 32000. Defaults to 0.
    authorization_key str
    The authorization key to establish the Express Route Connection.
    enable_internet_security bool
    Is Internet security enabled for this Express Route Connection?
    express_route_circuit_peering_id str
    The ID of the Express Route Circuit Peering that this Express Route Connection connects with. Changing this forces a new resource to be created.
    express_route_gateway_id str
    The ID of the Express Route Gateway that this Express Route Connection connects with. Changing this forces a new resource to be created.
    name str
    The name which should be used for this Express Route Connection. Changing this forces a new resource to be created.
    routing ExpressRouteConnectionRoutingArgs
    A routing block as defined below.
    routing_weight int
    The routing weight associated to the Express Route Connection. Possible value is between 0 and 32000. Defaults to 0.
    authorizationKey String
    The authorization key to establish the Express Route Connection.
    enableInternetSecurity Boolean
    Is Internet security enabled for this Express Route Connection?
    expressRouteCircuitPeeringId String
    The ID of the Express Route Circuit Peering that this Express Route Connection connects with. Changing this forces a new resource to be created.
    expressRouteGatewayId String
    The ID of the Express Route Gateway that this Express Route Connection connects with. Changing this forces a new resource to be created.
    name String
    The name which should be used for this Express Route Connection. Changing this forces a new resource to be created.
    routing Property Map
    A routing block as defined below.
    routingWeight Number
    The routing weight associated to the Express Route Connection. Possible value is between 0 and 32000. Defaults to 0.

    Supporting Types

    ExpressRouteConnectionRouting, ExpressRouteConnectionRoutingArgs

    AssociatedRouteTableId string
    The ID of the Virtual Hub Route Table associated with this Express Route Connection.
    PropagatedRouteTable ExpressRouteConnectionRoutingPropagatedRouteTable
    A propagated_route_table block as defined below.
    AssociatedRouteTableId string
    The ID of the Virtual Hub Route Table associated with this Express Route Connection.
    PropagatedRouteTable ExpressRouteConnectionRoutingPropagatedRouteTable
    A propagated_route_table block as defined below.
    associatedRouteTableId String
    The ID of the Virtual Hub Route Table associated with this Express Route Connection.
    propagatedRouteTable ExpressRouteConnectionRoutingPropagatedRouteTable
    A propagated_route_table block as defined below.
    associatedRouteTableId string
    The ID of the Virtual Hub Route Table associated with this Express Route Connection.
    propagatedRouteTable ExpressRouteConnectionRoutingPropagatedRouteTable
    A propagated_route_table block as defined below.
    associated_route_table_id str
    The ID of the Virtual Hub Route Table associated with this Express Route Connection.
    propagated_route_table ExpressRouteConnectionRoutingPropagatedRouteTable
    A propagated_route_table block as defined below.
    associatedRouteTableId String
    The ID of the Virtual Hub Route Table associated with this Express Route Connection.
    propagatedRouteTable Property Map
    A propagated_route_table block as defined below.

    ExpressRouteConnectionRoutingPropagatedRouteTable, ExpressRouteConnectionRoutingPropagatedRouteTableArgs

    Labels List<string>
    The list of labels to logically group route tables.
    RouteTableIds List<string>
    A list of IDs of the Virtual Hub Route Table to propagate routes from Express Route Connection to the route table.
    Labels []string
    The list of labels to logically group route tables.
    RouteTableIds []string
    A list of IDs of the Virtual Hub Route Table to propagate routes from Express Route Connection to the route table.
    labels List<String>
    The list of labels to logically group route tables.
    routeTableIds List<String>
    A list of IDs of the Virtual Hub Route Table to propagate routes from Express Route Connection to the route table.
    labels string[]
    The list of labels to logically group route tables.
    routeTableIds string[]
    A list of IDs of the Virtual Hub Route Table to propagate routes from Express Route Connection to the route table.
    labels Sequence[str]
    The list of labels to logically group route tables.
    route_table_ids Sequence[str]
    A list of IDs of the Virtual Hub Route Table to propagate routes from Express Route Connection to the route table.
    labels List<String>
    The list of labels to logically group route tables.
    routeTableIds List<String>
    A list of IDs of the Virtual Hub Route Table to propagate routes from Express Route Connection to the route table.

    Import

    Express Route Connections can be imported using the resource id, e.g.

     $ pulumi import azure:network/expressRouteConnection:ExpressRouteConnection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/expressRouteGateways/expressRouteGateway1/expressRouteConnections/connection1
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial