azurermExpressRouteGateway
Manages an ExpressRoute gateway.
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 azurermVirtualWanExample = new azurerm.virtualWan.VirtualWan(
this,
"example_1",
{
location: azurermResourceGroupExample.location,
name: "example-virtualwan",
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.*/
azurermVirtualWanExample.overrideLogicalId("example");
const azurermVirtualHubExample = new azurerm.virtualHub.VirtualHub(
this,
"example_2",
{
address_prefix: "10.0.1.0/24",
location: azurermResourceGroupExample.location,
name: "example-virtualhub",
resource_group_name: azurermResourceGroupExample.name,
virtual_wan_id: azurermVirtualWanExample.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.*/
azurermVirtualHubExample.overrideLogicalId("example");
const azurermExpressRouteGatewayExample =
new azurerm.expressRouteGateway.ExpressRouteGateway(this, "example_3", {
location: azurermResourceGroupExample.location,
name: "expressRoute1",
resource_group_name: azurermResourceGroupExample.name,
scale_units: 1,
tags: {
environment: "Production",
},
virtual_hub_id: azurermVirtualHubExample.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.*/
azurermExpressRouteGatewayExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
-
name
- (Required) The name of the ExpressRoute gateway. Changing this forces a new resource to be created. -
resourceGroupName
- (Required) The name of the resource group in which to create the ExpressRoute gateway. 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. -
virtualHubId
- (Required) The ID of a Virtual HUB within which the ExpressRoute gateway should be created. Changing this forces a new resource to be created. -
scaleUnits
- (Required) The number of scale units with which to provision the ExpressRoute gateway. Each scale unit is equal to 2Gbps, with support for up to 10 scale units (20Gbps). -
allowNonVirtualWanTraffic
- (Optional) Specified whether this gateway accept traffic from non-Virtual WAN networks. Defaults tofalse
. -
tags
- (Optional) A mapping of tags to assign to the resource.
Attributes Reference
The following attributes are exported:
id
- The ID of the ExpressRoute gateway.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
-
create
- (Defaults to 90 minutes) Used when creating the ExpressRoute Gateway. -
update
- (Defaults to 90 minutes) Used when updating the ExpressRoute Gateway. -
read
- (Defaults to 5 minutes) Used when retrieving the ExpressRoute Gateway. -
delete
- (Defaults to 90 minutes) Used when deleting the ExpressRoute Gateway.
Import
ExpressRoute Gateways can be imported using the resourceId
, e.g.