Skip to content

azurermExpressRouteCircuit

Manages an ExpressRoute circuit.

Example Usage

/*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 azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
  this,
  "example",
  {
    location: "West Europe",
    name: "exprtTest",
  }
);
const azurermExpressRouteCircuitExample =
  new azurerm.expressRouteCircuit.ExpressRouteCircuit(this, "example_1", {
    bandwidth_in_mbps: 50,
    location: azurermResourceGroupExample.location,
    name: "expressRoute1",
    peering_location: "Silicon Valley",
    resource_group_name: azurermResourceGroupExample.name,
    service_provider_name: "Equinix",
    sku: [
      {
        family: "MeteredData",
        tier: "Standard",
      },
    ],
    tags: {
      environment: "Production",
    },
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermExpressRouteCircuitExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

  • name - (Required) The name of the ExpressRoute circuit. Changing this forces a new resource to be created.

  • resourceGroupName - (Required) The name of the resource group in which to create the ExpressRoute circuit. Changing this forces a new resource to be created.

  • location - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • sku - (Required) A sku block for the ExpressRoute circuit as documented below.

  • serviceProviderName - (Optional) The name of the ExpressRoute Service Provider. Changing this forces a new resource to be created.

  • peeringLocation - (Optional) The name of the peering location and not the Azure resource location. Changing this forces a new resource to be created.

  • bandwidthInMbps - (Optional) The bandwidth in Mbps of the circuit being created on the Service Provider.

\~> NOTE: Once you increase your bandwidth, you will not be able to decrease it to its previous value.

\~> NOTE: The serviceProviderName, the peeringLocation and the bandwidthInMbps should be set together and they conflict with expressRoutePortId and bandwidthInGbps.

  • allowClassicOperations - (Optional) Allow the circuit to interact with classic (RDFE) resources. Defaults to false.

  • expressRoutePortId - (Optional) The ID of the Express Route Port this Express Route Circuit is based on. Changing this forces a new resource to be created.

  • bandwidthInGbps - (Optional) The bandwidth in Gbps of the circuit being created on the Express Route Port.

\~> NOTE: The expressRoutePortId and the bandwidthInGbps should be set together and they conflict with serviceProviderName, peeringLocation and bandwidthInMbps.

  • authorizationKey - (Optional) The authorization key. This can be used to set up an ExpressRoute Circuit with an ExpressRoute Port from another subscription.

  • tags - (Optional) A mapping of tags to assign to the resource.


The sku block supports the following:

  • tier - (Required) The service tier. Possible values are basic, local, standard or premium.

  • family - (Required) The billing mode for bandwidth. Possible values are meteredData or unlimitedData.

\~> NOTE: You can migrate from meteredData to unlimitedData, but not the other way around.

Attributes Reference

The following attributes are exported:

  • id - The ID of the ExpressRoute circuit.
  • serviceProviderProvisioningState - The ExpressRoute circuit provisioning state from your chosen service provider. Possible values are notProvisioned, provisioning, provisioned, and deprovisioning.
  • serviceKey - The string needed by the service provider to provision the ExpressRoute circuit.

Timeouts

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

  • create - (Defaults to 30 minutes) Used when creating the ExpressRoute Circuit.
  • update - (Defaults to 30 minutes) Used when updating the ExpressRoute Circuit.
  • read - (Defaults to 5 minutes) Used when retrieving the ExpressRoute Circuit.
  • delete - (Defaults to 30 minutes) Used when deleting the ExpressRoute Circuit.

Import

ExpressRoute circuits can be imported using the resourceId, e.g.

terraform import azurerm_express_route_circuit.myExpressRoute /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/expressRouteCircuits/myExpressRoute