Skip to content

azurermRouteFilter

Manages a Route Filter.

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.*/
new azurerm.routeFilter.RouteFilter(this, "example", {
  location: "East US",
  name: "example",
  resource_group_name: "example",
  rule: [
    {
      access: "Allow",
      communities: ["12076:52004"],
      name: "rule",
      rule_type: "Community",
    },
  ],
});

Arguments Reference

The following arguments are supported:

  • location - (Required) The Azure Region where the Route Filter should exist. Changing this forces a new Route Filter to be created.

  • name - (Required) The Name which should be used for this Route Filter.

  • resourceGroupName - (Required) The name of the Resource Group where the Route Filter should exist. Changing this forces a new Route Filter to be created.


  • rule - (Optional) A rule block as defined below.

  • tags - (Optional) A mapping of tags which should be assigned to the Route Filter.


A rule block supports the following:

  • access - (Required) The access type of the rule. The only possible value is allow.

  • communities - (Required) The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].

  • name - (Required) The name of the route filter rule.

  • ruleType - (Required) The rule type of the rule. The only possible value is community.

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

  • id - The ID of the Route Filter.

Timeouts

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

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

Import

Route Filters can be imported using the resourceId, e.g.

terraform import azurerm_route_filter.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/routeFilters/routeFilter1