1. Packages
  2. Megaport Provider
  3. API Docs
  4. McrPrefixFilterList
megaport 1.4.5 published on Friday, Oct 31, 2025 by megaport

megaport.McrPrefixFilterList

Get Started
megaport logo
megaport 1.4.5 published on Friday, Oct 31, 2025 by megaport

    Example Usage

    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:

    AddressFamily 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<McrPrefixFilterListEntry>
    Entries in the prefix filter list. Must contain between 1 and 200 entries.
    McrId string
    The UID of the MCR instance this prefix filter list belongs to.
    AddressFamily 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 []McrPrefixFilterListEntryArgs
    Entries in the prefix filter list. Must contain between 1 and 200 entries.
    McrId string
    The UID of the MCR instance this prefix filter list belongs to.
    addressFamily 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<McrPrefixFilterListEntry>
    Entries in the prefix filter list. Must contain between 1 and 200 entries.
    mcrId String
    The UID of the MCR instance this prefix filter list belongs to.
    addressFamily 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 McrPrefixFilterListEntry[]
    Entries in the prefix filter list. Must contain between 1 and 200 entries.
    mcrId 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[McrPrefixFilterListEntryArgs]
    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.
    addressFamily 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.
    mcrId 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.
    LastUpdated string
    Timestamp of when the resource was last updated.
    McrPrefixFilterListId double
    Numeric ID of the prefix filter list.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdated string
    Timestamp of when the resource was last updated.
    McrPrefixFilterListId float64
    Numeric ID of the prefix filter list.
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdated String
    Timestamp of when the resource was last updated.
    mcrPrefixFilterListId Double
    Numeric ID of the prefix filter list.
    id string
    The provider-assigned unique ID for this managed resource.
    lastUpdated string
    Timestamp of when the resource was last updated.
    mcrPrefixFilterListId number
    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_filter_list_id float
    Numeric ID of the prefix filter list.
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdated String
    Timestamp of when the resource was last updated.
    mcrPrefixFilterListId Number
    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) -> McrPrefixFilterList
    func 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.
    The following state arguments are supported:
    AddressFamily 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<McrPrefixFilterListEntry>
    Entries in the prefix filter list. Must contain between 1 and 200 entries.
    LastUpdated string
    Timestamp of when the resource was last updated.
    McrId string
    The UID of the MCR instance this prefix filter list belongs to.
    McrPrefixFilterListId double
    Numeric ID of the prefix filter list.
    AddressFamily 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 []McrPrefixFilterListEntryArgs
    Entries in the prefix filter list. Must contain between 1 and 200 entries.
    LastUpdated string
    Timestamp of when the resource was last updated.
    McrId string
    The UID of the MCR instance this prefix filter list belongs to.
    McrPrefixFilterListId float64
    Numeric ID of the prefix filter list.
    addressFamily 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<McrPrefixFilterListEntry>
    Entries in the prefix filter list. Must contain between 1 and 200 entries.
    lastUpdated String
    Timestamp of when the resource was last updated.
    mcrId String
    The UID of the MCR instance this prefix filter list belongs to.
    mcrPrefixFilterListId Double
    Numeric ID of the prefix filter list.
    addressFamily 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 McrPrefixFilterListEntry[]
    Entries in the prefix filter list. Must contain between 1 and 200 entries.
    lastUpdated string
    Timestamp of when the resource was last updated.
    mcrId string
    The UID of the MCR instance this prefix filter list belongs to.
    mcrPrefixFilterListId number
    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[McrPrefixFilterListEntryArgs]
    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_filter_list_id float
    Numeric ID of the prefix filter list.
    addressFamily 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.
    lastUpdated String
    Timestamp of when the resource was last updated.
    mcrId String
    The UID of the MCR instance this prefix filter list belongs to.
    mcrPrefixFilterListId Number
    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:

    1. MCR UID: Available in MCR details or from terraform state of megaport_mcr resource

    2. 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:

    1. Use the Megaport Portal to view MCR details

    2. Use the Megaport API: GET /mcr/{mcrId}/prefixFilterLists

    3. 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 megaport Terraform Provider.
    megaport logo
    megaport 1.4.5 published on Friday, Oct 31, 2025 by megaport
      Meet Neo: Your AI Platform Teammate