Bicep resource definition
The routeFilters resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.Network/routeFilters resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Network/routeFilters@2016-12-01' = {
location: 'string'
name: 'string'
properties: {
rules: [
{
id: 'string'
location: 'string'
properties: {
access: 'string'
communities: [
'string'
]
routeFilterRuleType: 'string'
}
tags: {
{customized property}: 'string'
}
}
]
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.Network/routeFilters
| Name |
Description |
Value |
| location |
Resource location. |
string |
| name |
The resource name |
string (required) |
| properties |
Route Filter Resource |
RouteFilterPropertiesFormat |
| tags |
Resource tags |
Dictionary of tag names and values. See Tags in templates |
| Name |
Description |
Value |
| rules |
Collection of RouteFilterRules contained within a route filter. |
RouteFilterRule[] |
RouteFilterRule
| Name |
Description |
Value |
| access |
The access type of the rule. Valid values are: 'Allow', 'Deny' |
'Allow' 'Deny' (required) |
| communities |
The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'] |
string[] (required) |
| routeFilterRuleType |
The rule type of the rule. Valid value is: 'Community' |
'Community' (required) |
Usage Examples
Bicep Samples
A basic example of deploying Route Filter.
param resourceName string = 'acctest0001'
param location string = 'westeurope'
resource routeFilter 'Microsoft.Network/routeFilters@2022-09-01' = {
name: resourceName
location: location
properties: {
rules: []
}
}
ARM template resource definition
The routeFilters resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.Network/routeFilters resource, add the following JSON to your template.
{
"type": "Microsoft.Network/routeFilters",
"apiVersion": "2016-12-01",
"name": "string",
"location": "string",
"properties": {
"rules": [
{
"id": "string",
"location": "string",
"properties": {
"access": "string",
"communities": [ "string" ],
"routeFilterRuleType": "string"
},
"tags": {
"{customized property}": "string"
}
}
]
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.Network/routeFilters
| Name |
Description |
Value |
| apiVersion |
The api version |
'2016-12-01' |
| location |
Resource location. |
string |
| name |
The resource name |
string (required) |
| properties |
Route Filter Resource |
RouteFilterPropertiesFormat |
| tags |
Resource tags |
Dictionary of tag names and values. See Tags in templates |
| type |
The resource type |
'Microsoft.Network/routeFilters' |
| Name |
Description |
Value |
| rules |
Collection of RouteFilterRules contained within a route filter. |
RouteFilterRule[] |
RouteFilterRule
| Name |
Description |
Value |
| access |
The access type of the rule. Valid values are: 'Allow', 'Deny' |
'Allow' 'Deny' (required) |
| communities |
The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'] |
string[] (required) |
| routeFilterRuleType |
The rule type of the rule. Valid value is: 'Community' |
'Community' (required) |
Usage Examples
The routeFilters resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.Network/routeFilters resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Network/routeFilters@2016-12-01"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
rules = [
{
id = "string"
location = "string"
properties = {
access = "string"
communities = [
"string"
]
routeFilterRuleType = "string"
}
tags = {
{customized property} = "string"
}
}
]
}
}
}
Property Values
Microsoft.Network/routeFilters
| Name |
Description |
Value |
| location |
Resource location. |
string |
| name |
The resource name |
string (required) |
| properties |
Route Filter Resource |
RouteFilterPropertiesFormat |
| tags |
Resource tags |
Dictionary of tag names and values. |
| type |
The resource type |
"Microsoft.Network/routeFilters@2016-12-01" |
| Name |
Description |
Value |
| rules |
Collection of RouteFilterRules contained within a route filter. |
RouteFilterRule[] |
RouteFilterRule
| Name |
Description |
Value |
| access |
The access type of the rule. Valid values are: 'Allow', 'Deny' |
'Allow' 'Deny' (required) |
| communities |
The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'] |
string[] (required) |
| routeFilterRuleType |
The rule type of the rule. Valid value is: 'Community' |
'Community' (required) |
Usage Examples
A basic example of deploying Route Filter.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westeurope"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "routeFilter" {
type = "Microsoft.Network/routeFilters@2022-09-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
rules = [
]
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}