We recommend using Azure Native.
azure.network.RouteFilter
Explore with Pulumi AI
Manages a Route Filter.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.network.RouteFilter("example", {
name: "example",
resourceGroupName: "example",
location: "East US",
rule: {
name: "rule",
access: "Allow",
ruleType: "Community",
communities: ["12076:52004"],
},
});
import pulumi
import pulumi_azure as azure
example = azure.network.RouteFilter("example",
name="example",
resource_group_name="example",
location="East US",
rule={
"name": "rule",
"access": "Allow",
"rule_type": "Community",
"communities": ["12076:52004"],
})
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := network.NewRouteFilter(ctx, "example", &network.RouteFilterArgs{
Name: pulumi.String("example"),
ResourceGroupName: pulumi.String("example"),
Location: pulumi.String("East US"),
Rule: &network.RouteFilterRuleArgs{
Name: pulumi.String("rule"),
Access: pulumi.String("Allow"),
RuleType: pulumi.String("Community"),
Communities: pulumi.StringArray{
pulumi.String("12076:52004"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Network.RouteFilter("example", new()
{
Name = "example",
ResourceGroupName = "example",
Location = "East US",
Rule = new Azure.Network.Inputs.RouteFilterRuleArgs
{
Name = "rule",
Access = "Allow",
RuleType = "Community",
Communities = new[]
{
"12076:52004",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.network.RouteFilter;
import com.pulumi.azure.network.RouteFilterArgs;
import com.pulumi.azure.network.inputs.RouteFilterRuleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new RouteFilter("example", RouteFilterArgs.builder()
.name("example")
.resourceGroupName("example")
.location("East US")
.rule(RouteFilterRuleArgs.builder()
.name("rule")
.access("Allow")
.ruleType("Community")
.communities("12076:52004")
.build())
.build());
}
}
resources:
example:
type: azure:network:RouteFilter
properties:
name: example
resourceGroupName: example
location: East US
rule:
name: rule
access: Allow
ruleType: Community
communities:
- 12076:52004
Create RouteFilter Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RouteFilter(name: string, args: RouteFilterArgs, opts?: CustomResourceOptions);
@overload
def RouteFilter(resource_name: str,
args: RouteFilterArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RouteFilter(resource_name: str,
opts: Optional[ResourceOptions] = None,
resource_group_name: Optional[str] = None,
location: Optional[str] = None,
name: Optional[str] = None,
rule: Optional[RouteFilterRuleArgs] = None,
tags: Optional[Mapping[str, str]] = None)
func NewRouteFilter(ctx *Context, name string, args RouteFilterArgs, opts ...ResourceOption) (*RouteFilter, error)
public RouteFilter(string name, RouteFilterArgs args, CustomResourceOptions? opts = null)
public RouteFilter(String name, RouteFilterArgs args)
public RouteFilter(String name, RouteFilterArgs args, CustomResourceOptions options)
type: azure:network:RouteFilter
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args RouteFilterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args RouteFilterArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RouteFilterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RouteFilterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RouteFilterArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var routeFilterResource = new Azure.Network.RouteFilter("routeFilterResource", new()
{
ResourceGroupName = "string",
Location = "string",
Name = "string",
Rule = new Azure.Network.Inputs.RouteFilterRuleArgs
{
Access = "string",
Communities = new[]
{
"string",
},
Name = "string",
RuleType = "string",
},
Tags =
{
{ "string", "string" },
},
});
example, err := network.NewRouteFilter(ctx, "routeFilterResource", &network.RouteFilterArgs{
ResourceGroupName: pulumi.String("string"),
Location: pulumi.String("string"),
Name: pulumi.String("string"),
Rule: &network.RouteFilterRuleArgs{
Access: pulumi.String("string"),
Communities: pulumi.StringArray{
pulumi.String("string"),
},
Name: pulumi.String("string"),
RuleType: pulumi.String("string"),
},
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var routeFilterResource = new RouteFilter("routeFilterResource", RouteFilterArgs.builder()
.resourceGroupName("string")
.location("string")
.name("string")
.rule(RouteFilterRuleArgs.builder()
.access("string")
.communities("string")
.name("string")
.ruleType("string")
.build())
.tags(Map.of("string", "string"))
.build());
route_filter_resource = azure.network.RouteFilter("routeFilterResource",
resource_group_name="string",
location="string",
name="string",
rule={
"access": "string",
"communities": ["string"],
"name": "string",
"ruleType": "string",
},
tags={
"string": "string",
})
const routeFilterResource = new azure.network.RouteFilter("routeFilterResource", {
resourceGroupName: "string",
location: "string",
name: "string",
rule: {
access: "string",
communities: ["string"],
name: "string",
ruleType: "string",
},
tags: {
string: "string",
},
});
type: azure:network:RouteFilter
properties:
location: string
name: string
resourceGroupName: string
rule:
access: string
communities:
- string
name: string
ruleType: string
tags:
string: string
RouteFilter Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The RouteFilter resource accepts the following input properties:
- Resource
Group stringName - The name of the Resource Group where the Route Filter should exist. Changing this forces a new Route Filter to be created.
- Location string
- The Azure Region where the Route Filter should exist. Changing this forces a new Route Filter to be created.
- Name string
- The Name which should be used for this Route Filter.
- Rule
Route
Filter Rule - A
rule
block as defined below. - Dictionary<string, string>
- A mapping of tags which should be assigned to the Route Filter.
- Resource
Group stringName - The name of the Resource Group where the Route Filter should exist. Changing this forces a new Route Filter to be created.
- Location string
- The Azure Region where the Route Filter should exist. Changing this forces a new Route Filter to be created.
- Name string
- The Name which should be used for this Route Filter.
- Rule
Route
Filter Rule Args - A
rule
block as defined below. - map[string]string
- A mapping of tags which should be assigned to the Route Filter.
- resource
Group StringName - The name of the Resource Group where the Route Filter should exist. Changing this forces a new Route Filter to be created.
- location String
- The Azure Region where the Route Filter should exist. Changing this forces a new Route Filter to be created.
- name String
- The Name which should be used for this Route Filter.
- rule
Route
Filter Rule - A
rule
block as defined below. - Map<String,String>
- A mapping of tags which should be assigned to the Route Filter.
- resource
Group stringName - The name of the Resource Group where the Route Filter should exist. Changing this forces a new Route Filter to be created.
- location string
- The Azure Region where the Route Filter should exist. Changing this forces a new Route Filter to be created.
- name string
- The Name which should be used for this Route Filter.
- rule
Route
Filter Rule - A
rule
block as defined below. - {[key: string]: string}
- A mapping of tags which should be assigned to the Route Filter.
- resource_
group_ strname - The name of the Resource Group where the Route Filter should exist. Changing this forces a new Route Filter to be created.
- location str
- The Azure Region where the Route Filter should exist. Changing this forces a new Route Filter to be created.
- name str
- The Name which should be used for this Route Filter.
- rule
Route
Filter Rule Args - A
rule
block as defined below. - Mapping[str, str]
- A mapping of tags which should be assigned to the Route Filter.
- resource
Group StringName - The name of the Resource Group where the Route Filter should exist. Changing this forces a new Route Filter to be created.
- location String
- The Azure Region where the Route Filter should exist. Changing this forces a new Route Filter to be created.
- name String
- The Name which should be used for this Route Filter.
- rule Property Map
- A
rule
block as defined below. - Map<String>
- A mapping of tags which should be assigned to the Route Filter.
Outputs
All input properties are implicitly available as output properties. Additionally, the RouteFilter resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing RouteFilter Resource
Get an existing RouteFilter resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: RouteFilterState, opts?: CustomResourceOptions): RouteFilter
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
location: Optional[str] = None,
name: Optional[str] = None,
resource_group_name: Optional[str] = None,
rule: Optional[RouteFilterRuleArgs] = None,
tags: Optional[Mapping[str, str]] = None) -> RouteFilter
func GetRouteFilter(ctx *Context, name string, id IDInput, state *RouteFilterState, opts ...ResourceOption) (*RouteFilter, error)
public static RouteFilter Get(string name, Input<string> id, RouteFilterState? state, CustomResourceOptions? opts = null)
public static RouteFilter get(String name, Output<String> id, RouteFilterState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Location string
- The Azure Region where the Route Filter should exist. Changing this forces a new Route Filter to be created.
- Name string
- The Name which should be used for this Route Filter.
- Resource
Group stringName - The name of the Resource Group where the Route Filter should exist. Changing this forces a new Route Filter to be created.
- Rule
Route
Filter Rule - A
rule
block as defined below. - Dictionary<string, string>
- A mapping of tags which should be assigned to the Route Filter.
- Location string
- The Azure Region where the Route Filter should exist. Changing this forces a new Route Filter to be created.
- Name string
- The Name which should be used for this Route Filter.
- Resource
Group stringName - The name of the Resource Group where the Route Filter should exist. Changing this forces a new Route Filter to be created.
- Rule
Route
Filter Rule Args - A
rule
block as defined below. - map[string]string
- A mapping of tags which should be assigned to the Route Filter.
- location String
- The Azure Region where the Route Filter should exist. Changing this forces a new Route Filter to be created.
- name String
- The Name which should be used for this Route Filter.
- resource
Group StringName - The name of the Resource Group where the Route Filter should exist. Changing this forces a new Route Filter to be created.
- rule
Route
Filter Rule - A
rule
block as defined below. - Map<String,String>
- A mapping of tags which should be assigned to the Route Filter.
- location string
- The Azure Region where the Route Filter should exist. Changing this forces a new Route Filter to be created.
- name string
- The Name which should be used for this Route Filter.
- resource
Group stringName - The name of the Resource Group where the Route Filter should exist. Changing this forces a new Route Filter to be created.
- rule
Route
Filter Rule - A
rule
block as defined below. - {[key: string]: string}
- A mapping of tags which should be assigned to the Route Filter.
- location str
- The Azure Region where the Route Filter should exist. Changing this forces a new Route Filter to be created.
- name str
- The Name which should be used for this Route Filter.
- resource_
group_ strname - The name of the Resource Group where the Route Filter should exist. Changing this forces a new Route Filter to be created.
- rule
Route
Filter Rule Args - A
rule
block as defined below. - Mapping[str, str]
- A mapping of tags which should be assigned to the Route Filter.
- location String
- The Azure Region where the Route Filter should exist. Changing this forces a new Route Filter to be created.
- name String
- The Name which should be used for this Route Filter.
- resource
Group StringName - The name of the Resource Group where the Route Filter should exist. Changing this forces a new Route Filter to be created.
- rule Property Map
- A
rule
block as defined below. - Map<String>
- A mapping of tags which should be assigned to the Route Filter.
Supporting Types
RouteFilterRule, RouteFilterRuleArgs
- Access string
- The access type of the rule. The only possible value is
Allow
. - Communities List<string>
- The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
- Name string
- The name of the route filter rule.
- Rule
Type string - The rule type of the rule. The only possible value is
Community
.
- Access string
- The access type of the rule. The only possible value is
Allow
. - Communities []string
- The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
- Name string
- The name of the route filter rule.
- Rule
Type string - The rule type of the rule. The only possible value is
Community
.
- access String
- The access type of the rule. The only possible value is
Allow
. - communities List<String>
- The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
- name String
- The name of the route filter rule.
- rule
Type String - The rule type of the rule. The only possible value is
Community
.
- access string
- The access type of the rule. The only possible value is
Allow
. - communities string[]
- The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
- name string
- The name of the route filter rule.
- rule
Type string - The rule type of the rule. The only possible value is
Community
.
- access str
- The access type of the rule. The only possible value is
Allow
. - communities Sequence[str]
- The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
- name str
- The name of the route filter rule.
- rule_
type str - The rule type of the rule. The only possible value is
Community
.
- access String
- The access type of the rule. The only possible value is
Allow
. - communities List<String>
- The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
- name String
- The name of the route filter rule.
- rule
Type String - The rule type of the rule. The only possible value is
Community
.
Import
Route Filters can be imported using the resource id
, e.g.
$ pulumi import azure:network/routeFilter:RouteFilter example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/routeFilters/routeFilter1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.