We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.network.getExpressRouteCircuit
Explore with Pulumi AI
Use this data source to access information about an existing ExpressRoute circuit.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.network.getExpressRouteCircuit({
    resourceGroupName: exampleAzurermResourceGroup.name,
    name: exampleAzurermExpressRouteCircuit.name,
});
export const expressRouteCircuitId = example.then(example => example.id);
export const serviceKey = example.then(example => example.serviceKey);
import pulumi
import pulumi_azure as azure
example = azure.network.get_express_route_circuit(resource_group_name=example_azurerm_resource_group["name"],
    name=example_azurerm_express_route_circuit["name"])
pulumi.export("expressRouteCircuitId", example.id)
pulumi.export("serviceKey", example.service_key)
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := network.LookupExpressRouteCircuit(ctx, &network.LookupExpressRouteCircuitArgs{
			ResourceGroupName: exampleAzurermResourceGroup.Name,
			Name:              exampleAzurermExpressRouteCircuit.Name,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("expressRouteCircuitId", example.Id)
		ctx.Export("serviceKey", example.ServiceKey)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = Azure.Network.GetExpressRouteCircuit.Invoke(new()
    {
        ResourceGroupName = exampleAzurermResourceGroup.Name,
        Name = exampleAzurermExpressRouteCircuit.Name,
    });
    return new Dictionary<string, object?>
    {
        ["expressRouteCircuitId"] = example.Apply(getExpressRouteCircuitResult => getExpressRouteCircuitResult.Id),
        ["serviceKey"] = example.Apply(getExpressRouteCircuitResult => getExpressRouteCircuitResult.ServiceKey),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.network.NetworkFunctions;
import com.pulumi.azure.network.inputs.GetExpressRouteCircuitArgs;
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) {
        final var example = NetworkFunctions.getExpressRouteCircuit(GetExpressRouteCircuitArgs.builder()
            .resourceGroupName(exampleAzurermResourceGroup.name())
            .name(exampleAzurermExpressRouteCircuit.name())
            .build());
        ctx.export("expressRouteCircuitId", example.applyValue(getExpressRouteCircuitResult -> getExpressRouteCircuitResult.id()));
        ctx.export("serviceKey", example.applyValue(getExpressRouteCircuitResult -> getExpressRouteCircuitResult.serviceKey()));
    }
}
variables:
  example:
    fn::invoke:
      function: azure:network:getExpressRouteCircuit
      arguments:
        resourceGroupName: ${exampleAzurermResourceGroup.name}
        name: ${exampleAzurermExpressRouteCircuit.name}
outputs:
  expressRouteCircuitId: ${example.id}
  serviceKey: ${example.serviceKey}
Using getExpressRouteCircuit
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getExpressRouteCircuit(args: GetExpressRouteCircuitArgs, opts?: InvokeOptions): Promise<GetExpressRouteCircuitResult>
function getExpressRouteCircuitOutput(args: GetExpressRouteCircuitOutputArgs, opts?: InvokeOptions): Output<GetExpressRouteCircuitResult>def get_express_route_circuit(name: Optional[str] = None,
                              resource_group_name: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetExpressRouteCircuitResult
def get_express_route_circuit_output(name: Optional[pulumi.Input[str]] = None,
                              resource_group_name: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetExpressRouteCircuitResult]func LookupExpressRouteCircuit(ctx *Context, args *LookupExpressRouteCircuitArgs, opts ...InvokeOption) (*LookupExpressRouteCircuitResult, error)
func LookupExpressRouteCircuitOutput(ctx *Context, args *LookupExpressRouteCircuitOutputArgs, opts ...InvokeOption) LookupExpressRouteCircuitResultOutput> Note: This function is named LookupExpressRouteCircuit in the Go SDK.
public static class GetExpressRouteCircuit 
{
    public static Task<GetExpressRouteCircuitResult> InvokeAsync(GetExpressRouteCircuitArgs args, InvokeOptions? opts = null)
    public static Output<GetExpressRouteCircuitResult> Invoke(GetExpressRouteCircuitInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetExpressRouteCircuitResult> getExpressRouteCircuit(GetExpressRouteCircuitArgs args, InvokeOptions options)
public static Output<GetExpressRouteCircuitResult> getExpressRouteCircuit(GetExpressRouteCircuitArgs args, InvokeOptions options)
fn::invoke:
  function: azure:network/getExpressRouteCircuit:getExpressRouteCircuit
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- The name of the ExpressRoute circuit.
- ResourceGroup stringName 
- The Name of the Resource Group where the ExpressRoute circuit exists.
- Name string
- The name of the ExpressRoute circuit.
- ResourceGroup stringName 
- The Name of the Resource Group where the ExpressRoute circuit exists.
- name String
- The name of the ExpressRoute circuit.
- resourceGroup StringName 
- The Name of the Resource Group where the ExpressRoute circuit exists.
- name string
- The name of the ExpressRoute circuit.
- resourceGroup stringName 
- The Name of the Resource Group where the ExpressRoute circuit exists.
- name str
- The name of the ExpressRoute circuit.
- resource_group_ strname 
- The Name of the Resource Group where the ExpressRoute circuit exists.
- name String
- The name of the ExpressRoute circuit.
- resourceGroup StringName 
- The Name of the Resource Group where the ExpressRoute circuit exists.
getExpressRouteCircuit Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- The Azure location where the ExpressRoute circuit exists
- Name string
- Peerings
List<GetExpress Route Circuit Peering> 
- A peeringsblock for the ExpressRoute circuit as documented below
- ResourceGroup stringName 
- ServiceKey string
- The string needed by the service provider to provision the ExpressRoute circuit.
- ServiceProvider List<GetProperties Express Route Circuit Service Provider Property> 
- A service_provider_propertiesblock for the ExpressRoute circuit as documented below
- ServiceProvider stringProvisioning State 
- The ExpressRoute circuit provisioning state from your chosen service provider. Possible values are NotProvisioned,Provisioning,Provisioned, andDeprovisioning.
- Sku
GetExpress Route Circuit Sku 
- A skublock for the ExpressRoute circuit as documented below.
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- The Azure location where the ExpressRoute circuit exists
- Name string
- Peerings
[]GetExpress Route Circuit Peering Type 
- A peeringsblock for the ExpressRoute circuit as documented below
- ResourceGroup stringName 
- ServiceKey string
- The string needed by the service provider to provision the ExpressRoute circuit.
- ServiceProvider []GetProperties Express Route Circuit Service Provider Property 
- A service_provider_propertiesblock for the ExpressRoute circuit as documented below
- ServiceProvider stringProvisioning State 
- The ExpressRoute circuit provisioning state from your chosen service provider. Possible values are NotProvisioned,Provisioning,Provisioned, andDeprovisioning.
- Sku
GetExpress Route Circuit Sku 
- A skublock for the ExpressRoute circuit as documented below.
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- The Azure location where the ExpressRoute circuit exists
- name String
- peerings
List<GetExpress Route Circuit Peering> 
- A peeringsblock for the ExpressRoute circuit as documented below
- resourceGroup StringName 
- serviceKey String
- The string needed by the service provider to provision the ExpressRoute circuit.
- serviceProvider List<GetProperties Express Route Circuit Service Provider Property> 
- A service_provider_propertiesblock for the ExpressRoute circuit as documented below
- serviceProvider StringProvisioning State 
- The ExpressRoute circuit provisioning state from your chosen service provider. Possible values are NotProvisioned,Provisioning,Provisioned, andDeprovisioning.
- sku
GetExpress Route Circuit Sku 
- A skublock for the ExpressRoute circuit as documented below.
- id string
- The provider-assigned unique ID for this managed resource.
- location string
- The Azure location where the ExpressRoute circuit exists
- name string
- peerings
GetExpress Route Circuit Peering[] 
- A peeringsblock for the ExpressRoute circuit as documented below
- resourceGroup stringName 
- serviceKey string
- The string needed by the service provider to provision the ExpressRoute circuit.
- serviceProvider GetProperties Express Route Circuit Service Provider Property[] 
- A service_provider_propertiesblock for the ExpressRoute circuit as documented below
- serviceProvider stringProvisioning State 
- The ExpressRoute circuit provisioning state from your chosen service provider. Possible values are NotProvisioned,Provisioning,Provisioned, andDeprovisioning.
- sku
GetExpress Route Circuit Sku 
- A skublock for the ExpressRoute circuit as documented below.
- id str
- The provider-assigned unique ID for this managed resource.
- location str
- The Azure location where the ExpressRoute circuit exists
- name str
- peerings
Sequence[GetExpress Route Circuit Peering] 
- A peeringsblock for the ExpressRoute circuit as documented below
- resource_group_ strname 
- service_key str
- The string needed by the service provider to provision the ExpressRoute circuit.
- service_provider_ Sequence[Getproperties Express Route Circuit Service Provider Property] 
- A service_provider_propertiesblock for the ExpressRoute circuit as documented below
- service_provider_ strprovisioning_ state 
- The ExpressRoute circuit provisioning state from your chosen service provider. Possible values are NotProvisioned,Provisioning,Provisioned, andDeprovisioning.
- sku
GetExpress Route Circuit Sku 
- A skublock for the ExpressRoute circuit as documented below.
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- The Azure location where the ExpressRoute circuit exists
- name String
- peerings List<Property Map>
- A peeringsblock for the ExpressRoute circuit as documented below
- resourceGroup StringName 
- serviceKey String
- The string needed by the service provider to provision the ExpressRoute circuit.
- serviceProvider List<Property Map>Properties 
- A service_provider_propertiesblock for the ExpressRoute circuit as documented below
- serviceProvider StringProvisioning State 
- The ExpressRoute circuit provisioning state from your chosen service provider. Possible values are NotProvisioned,Provisioning,Provisioned, andDeprovisioning.
- sku Property Map
- A skublock for the ExpressRoute circuit as documented below.
Supporting Types
GetExpressRouteCircuitPeering    
- AzureAsn int
- The Either a 16-bit or a 32-bit ASN for Azure.
- PeerAsn int
- The Either a 16-bit or a 32-bit ASN. Can either be public or private.
- PeeringType string
- The type of the ExpressRoute Circuit Peering. Acceptable values include AzurePrivatePeering,AzurePublicPeeringandMicrosoftPeering. Changing this forces a new resource to be created.
- PrimaryPeer stringAddress Prefix 
- A /30subnet for the primary link.
- SecondaryPeer stringAddress Prefix 
- A /30subnet for the secondary link.
- string
- The shared key. Can be a maximum of 25 characters.
- VlanId int
- A valid VLAN ID to establish this peering on.
- AzureAsn int
- The Either a 16-bit or a 32-bit ASN for Azure.
- PeerAsn int
- The Either a 16-bit or a 32-bit ASN. Can either be public or private.
- PeeringType string
- The type of the ExpressRoute Circuit Peering. Acceptable values include AzurePrivatePeering,AzurePublicPeeringandMicrosoftPeering. Changing this forces a new resource to be created.
- PrimaryPeer stringAddress Prefix 
- A /30subnet for the primary link.
- SecondaryPeer stringAddress Prefix 
- A /30subnet for the secondary link.
- string
- The shared key. Can be a maximum of 25 characters.
- VlanId int
- A valid VLAN ID to establish this peering on.
- azureAsn Integer
- The Either a 16-bit or a 32-bit ASN for Azure.
- peerAsn Integer
- The Either a 16-bit or a 32-bit ASN. Can either be public or private.
- peeringType String
- The type of the ExpressRoute Circuit Peering. Acceptable values include AzurePrivatePeering,AzurePublicPeeringandMicrosoftPeering. Changing this forces a new resource to be created.
- primaryPeer StringAddress Prefix 
- A /30subnet for the primary link.
- secondaryPeer StringAddress Prefix 
- A /30subnet for the secondary link.
- String
- The shared key. Can be a maximum of 25 characters.
- vlanId Integer
- A valid VLAN ID to establish this peering on.
- azureAsn number
- The Either a 16-bit or a 32-bit ASN for Azure.
- peerAsn number
- The Either a 16-bit or a 32-bit ASN. Can either be public or private.
- peeringType string
- The type of the ExpressRoute Circuit Peering. Acceptable values include AzurePrivatePeering,AzurePublicPeeringandMicrosoftPeering. Changing this forces a new resource to be created.
- primaryPeer stringAddress Prefix 
- A /30subnet for the primary link.
- secondaryPeer stringAddress Prefix 
- A /30subnet for the secondary link.
- string
- The shared key. Can be a maximum of 25 characters.
- vlanId number
- A valid VLAN ID to establish this peering on.
- azure_asn int
- The Either a 16-bit or a 32-bit ASN for Azure.
- peer_asn int
- The Either a 16-bit or a 32-bit ASN. Can either be public or private.
- peering_type str
- The type of the ExpressRoute Circuit Peering. Acceptable values include AzurePrivatePeering,AzurePublicPeeringandMicrosoftPeering. Changing this forces a new resource to be created.
- primary_peer_ straddress_ prefix 
- A /30subnet for the primary link.
- secondary_peer_ straddress_ prefix 
- A /30subnet for the secondary link.
- str
- The shared key. Can be a maximum of 25 characters.
- vlan_id int
- A valid VLAN ID to establish this peering on.
- azureAsn Number
- The Either a 16-bit or a 32-bit ASN for Azure.
- peerAsn Number
- The Either a 16-bit or a 32-bit ASN. Can either be public or private.
- peeringType String
- The type of the ExpressRoute Circuit Peering. Acceptable values include AzurePrivatePeering,AzurePublicPeeringandMicrosoftPeering. Changing this forces a new resource to be created.
- primaryPeer StringAddress Prefix 
- A /30subnet for the primary link.
- secondaryPeer StringAddress Prefix 
- A /30subnet for the secondary link.
- String
- The shared key. Can be a maximum of 25 characters.
- vlanId Number
- A valid VLAN ID to establish this peering on.
GetExpressRouteCircuitServiceProviderProperty      
- BandwidthIn intMbps 
- The bandwidth in Mbps of the ExpressRoute circuit.
- PeeringLocation string
- The name of the peering location and not the Azure resource location.
- ServiceProvider stringName 
- The name of the ExpressRoute Service Provider.
- BandwidthIn intMbps 
- The bandwidth in Mbps of the ExpressRoute circuit.
- PeeringLocation string
- The name of the peering location and not the Azure resource location.
- ServiceProvider stringName 
- The name of the ExpressRoute Service Provider.
- bandwidthIn IntegerMbps 
- The bandwidth in Mbps of the ExpressRoute circuit.
- peeringLocation String
- The name of the peering location and not the Azure resource location.
- serviceProvider StringName 
- The name of the ExpressRoute Service Provider.
- bandwidthIn numberMbps 
- The bandwidth in Mbps of the ExpressRoute circuit.
- peeringLocation string
- The name of the peering location and not the Azure resource location.
- serviceProvider stringName 
- The name of the ExpressRoute Service Provider.
- bandwidth_in_ intmbps 
- The bandwidth in Mbps of the ExpressRoute circuit.
- peering_location str
- The name of the peering location and not the Azure resource location.
- service_provider_ strname 
- The name of the ExpressRoute Service Provider.
- bandwidthIn NumberMbps 
- The bandwidth in Mbps of the ExpressRoute circuit.
- peeringLocation String
- The name of the peering location and not the Azure resource location.
- serviceProvider StringName 
- The name of the ExpressRoute Service Provider.
GetExpressRouteCircuitSku    
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.