1. Packages
  2. Packages
  3. Megaport Provider
  4. API Docs
  5. NatGatewayPacketFilter
Viewing docs for megaport 1.9.1
published on Friday, May 22, 2026 by megaport
Viewing docs for megaport 1.9.1
published on Friday, May 22, 2026 by megaport

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as megaport from "@pulumi/megaport";
    
    const example = new megaport.NatGateway("example", {
        productName: "Megaport NAT Gateway Example",
        locationId: 5,
        speed: 1000,
        sessionCount: 250000,
        contractTermMonths: 1,
        diversityZone: "red",
        asn: 64512,
    });
    const exampleNatGatewayPacketFilter = new megaport.NatGatewayPacketFilter("example", {
        natGatewayProductUid: example.productUid,
        description: "Ingress filter",
        entries: [
            {
                action: "permit",
                description: "Allow HTTPS",
                sourceAddress: "0.0.0.0/0",
                destinationAddress: "10.0.0.0/24",
                destinationPorts: "443",
                ipProtocol: 6,
            },
            {
                action: "permit",
                description: "Allow DNS",
                sourceAddress: "0.0.0.0/0",
                destinationAddress: "10.0.0.0/24",
                destinationPorts: "53",
                ipProtocol: 17,
            },
            {
                action: "deny",
                description: "Default deny",
                sourceAddress: "0.0.0.0/0",
                destinationAddress: "0.0.0.0/0",
            },
        ],
    });
    
    import pulumi
    import pulumi_megaport as megaport
    
    example = megaport.NatGateway("example",
        product_name="Megaport NAT Gateway Example",
        location_id=5,
        speed=1000,
        session_count=250000,
        contract_term_months=1,
        diversity_zone="red",
        asn=64512)
    example_nat_gateway_packet_filter = megaport.NatGatewayPacketFilter("example",
        nat_gateway_product_uid=example.product_uid,
        description="Ingress filter",
        entries=[
            {
                "action": "permit",
                "description": "Allow HTTPS",
                "source_address": "0.0.0.0/0",
                "destination_address": "10.0.0.0/24",
                "destination_ports": "443",
                "ip_protocol": 6,
            },
            {
                "action": "permit",
                "description": "Allow DNS",
                "source_address": "0.0.0.0/0",
                "destination_address": "10.0.0.0/24",
                "destination_ports": "53",
                "ip_protocol": 17,
            },
            {
                "action": "deny",
                "description": "Default deny",
                "source_address": "0.0.0.0/0",
                "destination_address": "0.0.0.0/0",
            },
        ])
    
    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 {
    		example, err := megaport.NewNatGateway(ctx, "example", &megaport.NatGatewayArgs{
    			ProductName:        pulumi.String("Megaport NAT Gateway Example"),
    			LocationId:         pulumi.Float64(5),
    			Speed:              pulumi.Float64(1000),
    			SessionCount:       pulumi.Float64(250000),
    			ContractTermMonths: pulumi.Float64(1),
    			DiversityZone:      pulumi.String("red"),
    			Asn:                pulumi.Float64(64512),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = megaport.NewNatGatewayPacketFilter(ctx, "example", &megaport.NatGatewayPacketFilterArgs{
    			NatGatewayProductUid: example.ProductUid,
    			Description:          pulumi.String("Ingress filter"),
    			Entries: megaport.NatGatewayPacketFilterEntryArray{
    				&megaport.NatGatewayPacketFilterEntryArgs{
    					Action:             pulumi.String("permit"),
    					Description:        pulumi.String("Allow HTTPS"),
    					SourceAddress:      pulumi.String("0.0.0.0/0"),
    					DestinationAddress: pulumi.String("10.0.0.0/24"),
    					DestinationPorts:   pulumi.String("443"),
    					IpProtocol:         pulumi.Float64(6),
    				},
    				&megaport.NatGatewayPacketFilterEntryArgs{
    					Action:             pulumi.String("permit"),
    					Description:        pulumi.String("Allow DNS"),
    					SourceAddress:      pulumi.String("0.0.0.0/0"),
    					DestinationAddress: pulumi.String("10.0.0.0/24"),
    					DestinationPorts:   pulumi.String("53"),
    					IpProtocol:         pulumi.Float64(17),
    				},
    				&megaport.NatGatewayPacketFilterEntryArgs{
    					Action:             pulumi.String("deny"),
    					Description:        pulumi.String("Default deny"),
    					SourceAddress:      pulumi.String("0.0.0.0/0"),
    					DestinationAddress: pulumi.String("0.0.0.0/0"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Megaport = Pulumi.Megaport;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Megaport.NatGateway("example", new()
        {
            ProductName = "Megaport NAT Gateway Example",
            LocationId = 5,
            Speed = 1000,
            SessionCount = 250000,
            ContractTermMonths = 1,
            DiversityZone = "red",
            Asn = 64512,
        });
    
        var exampleNatGatewayPacketFilter = new Megaport.NatGatewayPacketFilter("example", new()
        {
            NatGatewayProductUid = example.ProductUid,
            Description = "Ingress filter",
            Entries = new[]
            {
                new Megaport.Inputs.NatGatewayPacketFilterEntryArgs
                {
                    Action = "permit",
                    Description = "Allow HTTPS",
                    SourceAddress = "0.0.0.0/0",
                    DestinationAddress = "10.0.0.0/24",
                    DestinationPorts = "443",
                    IpProtocol = 6,
                },
                new Megaport.Inputs.NatGatewayPacketFilterEntryArgs
                {
                    Action = "permit",
                    Description = "Allow DNS",
                    SourceAddress = "0.0.0.0/0",
                    DestinationAddress = "10.0.0.0/24",
                    DestinationPorts = "53",
                    IpProtocol = 17,
                },
                new Megaport.Inputs.NatGatewayPacketFilterEntryArgs
                {
                    Action = "deny",
                    Description = "Default deny",
                    SourceAddress = "0.0.0.0/0",
                    DestinationAddress = "0.0.0.0/0",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.megaport.NatGateway;
    import com.pulumi.megaport.NatGatewayArgs;
    import com.pulumi.megaport.NatGatewayPacketFilter;
    import com.pulumi.megaport.NatGatewayPacketFilterArgs;
    import com.pulumi.megaport.inputs.NatGatewayPacketFilterEntryArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new NatGateway("example", NatGatewayArgs.builder()
                .productName("Megaport NAT Gateway Example")
                .locationId(5.0)
                .speed(1000.0)
                .sessionCount(250000.0)
                .contractTermMonths(1.0)
                .diversityZone("red")
                .asn(64512.0)
                .build());
    
            var exampleNatGatewayPacketFilter = new NatGatewayPacketFilter("exampleNatGatewayPacketFilter", NatGatewayPacketFilterArgs.builder()
                .natGatewayProductUid(example.productUid())
                .description("Ingress filter")
                .entries(            
                    NatGatewayPacketFilterEntryArgs.builder()
                        .action("permit")
                        .description("Allow HTTPS")
                        .sourceAddress("0.0.0.0/0")
                        .destinationAddress("10.0.0.0/24")
                        .destinationPorts("443")
                        .ipProtocol(6.0)
                        .build(),
                    NatGatewayPacketFilterEntryArgs.builder()
                        .action("permit")
                        .description("Allow DNS")
                        .sourceAddress("0.0.0.0/0")
                        .destinationAddress("10.0.0.0/24")
                        .destinationPorts("53")
                        .ipProtocol(17.0)
                        .build(),
                    NatGatewayPacketFilterEntryArgs.builder()
                        .action("deny")
                        .description("Default deny")
                        .sourceAddress("0.0.0.0/0")
                        .destinationAddress("0.0.0.0/0")
                        .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: megaport:NatGateway
        properties:
          productName: Megaport NAT Gateway Example
          locationId: 5
          speed: 1000
          sessionCount: 250000
          contractTermMonths: 1
          diversityZone: red
          asn: 64512
      exampleNatGatewayPacketFilter:
        type: megaport:NatGatewayPacketFilter
        name: example
        properties:
          natGatewayProductUid: ${example.productUid}
          description: Ingress filter
          entries:
            - action: permit
              description: Allow HTTPS
              sourceAddress: 0.0.0.0/0
              destinationAddress: 10.0.0.0/24
              destinationPorts: '443'
              ipProtocol: 6
            - action: permit
              description: Allow DNS
              sourceAddress: 0.0.0.0/0
              destinationAddress: 10.0.0.0/24
              destinationPorts: '53'
              ipProtocol: 17
            - action: deny
              description: Default deny
              sourceAddress: 0.0.0.0/0
              destinationAddress: 0.0.0.0/0
    
    Example coming soon!
    

    Create NatGatewayPacketFilter Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new NatGatewayPacketFilter(name: string, args: NatGatewayPacketFilterArgs, opts?: CustomResourceOptions);
    @overload
    def NatGatewayPacketFilter(resource_name: str,
                               args: NatGatewayPacketFilterArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def NatGatewayPacketFilter(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               description: Optional[str] = None,
                               entries: Optional[Sequence[NatGatewayPacketFilterEntryArgs]] = None,
                               nat_gateway_product_uid: Optional[str] = None)
    func NewNatGatewayPacketFilter(ctx *Context, name string, args NatGatewayPacketFilterArgs, opts ...ResourceOption) (*NatGatewayPacketFilter, error)
    public NatGatewayPacketFilter(string name, NatGatewayPacketFilterArgs args, CustomResourceOptions? opts = null)
    public NatGatewayPacketFilter(String name, NatGatewayPacketFilterArgs args)
    public NatGatewayPacketFilter(String name, NatGatewayPacketFilterArgs args, CustomResourceOptions options)
    
    type: megaport:NatGatewayPacketFilter
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "megaport_natgatewaypacketfilter" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args NatGatewayPacketFilterArgs
    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 NatGatewayPacketFilterArgs
    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 NatGatewayPacketFilterArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NatGatewayPacketFilterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NatGatewayPacketFilterArgs
    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 natGatewayPacketFilterResource = new Megaport.NatGatewayPacketFilter("natGatewayPacketFilterResource", new()
    {
        Description = "string",
        Entries = new[]
        {
            new Megaport.Inputs.NatGatewayPacketFilterEntryArgs
            {
                Action = "string",
                DestinationAddress = "string",
                SourceAddress = "string",
                Description = "string",
                DestinationPorts = "string",
                IpProtocol = 0,
                SourcePorts = "string",
            },
        },
        NatGatewayProductUid = "string",
    });
    
    example, err := megaport.NewNatGatewayPacketFilter(ctx, "natGatewayPacketFilterResource", &megaport.NatGatewayPacketFilterArgs{
    	Description: pulumi.String("string"),
    	Entries: megaport.NatGatewayPacketFilterEntryArray{
    		&megaport.NatGatewayPacketFilterEntryArgs{
    			Action:             pulumi.String("string"),
    			DestinationAddress: pulumi.String("string"),
    			SourceAddress:      pulumi.String("string"),
    			Description:        pulumi.String("string"),
    			DestinationPorts:   pulumi.String("string"),
    			IpProtocol:         pulumi.Float64(0),
    			SourcePorts:        pulumi.String("string"),
    		},
    	},
    	NatGatewayProductUid: pulumi.String("string"),
    })
    
    resource "megaport_natgatewaypacketfilter" "natGatewayPacketFilterResource" {
      description = "string"
      entries {
        action              = "string"
        destination_address = "string"
        source_address      = "string"
        description         = "string"
        destination_ports   = "string"
        ip_protocol         = 0
        source_ports        = "string"
      }
      nat_gateway_product_uid = "string"
    }
    
    var natGatewayPacketFilterResource = new NatGatewayPacketFilter("natGatewayPacketFilterResource", NatGatewayPacketFilterArgs.builder()
        .description("string")
        .entries(NatGatewayPacketFilterEntryArgs.builder()
            .action("string")
            .destinationAddress("string")
            .sourceAddress("string")
            .description("string")
            .destinationPorts("string")
            .ipProtocol(0.0)
            .sourcePorts("string")
            .build())
        .natGatewayProductUid("string")
        .build());
    
    nat_gateway_packet_filter_resource = megaport.NatGatewayPacketFilter("natGatewayPacketFilterResource",
        description="string",
        entries=[{
            "action": "string",
            "destination_address": "string",
            "source_address": "string",
            "description": "string",
            "destination_ports": "string",
            "ip_protocol": float(0),
            "source_ports": "string",
        }],
        nat_gateway_product_uid="string")
    
    const natGatewayPacketFilterResource = new megaport.NatGatewayPacketFilter("natGatewayPacketFilterResource", {
        description: "string",
        entries: [{
            action: "string",
            destinationAddress: "string",
            sourceAddress: "string",
            description: "string",
            destinationPorts: "string",
            ipProtocol: 0,
            sourcePorts: "string",
        }],
        natGatewayProductUid: "string",
    });
    
    type: megaport:NatGatewayPacketFilter
    properties:
        description: string
        entries:
            - action: string
              description: string
              destinationAddress: string
              destinationPorts: string
              ipProtocol: 0
              sourceAddress: string
              sourcePorts: string
        natGatewayProductUid: string
    

    NatGatewayPacketFilter 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 NatGatewayPacketFilter resource accepts the following input properties:

    Description string
    Description of the packet filter.
    Entries List<NatGatewayPacketFilterEntry>
    Ordered list of filter entries. Entries are evaluated top-to-bottom; the first matching entry determines the action taken on the packet. At least one entry is required.
    NatGatewayProductUid string
    Product UID of the NAT Gateway that owns this packet filter.
    Description string
    Description of the packet filter.
    Entries []NatGatewayPacketFilterEntryArgs
    Ordered list of filter entries. Entries are evaluated top-to-bottom; the first matching entry determines the action taken on the packet. At least one entry is required.
    NatGatewayProductUid string
    Product UID of the NAT Gateway that owns this packet filter.
    description string
    Description of the packet filter.
    entries list(object)
    Ordered list of filter entries. Entries are evaluated top-to-bottom; the first matching entry determines the action taken on the packet. At least one entry is required.
    nat_gateway_product_uid string
    Product UID of the NAT Gateway that owns this packet filter.
    description String
    Description of the packet filter.
    entries List<NatGatewayPacketFilterEntry>
    Ordered list of filter entries. Entries are evaluated top-to-bottom; the first matching entry determines the action taken on the packet. At least one entry is required.
    natGatewayProductUid String
    Product UID of the NAT Gateway that owns this packet filter.
    description string
    Description of the packet filter.
    entries NatGatewayPacketFilterEntry[]
    Ordered list of filter entries. Entries are evaluated top-to-bottom; the first matching entry determines the action taken on the packet. At least one entry is required.
    natGatewayProductUid string
    Product UID of the NAT Gateway that owns this packet filter.
    description str
    Description of the packet filter.
    entries Sequence[NatGatewayPacketFilterEntryArgs]
    Ordered list of filter entries. Entries are evaluated top-to-bottom; the first matching entry determines the action taken on the packet. At least one entry is required.
    nat_gateway_product_uid str
    Product UID of the NAT Gateway that owns this packet filter.
    description String
    Description of the packet filter.
    entries List<Property Map>
    Ordered list of filter entries. Entries are evaluated top-to-bottom; the first matching entry determines the action taken on the packet. At least one entry is required.
    natGatewayProductUid String
    Product UID of the NAT Gateway that owns this packet filter.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NatGatewayPacketFilter resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    NatGatewayPacketFilterId double
    Numeric ID of the packet filter, assigned by the API.
    Id string
    The provider-assigned unique ID for this managed resource.
    NatGatewayPacketFilterId float64
    Numeric ID of the packet filter, assigned by the API.
    id string
    The provider-assigned unique ID for this managed resource.
    nat_gateway_packet_filter_id number
    Numeric ID of the packet filter, assigned by the API.
    id String
    The provider-assigned unique ID for this managed resource.
    natGatewayPacketFilterId Double
    Numeric ID of the packet filter, assigned by the API.
    id string
    The provider-assigned unique ID for this managed resource.
    natGatewayPacketFilterId number
    Numeric ID of the packet filter, assigned by the API.
    id str
    The provider-assigned unique ID for this managed resource.
    nat_gateway_packet_filter_id float
    Numeric ID of the packet filter, assigned by the API.
    id String
    The provider-assigned unique ID for this managed resource.
    natGatewayPacketFilterId Number
    Numeric ID of the packet filter, assigned by the API.

    Look up Existing NatGatewayPacketFilter Resource

    Get an existing NatGatewayPacketFilter 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?: NatGatewayPacketFilterState, opts?: CustomResourceOptions): NatGatewayPacketFilter
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            entries: Optional[Sequence[NatGatewayPacketFilterEntryArgs]] = None,
            nat_gateway_packet_filter_id: Optional[float] = None,
            nat_gateway_product_uid: Optional[str] = None) -> NatGatewayPacketFilter
    func GetNatGatewayPacketFilter(ctx *Context, name string, id IDInput, state *NatGatewayPacketFilterState, opts ...ResourceOption) (*NatGatewayPacketFilter, error)
    public static NatGatewayPacketFilter Get(string name, Input<string> id, NatGatewayPacketFilterState? state, CustomResourceOptions? opts = null)
    public static NatGatewayPacketFilter get(String name, Output<String> id, NatGatewayPacketFilterState state, CustomResourceOptions options)
    resources:  _:    type: megaport:NatGatewayPacketFilter    get:      id: ${id}
    import {
      to = megaport_natgatewaypacketfilter.example
      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:
    Description string
    Description of the packet filter.
    Entries List<NatGatewayPacketFilterEntry>
    Ordered list of filter entries. Entries are evaluated top-to-bottom; the first matching entry determines the action taken on the packet. At least one entry is required.
    NatGatewayPacketFilterId double
    Numeric ID of the packet filter, assigned by the API.
    NatGatewayProductUid string
    Product UID of the NAT Gateway that owns this packet filter.
    Description string
    Description of the packet filter.
    Entries []NatGatewayPacketFilterEntryArgs
    Ordered list of filter entries. Entries are evaluated top-to-bottom; the first matching entry determines the action taken on the packet. At least one entry is required.
    NatGatewayPacketFilterId float64
    Numeric ID of the packet filter, assigned by the API.
    NatGatewayProductUid string
    Product UID of the NAT Gateway that owns this packet filter.
    description string
    Description of the packet filter.
    entries list(object)
    Ordered list of filter entries. Entries are evaluated top-to-bottom; the first matching entry determines the action taken on the packet. At least one entry is required.
    nat_gateway_packet_filter_id number
    Numeric ID of the packet filter, assigned by the API.
    nat_gateway_product_uid string
    Product UID of the NAT Gateway that owns this packet filter.
    description String
    Description of the packet filter.
    entries List<NatGatewayPacketFilterEntry>
    Ordered list of filter entries. Entries are evaluated top-to-bottom; the first matching entry determines the action taken on the packet. At least one entry is required.
    natGatewayPacketFilterId Double
    Numeric ID of the packet filter, assigned by the API.
    natGatewayProductUid String
    Product UID of the NAT Gateway that owns this packet filter.
    description string
    Description of the packet filter.
    entries NatGatewayPacketFilterEntry[]
    Ordered list of filter entries. Entries are evaluated top-to-bottom; the first matching entry determines the action taken on the packet. At least one entry is required.
    natGatewayPacketFilterId number
    Numeric ID of the packet filter, assigned by the API.
    natGatewayProductUid string
    Product UID of the NAT Gateway that owns this packet filter.
    description str
    Description of the packet filter.
    entries Sequence[NatGatewayPacketFilterEntryArgs]
    Ordered list of filter entries. Entries are evaluated top-to-bottom; the first matching entry determines the action taken on the packet. At least one entry is required.
    nat_gateway_packet_filter_id float
    Numeric ID of the packet filter, assigned by the API.
    nat_gateway_product_uid str
    Product UID of the NAT Gateway that owns this packet filter.
    description String
    Description of the packet filter.
    entries List<Property Map>
    Ordered list of filter entries. Entries are evaluated top-to-bottom; the first matching entry determines the action taken on the packet. At least one entry is required.
    natGatewayPacketFilterId Number
    Numeric ID of the packet filter, assigned by the API.
    natGatewayProductUid String
    Product UID of the NAT Gateway that owns this packet filter.

    Supporting Types

    NatGatewayPacketFilterEntry, NatGatewayPacketFilterEntryArgs

    Action string
    Action to take on a matching packet. One of permit or deny.
    DestinationAddress string
    Destination IP address or CIDR.
    SourceAddress string
    Source IP address or CIDR (e.g. 10.0.0.0/24 or 0.0.0.0/0).
    Description string
    Optional description for this entry.
    DestinationPorts string
    Destination ports — single port or comma-separated list. Optional.
    IpProtocol double
    IANA IP protocol number (e.g. 6 = TCP, 17 = UDP). Omit or set to 0 for any protocol.
    SourcePorts string
    Source ports — single port or comma-separated list (e.g. 80,443). Optional.
    Action string
    Action to take on a matching packet. One of permit or deny.
    DestinationAddress string
    Destination IP address or CIDR.
    SourceAddress string
    Source IP address or CIDR (e.g. 10.0.0.0/24 or 0.0.0.0/0).
    Description string
    Optional description for this entry.
    DestinationPorts string
    Destination ports — single port or comma-separated list. Optional.
    IpProtocol float64
    IANA IP protocol number (e.g. 6 = TCP, 17 = UDP). Omit or set to 0 for any protocol.
    SourcePorts string
    Source ports — single port or comma-separated list (e.g. 80,443). Optional.
    action string
    Action to take on a matching packet. One of permit or deny.
    destination_address string
    Destination IP address or CIDR.
    source_address string
    Source IP address or CIDR (e.g. 10.0.0.0/24 or 0.0.0.0/0).
    description string
    Optional description for this entry.
    destination_ports string
    Destination ports — single port or comma-separated list. Optional.
    ip_protocol number
    IANA IP protocol number (e.g. 6 = TCP, 17 = UDP). Omit or set to 0 for any protocol.
    source_ports string
    Source ports — single port or comma-separated list (e.g. 80,443). Optional.
    action String
    Action to take on a matching packet. One of permit or deny.
    destinationAddress String
    Destination IP address or CIDR.
    sourceAddress String
    Source IP address or CIDR (e.g. 10.0.0.0/24 or 0.0.0.0/0).
    description String
    Optional description for this entry.
    destinationPorts String
    Destination ports — single port or comma-separated list. Optional.
    ipProtocol Double
    IANA IP protocol number (e.g. 6 = TCP, 17 = UDP). Omit or set to 0 for any protocol.
    sourcePorts String
    Source ports — single port or comma-separated list (e.g. 80,443). Optional.
    action string
    Action to take on a matching packet. One of permit or deny.
    destinationAddress string
    Destination IP address or CIDR.
    sourceAddress string
    Source IP address or CIDR (e.g. 10.0.0.0/24 or 0.0.0.0/0).
    description string
    Optional description for this entry.
    destinationPorts string
    Destination ports — single port or comma-separated list. Optional.
    ipProtocol number
    IANA IP protocol number (e.g. 6 = TCP, 17 = UDP). Omit or set to 0 for any protocol.
    sourcePorts string
    Source ports — single port or comma-separated list (e.g. 80,443). Optional.
    action str
    Action to take on a matching packet. One of permit or deny.
    destination_address str
    Destination IP address or CIDR.
    source_address str
    Source IP address or CIDR (e.g. 10.0.0.0/24 or 0.0.0.0/0).
    description str
    Optional description for this entry.
    destination_ports str
    Destination ports — single port or comma-separated list. Optional.
    ip_protocol float
    IANA IP protocol number (e.g. 6 = TCP, 17 = UDP). Omit or set to 0 for any protocol.
    source_ports str
    Source ports — single port or comma-separated list (e.g. 80,443). Optional.
    action String
    Action to take on a matching packet. One of permit or deny.
    destinationAddress String
    Destination IP address or CIDR.
    sourceAddress String
    Source IP address or CIDR (e.g. 10.0.0.0/24 or 0.0.0.0/0).
    description String
    Optional description for this entry.
    destinationPorts String
    Destination ports — single port or comma-separated list. Optional.
    ipProtocol Number
    IANA IP protocol number (e.g. 6 = TCP, 17 = UDP). Omit or set to 0 for any protocol.
    sourcePorts String
    Source ports — single port or comma-separated list (e.g. 80,443). Optional.

    Import

    The pulumi import command can be used, for example:

    NAT Gateway packet filters are imported using the composite ID

    “<NAT_GATEWAY_PRODUCT_UID>:<PACKET_FILTER_ID>”.

    Where:

    • NAT_GATEWAY_PRODUCT_UID: UID of the NAT Gateway that owns the packet filter.

    • PACKET_FILTER_ID: Numeric ID of the packet filter (positive integer).

    $ pulumi import megaport:index/natGatewayPacketFilter:NatGatewayPacketFilter example "11111111-1111-1111-1111-111111111111:123"
    

    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.
    Viewing docs for megaport 1.9.1
    published on Friday, May 22, 2026 by megaport

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial