azurermExpressRouteCircuitConnection
Manages an Express Route Circuit Connection.
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: "example-resources",
}
);
const azurermExpressRoutePortExample =
new azurerm.expressRoutePort.ExpressRoutePort(this, "example_1", {
bandwidth_in_gbps: 10,
encapsulation: "Dot1Q",
location: azurermResourceGroupExample.location,
name: "example-erport",
peering_location: "Equinix-Seattle-SE2",
resource_group_name: azurermResourceGroupExample.name,
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermExpressRoutePortExample.overrideLogicalId("example");
const azurermExpressRoutePortExample2 =
new azurerm.expressRoutePort.ExpressRoutePort(this, "example2", {
bandwidth_in_gbps: 10,
encapsulation: "Dot1Q",
location: azurermResourceGroupExample.location,
name: "example-erport2",
peering_location: "Allied-Toronto-King-West",
resource_group_name: azurermResourceGroupExample.name,
});
const azurermExpressRouteCircuitExample =
new azurerm.expressRouteCircuit.ExpressRouteCircuit(this, "example_3", {
bandwidth_in_gbps: 5,
express_route_port_id: azurermExpressRoutePortExample.id,
location: azurermResourceGroupExample.location,
name: "example-ercircuit",
resource_group_name: azurermResourceGroupExample.name,
sku: [
{
family: "MeteredData",
tier: "Standard",
},
],
});
/*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");
const azurermExpressRouteCircuitExample2 =
new azurerm.expressRouteCircuit.ExpressRouteCircuit(this, "example2_4", {
bandwidth_in_gbps: 5,
express_route_port_id: azurermExpressRoutePortExample2.id,
location: azurermResourceGroupExample.location,
name: "example-ercircuit2",
resource_group_name: azurermResourceGroupExample.name,
sku: [
{
family: "MeteredData",
tier: "Standard",
},
],
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermExpressRouteCircuitExample2.overrideLogicalId("example2");
const azurermExpressRouteCircuitPeeringExample =
new azurerm.expressRouteCircuitPeering.ExpressRouteCircuitPeering(
this,
"example_5",
{
express_route_circuit_name: azurermExpressRouteCircuitExample.name,
peer_asn: 100,
peering_type: "AzurePrivatePeering",
primary_peer_address_prefix: "192.168.1.0/30",
resource_group_name: azurermResourceGroupExample.name,
secondary_peer_address_prefix: "192.168.1.0/30",
shared_key: "ItsASecret",
vlan_id: 100,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermExpressRouteCircuitPeeringExample.overrideLogicalId("example");
const azurermExpressRouteCircuitPeeringExample2 =
new azurerm.expressRouteCircuitPeering.ExpressRouteCircuitPeering(
this,
"example2_6",
{
express_route_circuit_name: azurermExpressRouteCircuitExample2.name,
peer_asn: 100,
peering_type: "AzurePrivatePeering",
primary_peer_address_prefix: "192.168.1.0/30",
resource_group_name: azurermResourceGroupExample.name,
secondary_peer_address_prefix: "192.168.1.0/30",
shared_key: "ItsASecret",
vlan_id: 100,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermExpressRouteCircuitPeeringExample2.overrideLogicalId("example2");
const azurermExpressRouteCircuitConnectionExample =
new azurerm.expressRouteCircuitConnection.ExpressRouteCircuitConnection(
this,
"example_7",
{
address_prefix_ipv4: "192.169.9.0/29",
authorization_key: "846a1918-b7a2-4917-b43c-8c4cdaee006a",
name: "example-ercircuitconnection",
peer_peering_id: azurermExpressRouteCircuitPeeringExample2.id,
peering_id: azurermExpressRouteCircuitPeeringExample.id,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermExpressRouteCircuitConnectionExample.overrideLogicalId("example");
Arguments Reference
The following arguments are supported:
-
name
- (Required) The name which should be used for this Express Route Circuit Connection. Changing this forces a new Express Route Circuit Connection to be created. -
peeringId
- (Required) The ID of the Express Route Circuit Private Peering that this Express Route Circuit Connection connects with. Changing this forces a new Express Route Circuit Connection to be created. -
peerPeeringId
- (Required) The ID of the peered Express Route Circuit Private Peering. Changing this forces a new Express Route Circuit Connection to be created. -
addressPrefixIpv4
- (Required) The IPv4 address space from which to allocate customer address for global reach. Changing this forces a new Express Route Circuit Connection to be created.
-
authorizationKey
- (Optional) The authorization key which is associated with the Express Route Circuit Connection. -
addressPrefixIpv6
- (Optional) The IPv6 address space from which to allocate customer addresses for global reach.
-> NOTE: addressPrefixIpv6
cannot be set when ExpressRoute Circuit Connection with ExpressRoute Circuit based on ExpressRoute Port.
Attributes Reference
In addition to the Arguments listed above - the following Attributes are exported:
id
- The ID of the Express Route Circuit Connection.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the Express Route Circuit Connection.read
- (Defaults to 5 minutes) Used when retrieving the Express Route Circuit Connection.update
- (Defaults to 30 minutes) Used when updating the Express Route Circuit Connection.delete
- (Defaults to 30 minutes) Used when deleting the Express Route Circuit Connection.
Import
Express Route Circuit Connections can be imported using the resourceId
, e.g.