megaport.McrPrefixFilterList
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:
- 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.
