megaport.McrPrefixFilterList
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as megaport from "@pulumi/megaport";
// Basic IPv4 prefix filter list example
const ipv4Example = new megaport.McrPrefixFilterList("ipv4_example", {
mcrId: "11111111-1111-1111-1111-111111111111",
description: "IPv4 Prefix Filter List Example",
addressFamily: "IPv4",
entries: [
{
action: "permit",
prefix: "10.0.0.0/8",
ge: 16,
le: 24,
},
{
action: "permit",
prefix: "172.16.0.0/12",
},
{
action: "deny",
prefix: "192.168.1.0/24",
ge: 24,
le: 32,
},
],
});
// IPv6 prefix filter list example
const ipv6Example = new megaport.McrPrefixFilterList("ipv6_example", {
mcrId: "11111111-1111-1111-1111-111111111111",
description: "IPv6 Prefix Filter List Example",
addressFamily: "IPv6",
entries: [
{
action: "permit",
prefix: "2001:db8::/32",
ge: 48,
le: 64,
},
{
action: "deny",
prefix: "2001:db8:bad::/48",
},
],
});
// Multiple prefix filter lists on the same MCR
const inboundFilter = new megaport.McrPrefixFilterList("inbound_filter", {
mcrId: "11111111-1111-1111-1111-111111111111",
description: "Inbound Traffic Filter",
addressFamily: "IPv4",
entries: [
{
action: "permit",
prefix: "203.0.113.0/24",
ge: 24,
le: 30,
},
{
action: "deny",
prefix: "0.0.0.0/0",
le: 7,
},
],
});
const outboundFilter = new megaport.McrPrefixFilterList("outbound_filter", {
mcrId: "11111111-1111-1111-1111-111111111111",
description: "Outbound Traffic Filter",
addressFamily: "IPv4",
entries: [
{
action: "permit",
prefix: "10.0.0.0/8",
ge: 24,
le: 32,
},
{
action: "permit",
prefix: "172.16.0.0/12",
ge: 24,
le: 32,
},
],
});
// Using with an existing MCR resource
const exampleMcr = new megaport.Mcr("example_mcr", {
productName: "MCR for Prefix Filter Lists",
portSpeed: 1000,
locationId: 6,
contractTermMonths: 1,
});
const dynamicExample = new megaport.McrPrefixFilterList("dynamic_example", {
mcrId: exampleMcr.productUid,
description: "Dynamic MCR Prefix Filter List",
addressFamily: "IPv4",
entries: [{
action: "permit",
prefix: "198.51.100.0/24",
ge: 28,
le: 32,
}],
});
export const prefixFilterListId = ipv4Example.prefixFilterListId;
import pulumi
import pulumi_megaport as megaport
# Basic IPv4 prefix filter list example
ipv4_example = megaport.McrPrefixFilterList("ipv4_example",
mcr_id="11111111-1111-1111-1111-111111111111",
description="IPv4 Prefix Filter List Example",
address_family="IPv4",
entries=[
{
"action": "permit",
"prefix": "10.0.0.0/8",
"ge": 16,
"le": 24,
},
{
"action": "permit",
"prefix": "172.16.0.0/12",
},
{
"action": "deny",
"prefix": "192.168.1.0/24",
"ge": 24,
"le": 32,
},
])
# IPv6 prefix filter list example
ipv6_example = megaport.McrPrefixFilterList("ipv6_example",
mcr_id="11111111-1111-1111-1111-111111111111",
description="IPv6 Prefix Filter List Example",
address_family="IPv6",
entries=[
{
"action": "permit",
"prefix": "2001:db8::/32",
"ge": 48,
"le": 64,
},
{
"action": "deny",
"prefix": "2001:db8:bad::/48",
},
])
# Multiple prefix filter lists on the same MCR
inbound_filter = megaport.McrPrefixFilterList("inbound_filter",
mcr_id="11111111-1111-1111-1111-111111111111",
description="Inbound Traffic Filter",
address_family="IPv4",
entries=[
{
"action": "permit",
"prefix": "203.0.113.0/24",
"ge": 24,
"le": 30,
},
{
"action": "deny",
"prefix": "0.0.0.0/0",
"le": 7,
},
])
outbound_filter = megaport.McrPrefixFilterList("outbound_filter",
mcr_id="11111111-1111-1111-1111-111111111111",
description="Outbound Traffic Filter",
address_family="IPv4",
entries=[
{
"action": "permit",
"prefix": "10.0.0.0/8",
"ge": 24,
"le": 32,
},
{
"action": "permit",
"prefix": "172.16.0.0/12",
"ge": 24,
"le": 32,
},
])
# Using with an existing MCR resource
example_mcr = megaport.Mcr("example_mcr",
product_name="MCR for Prefix Filter Lists",
port_speed=1000,
location_id=6,
contract_term_months=1)
dynamic_example = megaport.McrPrefixFilterList("dynamic_example",
mcr_id=example_mcr.product_uid,
description="Dynamic MCR Prefix Filter List",
address_family="IPv4",
entries=[{
"action": "permit",
"prefix": "198.51.100.0/24",
"ge": 28,
"le": 32,
}])
pulumi.export("prefixFilterListId", ipv4_example.prefix_filter_list_id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/megaport/megaport"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Basic IPv4 prefix filter list example
ipv4Example, err := megaport.NewMcrPrefixFilterList(ctx, "ipv4_example", &megaport.McrPrefixFilterListArgs{
McrId: pulumi.String("11111111-1111-1111-1111-111111111111"),
Description: pulumi.String("IPv4 Prefix Filter List Example"),
AddressFamily: pulumi.String("IPv4"),
Entries: megaport.McrPrefixFilterListEntryArray{
&megaport.McrPrefixFilterListEntryArgs{
Action: pulumi.String("permit"),
Prefix: pulumi.String("10.0.0.0/8"),
Ge: pulumi.Float64(16),
Le: pulumi.Float64(24),
},
&megaport.McrPrefixFilterListEntryArgs{
Action: pulumi.String("permit"),
Prefix: pulumi.String("172.16.0.0/12"),
},
&megaport.McrPrefixFilterListEntryArgs{
Action: pulumi.String("deny"),
Prefix: pulumi.String("192.168.1.0/24"),
Ge: pulumi.Float64(24),
Le: pulumi.Float64(32),
},
},
})
if err != nil {
return err
}
// IPv6 prefix filter list example
_, err = megaport.NewMcrPrefixFilterList(ctx, "ipv6_example", &megaport.McrPrefixFilterListArgs{
McrId: pulumi.String("11111111-1111-1111-1111-111111111111"),
Description: pulumi.String("IPv6 Prefix Filter List Example"),
AddressFamily: pulumi.String("IPv6"),
Entries: megaport.McrPrefixFilterListEntryArray{
&megaport.McrPrefixFilterListEntryArgs{
Action: pulumi.String("permit"),
Prefix: pulumi.String("2001:db8::/32"),
Ge: pulumi.Float64(48),
Le: pulumi.Float64(64),
},
&megaport.McrPrefixFilterListEntryArgs{
Action: pulumi.String("deny"),
Prefix: pulumi.String("2001:db8:bad::/48"),
},
},
})
if err != nil {
return err
}
// Multiple prefix filter lists on the same MCR
_, err = megaport.NewMcrPrefixFilterList(ctx, "inbound_filter", &megaport.McrPrefixFilterListArgs{
McrId: pulumi.String("11111111-1111-1111-1111-111111111111"),
Description: pulumi.String("Inbound Traffic Filter"),
AddressFamily: pulumi.String("IPv4"),
Entries: megaport.McrPrefixFilterListEntryArray{
&megaport.McrPrefixFilterListEntryArgs{
Action: pulumi.String("permit"),
Prefix: pulumi.String("203.0.113.0/24"),
Ge: pulumi.Float64(24),
Le: pulumi.Float64(30),
},
&megaport.McrPrefixFilterListEntryArgs{
Action: pulumi.String("deny"),
Prefix: pulumi.String("0.0.0.0/0"),
Le: pulumi.Float64(7),
},
},
})
if err != nil {
return err
}
_, err = megaport.NewMcrPrefixFilterList(ctx, "outbound_filter", &megaport.McrPrefixFilterListArgs{
McrId: pulumi.String("11111111-1111-1111-1111-111111111111"),
Description: pulumi.String("Outbound Traffic Filter"),
AddressFamily: pulumi.String("IPv4"),
Entries: megaport.McrPrefixFilterListEntryArray{
&megaport.McrPrefixFilterListEntryArgs{
Action: pulumi.String("permit"),
Prefix: pulumi.String("10.0.0.0/8"),
Ge: pulumi.Float64(24),
Le: pulumi.Float64(32),
},
&megaport.McrPrefixFilterListEntryArgs{
Action: pulumi.String("permit"),
Prefix: pulumi.String("172.16.0.0/12"),
Ge: pulumi.Float64(24),
Le: pulumi.Float64(32),
},
},
})
if err != nil {
return err
}
// Using with an existing MCR resource
exampleMcr, err := megaport.NewMcr(ctx, "example_mcr", &megaport.McrArgs{
ProductName: pulumi.String("MCR for Prefix Filter Lists"),
PortSpeed: pulumi.Float64(1000),
LocationId: pulumi.Float64(6),
ContractTermMonths: pulumi.Float64(1),
})
if err != nil {
return err
}
_, err = megaport.NewMcrPrefixFilterList(ctx, "dynamic_example", &megaport.McrPrefixFilterListArgs{
McrId: exampleMcr.ProductUid,
Description: pulumi.String("Dynamic MCR Prefix Filter List"),
AddressFamily: pulumi.String("IPv4"),
Entries: megaport.McrPrefixFilterListEntryArray{
&megaport.McrPrefixFilterListEntryArgs{
Action: pulumi.String("permit"),
Prefix: pulumi.String("198.51.100.0/24"),
Ge: pulumi.Float64(28),
Le: pulumi.Float64(32),
},
},
})
if err != nil {
return err
}
ctx.Export("prefixFilterListId", ipv4Example.PrefixFilterListId)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Megaport = Pulumi.Megaport;
return await Deployment.RunAsync(() =>
{
// Basic IPv4 prefix filter list example
var ipv4Example = new Megaport.McrPrefixFilterList("ipv4_example", new()
{
McrId = "11111111-1111-1111-1111-111111111111",
Description = "IPv4 Prefix Filter List Example",
AddressFamily = "IPv4",
Entries = new[]
{
new Megaport.Inputs.McrPrefixFilterListEntryArgs
{
Action = "permit",
Prefix = "10.0.0.0/8",
Ge = 16,
Le = 24,
},
new Megaport.Inputs.McrPrefixFilterListEntryArgs
{
Action = "permit",
Prefix = "172.16.0.0/12",
},
new Megaport.Inputs.McrPrefixFilterListEntryArgs
{
Action = "deny",
Prefix = "192.168.1.0/24",
Ge = 24,
Le = 32,
},
},
});
// IPv6 prefix filter list example
var ipv6Example = new Megaport.McrPrefixFilterList("ipv6_example", new()
{
McrId = "11111111-1111-1111-1111-111111111111",
Description = "IPv6 Prefix Filter List Example",
AddressFamily = "IPv6",
Entries = new[]
{
new Megaport.Inputs.McrPrefixFilterListEntryArgs
{
Action = "permit",
Prefix = "2001:db8::/32",
Ge = 48,
Le = 64,
},
new Megaport.Inputs.McrPrefixFilterListEntryArgs
{
Action = "deny",
Prefix = "2001:db8:bad::/48",
},
},
});
// Multiple prefix filter lists on the same MCR
var inboundFilter = new Megaport.McrPrefixFilterList("inbound_filter", new()
{
McrId = "11111111-1111-1111-1111-111111111111",
Description = "Inbound Traffic Filter",
AddressFamily = "IPv4",
Entries = new[]
{
new Megaport.Inputs.McrPrefixFilterListEntryArgs
{
Action = "permit",
Prefix = "203.0.113.0/24",
Ge = 24,
Le = 30,
},
new Megaport.Inputs.McrPrefixFilterListEntryArgs
{
Action = "deny",
Prefix = "0.0.0.0/0",
Le = 7,
},
},
});
var outboundFilter = new Megaport.McrPrefixFilterList("outbound_filter", new()
{
McrId = "11111111-1111-1111-1111-111111111111",
Description = "Outbound Traffic Filter",
AddressFamily = "IPv4",
Entries = new[]
{
new Megaport.Inputs.McrPrefixFilterListEntryArgs
{
Action = "permit",
Prefix = "10.0.0.0/8",
Ge = 24,
Le = 32,
},
new Megaport.Inputs.McrPrefixFilterListEntryArgs
{
Action = "permit",
Prefix = "172.16.0.0/12",
Ge = 24,
Le = 32,
},
},
});
// Using with an existing MCR resource
var exampleMcr = new Megaport.Mcr("example_mcr", new()
{
ProductName = "MCR for Prefix Filter Lists",
PortSpeed = 1000,
LocationId = 6,
ContractTermMonths = 1,
});
var dynamicExample = new Megaport.McrPrefixFilterList("dynamic_example", new()
{
McrId = exampleMcr.ProductUid,
Description = "Dynamic MCR Prefix Filter List",
AddressFamily = "IPv4",
Entries = new[]
{
new Megaport.Inputs.McrPrefixFilterListEntryArgs
{
Action = "permit",
Prefix = "198.51.100.0/24",
Ge = 28,
Le = 32,
},
},
});
return new Dictionary<string, object?>
{
["prefixFilterListId"] = ipv4Example.PrefixFilterListId,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.megaport.McrPrefixFilterList;
import com.pulumi.megaport.McrPrefixFilterListArgs;
import com.pulumi.megaport.inputs.McrPrefixFilterListEntryArgs;
import com.pulumi.megaport.Mcr;
import com.pulumi.megaport.McrArgs;
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) {
// Basic IPv4 prefix filter list example
var ipv4Example = new McrPrefixFilterList("ipv4Example", McrPrefixFilterListArgs.builder()
.mcrId("11111111-1111-1111-1111-111111111111")
.description("IPv4 Prefix Filter List Example")
.addressFamily("IPv4")
.entries(
McrPrefixFilterListEntryArgs.builder()
.action("permit")
.prefix("10.0.0.0/8")
.ge(16.0)
.le(24.0)
.build(),
McrPrefixFilterListEntryArgs.builder()
.action("permit")
.prefix("172.16.0.0/12")
.build(),
McrPrefixFilterListEntryArgs.builder()
.action("deny")
.prefix("192.168.1.0/24")
.ge(24.0)
.le(32.0)
.build())
.build());
// IPv6 prefix filter list example
var ipv6Example = new McrPrefixFilterList("ipv6Example", McrPrefixFilterListArgs.builder()
.mcrId("11111111-1111-1111-1111-111111111111")
.description("IPv6 Prefix Filter List Example")
.addressFamily("IPv6")
.entries(
McrPrefixFilterListEntryArgs.builder()
.action("permit")
.prefix("2001:db8::/32")
.ge(48.0)
.le(64.0)
.build(),
McrPrefixFilterListEntryArgs.builder()
.action("deny")
.prefix("2001:db8:bad::/48")
.build())
.build());
// Multiple prefix filter lists on the same MCR
var inboundFilter = new McrPrefixFilterList("inboundFilter", McrPrefixFilterListArgs.builder()
.mcrId("11111111-1111-1111-1111-111111111111")
.description("Inbound Traffic Filter")
.addressFamily("IPv4")
.entries(
McrPrefixFilterListEntryArgs.builder()
.action("permit")
.prefix("203.0.113.0/24")
.ge(24.0)
.le(30.0)
.build(),
McrPrefixFilterListEntryArgs.builder()
.action("deny")
.prefix("0.0.0.0/0")
.le(7.0)
.build())
.build());
var outboundFilter = new McrPrefixFilterList("outboundFilter", McrPrefixFilterListArgs.builder()
.mcrId("11111111-1111-1111-1111-111111111111")
.description("Outbound Traffic Filter")
.addressFamily("IPv4")
.entries(
McrPrefixFilterListEntryArgs.builder()
.action("permit")
.prefix("10.0.0.0/8")
.ge(24.0)
.le(32.0)
.build(),
McrPrefixFilterListEntryArgs.builder()
.action("permit")
.prefix("172.16.0.0/12")
.ge(24.0)
.le(32.0)
.build())
.build());
// Using with an existing MCR resource
var exampleMcr = new Mcr("exampleMcr", McrArgs.builder()
.productName("MCR for Prefix Filter Lists")
.portSpeed(1000.0)
.locationId(6.0)
.contractTermMonths(1.0)
.build());
var dynamicExample = new McrPrefixFilterList("dynamicExample", McrPrefixFilterListArgs.builder()
.mcrId(exampleMcr.productUid())
.description("Dynamic MCR Prefix Filter List")
.addressFamily("IPv4")
.entries(McrPrefixFilterListEntryArgs.builder()
.action("permit")
.prefix("198.51.100.0/24")
.ge(28.0)
.le(32.0)
.build())
.build());
ctx.export("prefixFilterListId", ipv4Example.prefixFilterListId());
}
}
resources:
# Basic IPv4 prefix filter list example
ipv4Example:
type: megaport:McrPrefixFilterList
name: ipv4_example
properties:
mcrId: 11111111-1111-1111-1111-111111111111
description: IPv4 Prefix Filter List Example
addressFamily: IPv4
entries:
- action: permit
prefix: 10.0.0.0/8
ge: 16
le: 24
- action: permit
prefix: 172.16.0.0/12
- action: deny
prefix: 192.168.1.0/24
ge: 24
le: 32
# IPv6 prefix filter list example
ipv6Example:
type: megaport:McrPrefixFilterList
name: ipv6_example
properties:
mcrId: 11111111-1111-1111-1111-111111111111
description: IPv6 Prefix Filter List Example
addressFamily: IPv6
entries:
- action: permit
prefix: 2001:db8::/32
ge: 48
le: 64
- action: deny
prefix: 2001:db8:bad::/48
# Multiple prefix filter lists on the same MCR
inboundFilter:
type: megaport:McrPrefixFilterList
name: inbound_filter
properties:
mcrId: 11111111-1111-1111-1111-111111111111
description: Inbound Traffic Filter
addressFamily: IPv4
entries:
- action: permit
prefix: 203.0.113.0/24
ge: 24
le: 30
- action: deny
prefix: 0.0.0.0/0
le: 7
outboundFilter:
type: megaport:McrPrefixFilterList
name: outbound_filter
properties:
mcrId: 11111111-1111-1111-1111-111111111111
description: Outbound Traffic Filter
addressFamily: IPv4
entries:
- action: permit
prefix: 10.0.0.0/8
ge: 24
le: 32
- action: permit
prefix: 172.16.0.0/12
ge: 24
le: 32
# Using with an existing MCR resource
exampleMcr:
type: megaport:Mcr
name: example_mcr
properties:
productName: MCR for Prefix Filter Lists
portSpeed: 1000
locationId: 6
contractTermMonths: 1
dynamicExample:
type: megaport:McrPrefixFilterList
name: dynamic_example
properties:
mcrId: ${exampleMcr.productUid}
description: Dynamic MCR Prefix Filter List
addressFamily: IPv4
entries:
- action: permit
prefix: 198.51.100.0/24
ge: 28
le: 32
outputs:
# Output the prefix filter list ID for reference
prefixFilterListId: ${ipv4Example.prefixFilterListId}
Create McrPrefixFilterList Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new McrPrefixFilterList(name: string, args: McrPrefixFilterListArgs, opts?: CustomResourceOptions);@overload
def McrPrefixFilterList(resource_name: str,
args: McrPrefixFilterListInitArgs,
opts: Optional[ResourceOptions] = None)
@overload
def McrPrefixFilterList(resource_name: str,
opts: Optional[ResourceOptions] = None,
address_family: Optional[str] = None,
description: Optional[str] = None,
entries: Optional[Sequence[McrPrefixFilterListEntryArgs]] = None,
mcr_id: Optional[str] = None)func NewMcrPrefixFilterList(ctx *Context, name string, args McrPrefixFilterListArgs, opts ...ResourceOption) (*McrPrefixFilterList, error)public McrPrefixFilterList(string name, McrPrefixFilterListArgs args, CustomResourceOptions? opts = null)
public McrPrefixFilterList(String name, McrPrefixFilterListArgs args)
public McrPrefixFilterList(String name, McrPrefixFilterListArgs args, CustomResourceOptions options)
type: megaport:McrPrefixFilterList
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 McrPrefixFilterListArgs
- 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 McrPrefixFilterListInitArgs
- 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 McrPrefixFilterListArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args McrPrefixFilterListArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args McrPrefixFilterListArgs
- 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 mcrPrefixFilterListResource = new Megaport.McrPrefixFilterList("mcrPrefixFilterListResource", new()
{
AddressFamily = "string",
Description = "string",
Entries = new[]
{
new Megaport.Inputs.McrPrefixFilterListEntryArgs
{
Action = "string",
Prefix = "string",
Ge = 0,
Le = 0,
},
},
McrId = "string",
});
example, err := megaport.NewMcrPrefixFilterList(ctx, "mcrPrefixFilterListResource", &megaport.McrPrefixFilterListArgs{
AddressFamily: pulumi.String("string"),
Description: pulumi.String("string"),
Entries: megaport.McrPrefixFilterListEntryArray{
&megaport.McrPrefixFilterListEntryArgs{
Action: pulumi.String("string"),
Prefix: pulumi.String("string"),
Ge: pulumi.Float64(0),
Le: pulumi.Float64(0),
},
},
McrId: pulumi.String("string"),
})
var mcrPrefixFilterListResource = new McrPrefixFilterList("mcrPrefixFilterListResource", McrPrefixFilterListArgs.builder()
.addressFamily("string")
.description("string")
.entries(McrPrefixFilterListEntryArgs.builder()
.action("string")
.prefix("string")
.ge(0.0)
.le(0.0)
.build())
.mcrId("string")
.build());
mcr_prefix_filter_list_resource = megaport.McrPrefixFilterList("mcrPrefixFilterListResource",
address_family="string",
description="string",
entries=[{
"action": "string",
"prefix": "string",
"ge": 0,
"le": 0,
}],
mcr_id="string")
const mcrPrefixFilterListResource = new megaport.McrPrefixFilterList("mcrPrefixFilterListResource", {
addressFamily: "string",
description: "string",
entries: [{
action: "string",
prefix: "string",
ge: 0,
le: 0,
}],
mcrId: "string",
});
type: megaport:McrPrefixFilterList
properties:
addressFamily: string
description: string
entries:
- action: string
ge: 0
le: 0
prefix: string
mcrId: string
McrPrefixFilterList 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 McrPrefixFilterList resource accepts the following input properties:
- Address
Family string - The IP address standard of the IP network addresses in the prefix filter list. Valid values are 'IPv4' and 'IPv6' (case-insensitive).
- Description string
- Description of the prefix filter list.
- Entries
List<Mcr
Prefix Filter List Entry> - Entries in the prefix filter list. Must contain between 1 and 200 entries.
- Mcr
Id string - The UID of the MCR instance this prefix filter list belongs to.
- Address
Family string - The IP address standard of the IP network addresses in the prefix filter list. Valid values are 'IPv4' and 'IPv6' (case-insensitive).
- Description string
- Description of the prefix filter list.
- Entries
[]Mcr
Prefix Filter List Entry Args - Entries in the prefix filter list. Must contain between 1 and 200 entries.
- Mcr
Id string - The UID of the MCR instance this prefix filter list belongs to.
- address
Family String - The IP address standard of the IP network addresses in the prefix filter list. Valid values are 'IPv4' and 'IPv6' (case-insensitive).
- description String
- Description of the prefix filter list.
- entries
List<Mcr
Prefix Filter List Entry> - Entries in the prefix filter list. Must contain between 1 and 200 entries.
- mcr
Id String - The UID of the MCR instance this prefix filter list belongs to.
- address
Family string - The IP address standard of the IP network addresses in the prefix filter list. Valid values are 'IPv4' and 'IPv6' (case-insensitive).
- description string
- Description of the prefix filter list.
- entries
Mcr
Prefix Filter List Entry[] - Entries in the prefix filter list. Must contain between 1 and 200 entries.
- mcr
Id string - The UID of the MCR instance this prefix filter list belongs to.
- address_
family str - The IP address standard of the IP network addresses in the prefix filter list. Valid values are 'IPv4' and 'IPv6' (case-insensitive).
- description str
- Description of the prefix filter list.
- entries
Sequence[Mcr
Prefix Filter List Entry Args] - Entries in the prefix filter list. Must contain between 1 and 200 entries.
- mcr_
id str - The UID of the MCR instance this prefix filter list belongs to.
- address
Family String - The IP address standard of the IP network addresses in the prefix filter list. Valid values are 'IPv4' and 'IPv6' (case-insensitive).
- description String
- Description of the prefix filter list.
- entries List<Property Map>
- Entries in the prefix filter list. Must contain between 1 and 200 entries.
- mcr
Id String - The UID of the MCR instance this prefix filter list belongs to.
Outputs
All input properties are implicitly available as output properties. Additionally, the McrPrefixFilterList resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Updated string - Timestamp of when the resource was last updated.
- Mcr
Prefix doubleFilter List Id - Numeric ID of the prefix filter list.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Updated string - Timestamp of when the resource was last updated.
- Mcr
Prefix float64Filter List Id - Numeric ID of the prefix filter list.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Updated String - Timestamp of when the resource was last updated.
- mcr
Prefix DoubleFilter List Id - Numeric ID of the prefix filter list.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Updated string - Timestamp of when the resource was last updated.
- mcr
Prefix numberFilter List Id - Numeric ID of the prefix filter list.
- id str
- The provider-assigned unique ID for this managed resource.
- last_
updated str - Timestamp of when the resource was last updated.
- mcr_
prefix_ floatfilter_ list_ id - Numeric ID of the prefix filter list.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Updated String - Timestamp of when the resource was last updated.
- mcr
Prefix NumberFilter List Id - Numeric ID of the prefix filter list.
Look up Existing McrPrefixFilterList Resource
Get an existing McrPrefixFilterList 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?: McrPrefixFilterListState, opts?: CustomResourceOptions): McrPrefixFilterList@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
address_family: Optional[str] = None,
description: Optional[str] = None,
entries: Optional[Sequence[McrPrefixFilterListEntryArgs]] = None,
last_updated: Optional[str] = None,
mcr_id: Optional[str] = None,
mcr_prefix_filter_list_id: Optional[float] = None) -> McrPrefixFilterListfunc GetMcrPrefixFilterList(ctx *Context, name string, id IDInput, state *McrPrefixFilterListState, opts ...ResourceOption) (*McrPrefixFilterList, error)public static McrPrefixFilterList Get(string name, Input<string> id, McrPrefixFilterListState? state, CustomResourceOptions? opts = null)public static McrPrefixFilterList get(String name, Output<String> id, McrPrefixFilterListState state, CustomResourceOptions options)resources: _: type: megaport:McrPrefixFilterList 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.
- Address
Family string - The IP address standard of the IP network addresses in the prefix filter list. Valid values are 'IPv4' and 'IPv6' (case-insensitive).
- Description string
- Description of the prefix filter list.
- Entries
List<Mcr
Prefix Filter List Entry> - Entries in the prefix filter list. Must contain between 1 and 200 entries.
- Last
Updated string - Timestamp of when the resource was last updated.
- Mcr
Id string - The UID of the MCR instance this prefix filter list belongs to.
- Mcr
Prefix doubleFilter List Id - Numeric ID of the prefix filter list.
- Address
Family string - The IP address standard of the IP network addresses in the prefix filter list. Valid values are 'IPv4' and 'IPv6' (case-insensitive).
- Description string
- Description of the prefix filter list.
- Entries
[]Mcr
Prefix Filter List Entry Args - Entries in the prefix filter list. Must contain between 1 and 200 entries.
- Last
Updated string - Timestamp of when the resource was last updated.
- Mcr
Id string - The UID of the MCR instance this prefix filter list belongs to.
- Mcr
Prefix float64Filter List Id - Numeric ID of the prefix filter list.
- address
Family String - The IP address standard of the IP network addresses in the prefix filter list. Valid values are 'IPv4' and 'IPv6' (case-insensitive).
- description String
- Description of the prefix filter list.
- entries
List<Mcr
Prefix Filter List Entry> - Entries in the prefix filter list. Must contain between 1 and 200 entries.
- last
Updated String - Timestamp of when the resource was last updated.
- mcr
Id String - The UID of the MCR instance this prefix filter list belongs to.
- mcr
Prefix DoubleFilter List Id - Numeric ID of the prefix filter list.
- address
Family string - The IP address standard of the IP network addresses in the prefix filter list. Valid values are 'IPv4' and 'IPv6' (case-insensitive).
- description string
- Description of the prefix filter list.
- entries
Mcr
Prefix Filter List Entry[] - Entries in the prefix filter list. Must contain between 1 and 200 entries.
- last
Updated string - Timestamp of when the resource was last updated.
- mcr
Id string - The UID of the MCR instance this prefix filter list belongs to.
- mcr
Prefix numberFilter List Id - Numeric ID of the prefix filter list.
- address_
family str - The IP address standard of the IP network addresses in the prefix filter list. Valid values are 'IPv4' and 'IPv6' (case-insensitive).
- description str
- Description of the prefix filter list.
- entries
Sequence[Mcr
Prefix Filter List Entry Args] - Entries in the prefix filter list. Must contain between 1 and 200 entries.
- last_
updated str - Timestamp of when the resource was last updated.
- mcr_
id str - The UID of the MCR instance this prefix filter list belongs to.
- mcr_
prefix_ floatfilter_ list_ id - Numeric ID of the prefix filter list.
- address
Family String - The IP address standard of the IP network addresses in the prefix filter list. Valid values are 'IPv4' and 'IPv6' (case-insensitive).
- description String
- Description of the prefix filter list.
- entries List<Property Map>
- Entries in the prefix filter list. Must contain between 1 and 200 entries.
- last
Updated String - Timestamp of when the resource was last updated.
- mcr
Id String - The UID of the MCR instance this prefix filter list belongs to.
- mcr
Prefix NumberFilter List Id - Numeric ID of the prefix filter list.
Supporting Types
McrPrefixFilterListEntry, McrPrefixFilterListEntryArgs
- Action string
- The action to take for the network address in the filter list. Valid values are 'permit' and 'deny'.
- Prefix string
- The network address of the prefix filter list entry in CIDR notation (e.g., '10.0.1.0/24').
- Ge double
- The minimum starting prefix length to be matched. Valid values are from 0 to 32 (IPv4), or 0 to 128 (IPv6). If not specified, defaults to the prefix length of the network address.
- Le double
- The maximum ending prefix length to be matched. Valid values are from 0 to 32 (IPv4), or 0 to 128 (IPv6). Must be greater than or equal to 'ge'. If not specified, defaults to 32 (IPv4) or 128 (IPv6).
- Action string
- The action to take for the network address in the filter list. Valid values are 'permit' and 'deny'.
- Prefix string
- The network address of the prefix filter list entry in CIDR notation (e.g., '10.0.1.0/24').
- Ge float64
- The minimum starting prefix length to be matched. Valid values are from 0 to 32 (IPv4), or 0 to 128 (IPv6). If not specified, defaults to the prefix length of the network address.
- Le float64
- The maximum ending prefix length to be matched. Valid values are from 0 to 32 (IPv4), or 0 to 128 (IPv6). Must be greater than or equal to 'ge'. If not specified, defaults to 32 (IPv4) or 128 (IPv6).
- action String
- The action to take for the network address in the filter list. Valid values are 'permit' and 'deny'.
- prefix String
- The network address of the prefix filter list entry in CIDR notation (e.g., '10.0.1.0/24').
- ge Double
- The minimum starting prefix length to be matched. Valid values are from 0 to 32 (IPv4), or 0 to 128 (IPv6). If not specified, defaults to the prefix length of the network address.
- le Double
- The maximum ending prefix length to be matched. Valid values are from 0 to 32 (IPv4), or 0 to 128 (IPv6). Must be greater than or equal to 'ge'. If not specified, defaults to 32 (IPv4) or 128 (IPv6).
- action string
- The action to take for the network address in the filter list. Valid values are 'permit' and 'deny'.
- prefix string
- The network address of the prefix filter list entry in CIDR notation (e.g., '10.0.1.0/24').
- ge number
- The minimum starting prefix length to be matched. Valid values are from 0 to 32 (IPv4), or 0 to 128 (IPv6). If not specified, defaults to the prefix length of the network address.
- le number
- The maximum ending prefix length to be matched. Valid values are from 0 to 32 (IPv4), or 0 to 128 (IPv6). Must be greater than or equal to 'ge'. If not specified, defaults to 32 (IPv4) or 128 (IPv6).
- action str
- The action to take for the network address in the filter list. Valid values are 'permit' and 'deny'.
- prefix str
- The network address of the prefix filter list entry in CIDR notation (e.g., '10.0.1.0/24').
- ge float
- The minimum starting prefix length to be matched. Valid values are from 0 to 32 (IPv4), or 0 to 128 (IPv6). If not specified, defaults to the prefix length of the network address.
- le float
- The maximum ending prefix length to be matched. Valid values are from 0 to 32 (IPv4), or 0 to 128 (IPv6). Must be greater than or equal to 'ge'. If not specified, defaults to 32 (IPv4) or 128 (IPv6).
- action String
- The action to take for the network address in the filter list. Valid values are 'permit' and 'deny'.
- prefix String
- The network address of the prefix filter list entry in CIDR notation (e.g., '10.0.1.0/24').
- ge Number
- The minimum starting prefix length to be matched. Valid values are from 0 to 32 (IPv4), or 0 to 128 (IPv6). If not specified, defaults to the prefix length of the network address.
- le Number
- The maximum ending prefix length to be matched. Valid values are from 0 to 32 (IPv4), or 0 to 128 (IPv6). Must be greater than or equal to 'ge'. If not specified, defaults to 32 (IPv4) or 128 (IPv6).
Import
#!/bin/bash
MCR Prefix Filter Lists can be imported using the format: mcr_uid:prefix_list_id
Where:
mcr_uid: The UID of the MCR that owns the prefix filter list
prefix_list_id: The numeric ID of the prefix filter list (must be positive integer)
You can find these values using the Megaport API or portal:
MCR UID: Available in MCR details or from terraform state of megaport_mcr resource
Prefix List ID: Available in MCR prefix filter list details
Example 1: Import existing prefix filter list
$ pulumi import megaport:index/mcrPrefixFilterList:McrPrefixFilterList example "11111111-1111-1111-1111-111111111111:123"
Example 2: Import multiple prefix filter lists from the same MCR
$ pulumi import megaport:index/mcrPrefixFilterList:McrPrefixFilterList inbound_filter "11111111-1111-1111-1111-111111111111:456"
$ pulumi import megaport:index/mcrPrefixFilterList:McrPrefixFilterList outbound_filter "11111111-1111-1111-1111-111111111111:789"
Example 3: Import with descriptive resource names
$ pulumi import megaport:index/mcrPrefixFilterList:McrPrefixFilterList ipv4_customer_routes "22222222-2222-2222-2222-222222222222:101"
$ pulumi import megaport:index/mcrPrefixFilterList:McrPrefixFilterList ipv6_customer_routes "22222222-2222-2222-2222-222222222222:102"
Common troubleshooting:
Ensure the MCR UID is correct and the MCR exists
Verify the prefix filter list ID exists on the specified MCR
Check that the prefix filter list ID is a positive integer
Make sure you have appropriate permissions to access the MCR and its prefix filter lists
To find existing prefix filter lists:
Use the Megaport Portal to view MCR details
Use the Megaport API: GET /mcr/{mcrId}/prefixFilterLists
Check terraform state if the MCR was created with embedded prefix filter lists
$ pulumi import megaport:index/mcrPrefixFilterList:McrPrefixFilterList echo "Import format: megaport_mcr_prefix_filter_list.<resource_name> \"<MCR_UID>:<PREFIX_LIST_ID>\""
echo “Replace <resource_name>, <MCR_UID>, and <PREFIX_LIST_ID> with your actual values”
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- megaport megaport/terraform-provider-megaport
- License
- Notes
- This Pulumi package is based on the
megaportTerraform Provider.
