Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as routeros from "@pulumi/routeros";
const test = new routeros.RoutingBgpVpn("test", {
disabled: false,
"export": {
redistribute: "connected",
routeTargets: ["1:1"],
},
"import": {
routeTargets: ["1:2"],
},
labelAllocationPolicy: "per-vrf",
name: "bgp-mpls-vpn-test",
routeDistinguisher: "1.2.3.4:1",
vrf: "vrfTest1",
});
import pulumi
import pulumi_routeros as routeros
test = routeros.RoutingBgpVpn("test",
disabled=False,
export={
"redistribute": "connected",
"route_targets": ["1:1"],
},
import_={
"route_targets": ["1:2"],
},
label_allocation_policy="per-vrf",
name="bgp-mpls-vpn-test",
route_distinguisher="1.2.3.4:1",
vrf="vrfTest1")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/routeros/routeros"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := routeros.NewRoutingBgpVpn(ctx, "test", &routeros.RoutingBgpVpnArgs{
Disabled: pulumi.Bool(false),
Export: &routeros.RoutingBgpVpnExportArgs{
Redistribute: pulumi.String("connected"),
RouteTargets: pulumi.StringArray{
pulumi.String("1:1"),
},
},
Import: &routeros.RoutingBgpVpnImportArgs{
RouteTargets: pulumi.StringArray{
pulumi.String("1:2"),
},
},
LabelAllocationPolicy: pulumi.String("per-vrf"),
Name: pulumi.String("bgp-mpls-vpn-test"),
RouteDistinguisher: pulumi.String("1.2.3.4:1"),
Vrf: pulumi.String("vrfTest1"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Routeros = Pulumi.Routeros;
return await Deployment.RunAsync(() =>
{
var test = new Routeros.RoutingBgpVpn("test", new()
{
Disabled = false,
Export = new Routeros.Inputs.RoutingBgpVpnExportArgs
{
Redistribute = "connected",
RouteTargets = new[]
{
"1:1",
},
},
Import = new Routeros.Inputs.RoutingBgpVpnImportArgs
{
RouteTargets = new[]
{
"1:2",
},
},
LabelAllocationPolicy = "per-vrf",
Name = "bgp-mpls-vpn-test",
RouteDistinguisher = "1.2.3.4:1",
Vrf = "vrfTest1",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.routeros.RoutingBgpVpn;
import com.pulumi.routeros.RoutingBgpVpnArgs;
import com.pulumi.routeros.inputs.RoutingBgpVpnExportArgs;
import com.pulumi.routeros.inputs.RoutingBgpVpnImportArgs;
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 test = new RoutingBgpVpn("test", RoutingBgpVpnArgs.builder()
.disabled(false)
.export(RoutingBgpVpnExportArgs.builder()
.redistribute("connected")
.routeTargets("1:1")
.build())
.import_(RoutingBgpVpnImportArgs.builder()
.routeTargets("1:2")
.build())
.labelAllocationPolicy("per-vrf")
.name("bgp-mpls-vpn-test")
.routeDistinguisher("1.2.3.4:1")
.vrf("vrfTest1")
.build());
}
}
resources:
test:
type: routeros:RoutingBgpVpn
properties:
disabled: false
export:
redistribute: connected
routeTargets:
- 1:1
import:
routeTargets:
- 1:2
labelAllocationPolicy: per-vrf
name: bgp-mpls-vpn-test
routeDistinguisher: 1.2.3.4:1
vrf: vrfTest1
Create RoutingBgpVpn Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RoutingBgpVpn(name: string, args: RoutingBgpVpnArgs, opts?: CustomResourceOptions);@overload
def RoutingBgpVpn(resource_name: str,
args: RoutingBgpVpnArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RoutingBgpVpn(resource_name: str,
opts: Optional[ResourceOptions] = None,
route_distinguisher: Optional[str] = None,
___id_: Optional[float] = None,
___path_: Optional[str] = None,
disabled: Optional[bool] = None,
export: Optional[RoutingBgpVpnExportArgs] = None,
import_: Optional[RoutingBgpVpnImportArgs] = None,
instance: Optional[str] = None,
label_allocation_policy: Optional[str] = None,
name: Optional[str] = None,
routing_bgp_vpn_id: Optional[str] = None,
vrf: Optional[str] = None)func NewRoutingBgpVpn(ctx *Context, name string, args RoutingBgpVpnArgs, opts ...ResourceOption) (*RoutingBgpVpn, error)public RoutingBgpVpn(string name, RoutingBgpVpnArgs args, CustomResourceOptions? opts = null)
public RoutingBgpVpn(String name, RoutingBgpVpnArgs args)
public RoutingBgpVpn(String name, RoutingBgpVpnArgs args, CustomResourceOptions options)
type: routeros:RoutingBgpVpn
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 RoutingBgpVpnArgs
- 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 RoutingBgpVpnArgs
- 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 RoutingBgpVpnArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RoutingBgpVpnArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RoutingBgpVpnArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
RoutingBgpVpn Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The RoutingBgpVpn resource accepts the following input properties:
- Route
Distinguisher string - Helps to distinguish between overlapping routes from multiple VRFs. Should be unique per VRF. Accepts 3 types of formats.
- Disabled bool
- Export
Routing
Bgp Vpn Export - A group of parameters associated with the route export.
- Import
Routing
Bgp Vpn Import - A group of parameters associated with the route import.
- Instance string
- Name of the instance this VPN is assigned to.
- Label
Allocation stringPolicy - Label allocationpolicy.
- Name string
- VPN instance name.
- Routing
Bgp stringVpn Id - The ID of this resource.
- Vrf string
- The VRF table this resource operates on.
- ___
id_ double - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- Route
Distinguisher string - Helps to distinguish between overlapping routes from multiple VRFs. Should be unique per VRF. Accepts 3 types of formats.
- Disabled bool
- Export
Routing
Bgp Vpn Export Args - A group of parameters associated with the route export.
- Import
Routing
Bgp Vpn Import Args - A group of parameters associated with the route import.
- Instance string
- Name of the instance this VPN is assigned to.
- Label
Allocation stringPolicy - Label allocationpolicy.
- Name string
- VPN instance name.
- Routing
Bgp stringVpn Id - The ID of this resource.
- Vrf string
- The VRF table this resource operates on.
- ___
id_ float64 - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- route
Distinguisher String - Helps to distinguish between overlapping routes from multiple VRFs. Should be unique per VRF. Accepts 3 types of formats.
- ___
id_ Double - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ String - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- disabled Boolean
- export
Routing
Bgp Vpn Export - A group of parameters associated with the route export.
- import_
Routing
Bgp Vpn Import - A group of parameters associated with the route import.
- instance String
- Name of the instance this VPN is assigned to.
- label
Allocation StringPolicy - Label allocationpolicy.
- name String
- VPN instance name.
- routing
Bgp StringVpn Id - The ID of this resource.
- vrf String
- The VRF table this resource operates on.
- route
Distinguisher string - Helps to distinguish between overlapping routes from multiple VRFs. Should be unique per VRF. Accepts 3 types of formats.
- ___
id_ number - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- disabled boolean
- export
Routing
Bgp Vpn Export - A group of parameters associated with the route export.
- import
Routing
Bgp Vpn Import - A group of parameters associated with the route import.
- instance string
- Name of the instance this VPN is assigned to.
- label
Allocation stringPolicy - Label allocationpolicy.
- name string
- VPN instance name.
- routing
Bgp stringVpn Id - The ID of this resource.
- vrf string
- The VRF table this resource operates on.
- route_
distinguisher str - Helps to distinguish between overlapping routes from multiple VRFs. Should be unique per VRF. Accepts 3 types of formats.
- ___
id_ float - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ str - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- disabled bool
- export
Routing
Bgp Vpn Export Args - A group of parameters associated with the route export.
- import_
Routing
Bgp Vpn Import Args - A group of parameters associated with the route import.
- instance str
- Name of the instance this VPN is assigned to.
- label_
allocation_ strpolicy - Label allocationpolicy.
- name str
- VPN instance name.
- routing_
bgp_ strvpn_ id - The ID of this resource.
- vrf str
- The VRF table this resource operates on.
- route
Distinguisher String - Helps to distinguish between overlapping routes from multiple VRFs. Should be unique per VRF. Accepts 3 types of formats.
- ___
id_ Number - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ String - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- disabled Boolean
- export Property Map
- A group of parameters associated with the route export.
- import Property Map
- A group of parameters associated with the route import.
- instance String
- Name of the instance this VPN is assigned to.
- label
Allocation StringPolicy - Label allocationpolicy.
- name String
- VPN instance name.
- routing
Bgp StringVpn Id - The ID of this resource.
- vrf String
- The VRF table this resource operates on.
Outputs
All input properties are implicitly available as output properties. Additionally, the RoutingBgpVpn resource produces the following output properties:
Look up Existing RoutingBgpVpn Resource
Get an existing RoutingBgpVpn 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?: RoutingBgpVpnState, opts?: CustomResourceOptions): RoutingBgpVpn@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
___id_: Optional[float] = None,
___path_: Optional[str] = None,
disabled: Optional[bool] = None,
export: Optional[RoutingBgpVpnExportArgs] = None,
import_: Optional[RoutingBgpVpnImportArgs] = None,
inactive: Optional[bool] = None,
instance: Optional[str] = None,
label_allocation_policy: Optional[str] = None,
name: Optional[str] = None,
route_distinguisher: Optional[str] = None,
routing_bgp_vpn_id: Optional[str] = None,
vrf: Optional[str] = None) -> RoutingBgpVpnfunc GetRoutingBgpVpn(ctx *Context, name string, id IDInput, state *RoutingBgpVpnState, opts ...ResourceOption) (*RoutingBgpVpn, error)public static RoutingBgpVpn Get(string name, Input<string> id, RoutingBgpVpnState? state, CustomResourceOptions? opts = null)public static RoutingBgpVpn get(String name, Output<String> id, RoutingBgpVpnState state, CustomResourceOptions options)resources: _: type: routeros:RoutingBgpVpn get: id: ${id}- 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.
- Disabled bool
- Export
Routing
Bgp Vpn Export - A group of parameters associated with the route export.
- Import
Routing
Bgp Vpn Import - A group of parameters associated with the route import.
- Inactive bool
- Instance string
- Name of the instance this VPN is assigned to.
- Label
Allocation stringPolicy - Label allocationpolicy.
- Name string
- VPN instance name.
- Route
Distinguisher string - Helps to distinguish between overlapping routes from multiple VRFs. Should be unique per VRF. Accepts 3 types of formats.
- Routing
Bgp stringVpn Id - The ID of this resource.
- Vrf string
- The VRF table this resource operates on.
- ___
id_ double - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- Disabled bool
- Export
Routing
Bgp Vpn Export Args - A group of parameters associated with the route export.
- Import
Routing
Bgp Vpn Import Args - A group of parameters associated with the route import.
- Inactive bool
- Instance string
- Name of the instance this VPN is assigned to.
- Label
Allocation stringPolicy - Label allocationpolicy.
- Name string
- VPN instance name.
- Route
Distinguisher string - Helps to distinguish between overlapping routes from multiple VRFs. Should be unique per VRF. Accepts 3 types of formats.
- Routing
Bgp stringVpn Id - The ID of this resource.
- Vrf string
- The VRF table this resource operates on.
- ___
id_ float64 - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- ___
id_ Double - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ String - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- disabled Boolean
- export
Routing
Bgp Vpn Export - A group of parameters associated with the route export.
- import_
Routing
Bgp Vpn Import - A group of parameters associated with the route import.
- inactive Boolean
- instance String
- Name of the instance this VPN is assigned to.
- label
Allocation StringPolicy - Label allocationpolicy.
- name String
- VPN instance name.
- route
Distinguisher String - Helps to distinguish between overlapping routes from multiple VRFs. Should be unique per VRF. Accepts 3 types of formats.
- routing
Bgp StringVpn Id - The ID of this resource.
- vrf String
- The VRF table this resource operates on.
- ___
id_ number - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- disabled boolean
- export
Routing
Bgp Vpn Export - A group of parameters associated with the route export.
- import
Routing
Bgp Vpn Import - A group of parameters associated with the route import.
- inactive boolean
- instance string
- Name of the instance this VPN is assigned to.
- label
Allocation stringPolicy - Label allocationpolicy.
- name string
- VPN instance name.
- route
Distinguisher string - Helps to distinguish between overlapping routes from multiple VRFs. Should be unique per VRF. Accepts 3 types of formats.
- routing
Bgp stringVpn Id - The ID of this resource.
- vrf string
- The VRF table this resource operates on.
- ___
id_ float - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ str - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- disabled bool
- export
Routing
Bgp Vpn Export Args - A group of parameters associated with the route export.
- import_
Routing
Bgp Vpn Import Args - A group of parameters associated with the route import.
- inactive bool
- instance str
- Name of the instance this VPN is assigned to.
- label_
allocation_ strpolicy - Label allocationpolicy.
- name str
- VPN instance name.
- route_
distinguisher str - Helps to distinguish between overlapping routes from multiple VRFs. Should be unique per VRF. Accepts 3 types of formats.
- routing_
bgp_ strvpn_ id - The ID of this resource.
- vrf str
- The VRF table this resource operates on.
- ___
id_ Number - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ String - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- disabled Boolean
- export Property Map
- A group of parameters associated with the route export.
- import Property Map
- A group of parameters associated with the route import.
- inactive Boolean
- instance String
- Name of the instance this VPN is assigned to.
- label
Allocation StringPolicy - Label allocationpolicy.
- name String
- VPN instance name.
- route
Distinguisher String - Helps to distinguish between overlapping routes from multiple VRFs. Should be unique per VRF. Accepts 3 types of formats.
- routing
Bgp StringVpn Id - The ID of this resource.
- vrf String
- The VRF table this resource operates on.
Supporting Types
RoutingBgpVpnExport, RoutingBgpVpnExportArgs
- Filter
Chain string - The name of the routing filter chain that is used to filter prefixes before exporting.
- Filter
Select string - The name of the select filter chain that is used to select prefixes to be exported exporting.
- Redistribute string
- Enable redistribution of specified route types from VRF to VPNv4.
- Route
Targets List<string> - List of route targets added when exporting VPNv4 routes. The accepted RT format is similar to the one for Route Distinguishers.
- Filter
Chain string - The name of the routing filter chain that is used to filter prefixes before exporting.
- Filter
Select string - The name of the select filter chain that is used to select prefixes to be exported exporting.
- Redistribute string
- Enable redistribution of specified route types from VRF to VPNv4.
- Route
Targets []string - List of route targets added when exporting VPNv4 routes. The accepted RT format is similar to the one for Route Distinguishers.
- filter
Chain String - The name of the routing filter chain that is used to filter prefixes before exporting.
- filter
Select String - The name of the select filter chain that is used to select prefixes to be exported exporting.
- redistribute String
- Enable redistribution of specified route types from VRF to VPNv4.
- route
Targets List<String> - List of route targets added when exporting VPNv4 routes. The accepted RT format is similar to the one for Route Distinguishers.
- filter
Chain string - The name of the routing filter chain that is used to filter prefixes before exporting.
- filter
Select string - The name of the select filter chain that is used to select prefixes to be exported exporting.
- redistribute string
- Enable redistribution of specified route types from VRF to VPNv4.
- route
Targets string[] - List of route targets added when exporting VPNv4 routes. The accepted RT format is similar to the one for Route Distinguishers.
- filter_
chain str - The name of the routing filter chain that is used to filter prefixes before exporting.
- filter_
select str - The name of the select filter chain that is used to select prefixes to be exported exporting.
- redistribute str
- Enable redistribution of specified route types from VRF to VPNv4.
- route_
targets Sequence[str] - List of route targets added when exporting VPNv4 routes. The accepted RT format is similar to the one for Route Distinguishers.
- filter
Chain String - The name of the routing filter chain that is used to filter prefixes before exporting.
- filter
Select String - The name of the select filter chain that is used to select prefixes to be exported exporting.
- redistribute String
- Enable redistribution of specified route types from VRF to VPNv4.
- route
Targets List<String> - List of route targets added when exporting VPNv4 routes. The accepted RT format is similar to the one for Route Distinguishers.
RoutingBgpVpnImport, RoutingBgpVpnImportArgs
- Filter
Chain string - The name of the routing filter chain that is used to filter prefixes during import.
- Route
Targets List<string> - List of route targets that will be used to import VPNv4 routes. The accepted RT format is similar to the one for Route Distinguishers.
- Router
Id string - The router ID of the BGP instance that will be used for the BGP best path selection algorithm.
- Filter
Chain string - The name of the routing filter chain that is used to filter prefixes during import.
- Route
Targets []string - List of route targets that will be used to import VPNv4 routes. The accepted RT format is similar to the one for Route Distinguishers.
- Router
Id string - The router ID of the BGP instance that will be used for the BGP best path selection algorithm.
- filter
Chain String - The name of the routing filter chain that is used to filter prefixes during import.
- route
Targets List<String> - List of route targets that will be used to import VPNv4 routes. The accepted RT format is similar to the one for Route Distinguishers.
- router
Id String - The router ID of the BGP instance that will be used for the BGP best path selection algorithm.
- filter
Chain string - The name of the routing filter chain that is used to filter prefixes during import.
- route
Targets string[] - List of route targets that will be used to import VPNv4 routes. The accepted RT format is similar to the one for Route Distinguishers.
- router
Id string - The router ID of the BGP instance that will be used for the BGP best path selection algorithm.
- filter_
chain str - The name of the routing filter chain that is used to filter prefixes during import.
- route_
targets Sequence[str] - List of route targets that will be used to import VPNv4 routes. The accepted RT format is similar to the one for Route Distinguishers.
- router_
id str - The router ID of the BGP instance that will be used for the BGP best path selection algorithm.
- filter
Chain String - The name of the routing filter chain that is used to filter prefixes during import.
- route
Targets List<String> - List of route targets that will be used to import VPNv4 routes. The accepted RT format is similar to the one for Route Distinguishers.
- router
Id String - The router ID of the BGP instance that will be used for the BGP best path selection algorithm.
Import
#The ID can be found via API or the terminal
#The command for the terminal is -> :put [/routing/bgp/vpn get [print show-ids]]
$ pulumi import routeros:index/routingBgpVpn:RoutingBgpVpn test *3
#Or you can import a resource using one of its attributes
$ pulumi import routeros:index/routingBgpVpn:RoutingBgpVpn test "name=xxx"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- routeros terraform-routeros/terraform-provider-routeros
- License
- Notes
- This Pulumi package is based on the
routerosTerraform Provider.
