Skip to content

azurermExpressRoutePortAuthorization

Manages an ExpressRoute Port Authorization.

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 azurermExpressRoutePortExample =
  new azurerm.expressRoutePort.ExpressRoutePort(this, "example_1", {
    bandwidth_in_gbps: 10,
    encapsulation: "Dot1Q",
    location: azurermResourceGroupExample.location,
    name: "port1",
    peering_location: "Airtel-Chennai-CLS",
    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 azurermExpressRoutePortAuthorizationExample =
  new azurerm.expressRoutePortAuthorization.ExpressRoutePortAuthorization(
    this,
    "example_2",
    {
      express_route_port_name: azurermExpressRoutePortExample.name,
      name: "exampleERCAuth",
      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.*/
azurermExpressRoutePortAuthorizationExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

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

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

  • expressRoutePortName - (Required) The name of the Express Route Port in which to create the Authorization. Changing this forces a new resource to be created.

Attributes Reference

The following attributes are exported:

  • id - The ID of the ExpressRoute Port Authorization.

  • authorizationKey - The Authorization Key.

  • authorizationUseStatus - The authorization use status.

Timeouts

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

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

Import

ExpressRoute Port Authorizations can be imported using the resourceId, e.g.

terraform import azurerm_express_route_port_authorization.auth1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/expressRoutePorts/myExpressPort/authorizations/auth1