1. Packages
  2. Azure Classic
  3. API Docs
  4. network
  5. FirewallNatRuleCollection

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

azure.network.FirewallNatRuleCollection

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

    Manages a NAT Rule Collection within an Azure Firewall.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-resources",
        location: "West Europe",
    });
    const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
        name: "testvnet",
        addressSpaces: ["10.0.0.0/16"],
        location: example.location,
        resourceGroupName: example.name,
    });
    const exampleSubnet = new azure.network.Subnet("example", {
        name: "AzureFirewallSubnet",
        resourceGroupName: example.name,
        virtualNetworkName: exampleVirtualNetwork.name,
        addressPrefixes: ["10.0.1.0/24"],
    });
    const examplePublicIp = new azure.network.PublicIp("example", {
        name: "testpip",
        location: example.location,
        resourceGroupName: example.name,
        allocationMethod: "Static",
        sku: "Standard",
    });
    const exampleFirewall = new azure.network.Firewall("example", {
        name: "testfirewall",
        location: example.location,
        resourceGroupName: example.name,
        skuName: "AZFW_VNet",
        skuTier: "Standard",
        ipConfigurations: [{
            name: "configuration",
            subnetId: exampleSubnet.id,
            publicIpAddressId: examplePublicIp.id,
        }],
    });
    const exampleFirewallNatRuleCollection = new azure.network.FirewallNatRuleCollection("example", {
        name: "testcollection",
        azureFirewallName: exampleFirewall.name,
        resourceGroupName: example.name,
        priority: 100,
        action: "Dnat",
        rules: [{
            name: "testrule",
            sourceAddresses: ["10.0.0.0/16"],
            destinationPorts: ["53"],
            destinationAddresses: [examplePublicIp.ipAddress],
            translatedPort: "53",
            translatedAddress: "8.8.8.8",
            protocols: [
                "TCP",
                "UDP",
            ],
        }],
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="example-resources",
        location="West Europe")
    example_virtual_network = azure.network.VirtualNetwork("example",
        name="testvnet",
        address_spaces=["10.0.0.0/16"],
        location=example.location,
        resource_group_name=example.name)
    example_subnet = azure.network.Subnet("example",
        name="AzureFirewallSubnet",
        resource_group_name=example.name,
        virtual_network_name=example_virtual_network.name,
        address_prefixes=["10.0.1.0/24"])
    example_public_ip = azure.network.PublicIp("example",
        name="testpip",
        location=example.location,
        resource_group_name=example.name,
        allocation_method="Static",
        sku="Standard")
    example_firewall = azure.network.Firewall("example",
        name="testfirewall",
        location=example.location,
        resource_group_name=example.name,
        sku_name="AZFW_VNet",
        sku_tier="Standard",
        ip_configurations=[azure.network.FirewallIpConfigurationArgs(
            name="configuration",
            subnet_id=example_subnet.id,
            public_ip_address_id=example_public_ip.id,
        )])
    example_firewall_nat_rule_collection = azure.network.FirewallNatRuleCollection("example",
        name="testcollection",
        azure_firewall_name=example_firewall.name,
        resource_group_name=example.name,
        priority=100,
        action="Dnat",
        rules=[azure.network.FirewallNatRuleCollectionRuleArgs(
            name="testrule",
            source_addresses=["10.0.0.0/16"],
            destination_ports=["53"],
            destination_addresses=[example_public_ip.ip_address],
            translated_port="53",
            translated_address="8.8.8.8",
            protocols=[
                "TCP",
                "UDP",
            ],
        )])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-resources"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
    			Name: pulumi.String("testvnet"),
    			AddressSpaces: pulumi.StringArray{
    				pulumi.String("10.0.0.0/16"),
    			},
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    		})
    		if err != nil {
    			return err
    		}
    		exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
    			Name:               pulumi.String("AzureFirewallSubnet"),
    			ResourceGroupName:  example.Name,
    			VirtualNetworkName: exampleVirtualNetwork.Name,
    			AddressPrefixes: pulumi.StringArray{
    				pulumi.String("10.0.1.0/24"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
    			Name:              pulumi.String("testpip"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    			AllocationMethod:  pulumi.String("Static"),
    			Sku:               pulumi.String("Standard"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleFirewall, err := network.NewFirewall(ctx, "example", &network.FirewallArgs{
    			Name:              pulumi.String("testfirewall"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    			SkuName:           pulumi.String("AZFW_VNet"),
    			SkuTier:           pulumi.String("Standard"),
    			IpConfigurations: network.FirewallIpConfigurationArray{
    				&network.FirewallIpConfigurationArgs{
    					Name:              pulumi.String("configuration"),
    					SubnetId:          exampleSubnet.ID(),
    					PublicIpAddressId: examplePublicIp.ID(),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = network.NewFirewallNatRuleCollection(ctx, "example", &network.FirewallNatRuleCollectionArgs{
    			Name:              pulumi.String("testcollection"),
    			AzureFirewallName: exampleFirewall.Name,
    			ResourceGroupName: example.Name,
    			Priority:          pulumi.Int(100),
    			Action:            pulumi.String("Dnat"),
    			Rules: network.FirewallNatRuleCollectionRuleArray{
    				&network.FirewallNatRuleCollectionRuleArgs{
    					Name: pulumi.String("testrule"),
    					SourceAddresses: pulumi.StringArray{
    						pulumi.String("10.0.0.0/16"),
    					},
    					DestinationPorts: pulumi.StringArray{
    						pulumi.String("53"),
    					},
    					DestinationAddresses: pulumi.StringArray{
    						examplePublicIp.IpAddress,
    					},
    					TranslatedPort:    pulumi.String("53"),
    					TranslatedAddress: pulumi.String("8.8.8.8"),
    					Protocols: pulumi.StringArray{
    						pulumi.String("TCP"),
    						pulumi.String("UDP"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-resources",
            Location = "West Europe",
        });
    
        var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
        {
            Name = "testvnet",
            AddressSpaces = new[]
            {
                "10.0.0.0/16",
            },
            Location = example.Location,
            ResourceGroupName = example.Name,
        });
    
        var exampleSubnet = new Azure.Network.Subnet("example", new()
        {
            Name = "AzureFirewallSubnet",
            ResourceGroupName = example.Name,
            VirtualNetworkName = exampleVirtualNetwork.Name,
            AddressPrefixes = new[]
            {
                "10.0.1.0/24",
            },
        });
    
        var examplePublicIp = new Azure.Network.PublicIp("example", new()
        {
            Name = "testpip",
            Location = example.Location,
            ResourceGroupName = example.Name,
            AllocationMethod = "Static",
            Sku = "Standard",
        });
    
        var exampleFirewall = new Azure.Network.Firewall("example", new()
        {
            Name = "testfirewall",
            Location = example.Location,
            ResourceGroupName = example.Name,
            SkuName = "AZFW_VNet",
            SkuTier = "Standard",
            IpConfigurations = new[]
            {
                new Azure.Network.Inputs.FirewallIpConfigurationArgs
                {
                    Name = "configuration",
                    SubnetId = exampleSubnet.Id,
                    PublicIpAddressId = examplePublicIp.Id,
                },
            },
        });
    
        var exampleFirewallNatRuleCollection = new Azure.Network.FirewallNatRuleCollection("example", new()
        {
            Name = "testcollection",
            AzureFirewallName = exampleFirewall.Name,
            ResourceGroupName = example.Name,
            Priority = 100,
            Action = "Dnat",
            Rules = new[]
            {
                new Azure.Network.Inputs.FirewallNatRuleCollectionRuleArgs
                {
                    Name = "testrule",
                    SourceAddresses = new[]
                    {
                        "10.0.0.0/16",
                    },
                    DestinationPorts = new[]
                    {
                        "53",
                    },
                    DestinationAddresses = new[]
                    {
                        examplePublicIp.IpAddress,
                    },
                    TranslatedPort = "53",
                    TranslatedAddress = "8.8.8.8",
                    Protocols = new[]
                    {
                        "TCP",
                        "UDP",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.network.VirtualNetwork;
    import com.pulumi.azure.network.VirtualNetworkArgs;
    import com.pulumi.azure.network.Subnet;
    import com.pulumi.azure.network.SubnetArgs;
    import com.pulumi.azure.network.PublicIp;
    import com.pulumi.azure.network.PublicIpArgs;
    import com.pulumi.azure.network.Firewall;
    import com.pulumi.azure.network.FirewallArgs;
    import com.pulumi.azure.network.inputs.FirewallIpConfigurationArgs;
    import com.pulumi.azure.network.FirewallNatRuleCollection;
    import com.pulumi.azure.network.FirewallNatRuleCollectionArgs;
    import com.pulumi.azure.network.inputs.FirewallNatRuleCollectionRuleArgs;
    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 ResourceGroup("example", ResourceGroupArgs.builder()
                .name("example-resources")
                .location("West Europe")
                .build());
    
            var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
                .name("testvnet")
                .addressSpaces("10.0.0.0/16")
                .location(example.location())
                .resourceGroupName(example.name())
                .build());
    
            var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
                .name("AzureFirewallSubnet")
                .resourceGroupName(example.name())
                .virtualNetworkName(exampleVirtualNetwork.name())
                .addressPrefixes("10.0.1.0/24")
                .build());
    
            var examplePublicIp = new PublicIp("examplePublicIp", PublicIpArgs.builder()
                .name("testpip")
                .location(example.location())
                .resourceGroupName(example.name())
                .allocationMethod("Static")
                .sku("Standard")
                .build());
    
            var exampleFirewall = new Firewall("exampleFirewall", FirewallArgs.builder()
                .name("testfirewall")
                .location(example.location())
                .resourceGroupName(example.name())
                .skuName("AZFW_VNet")
                .skuTier("Standard")
                .ipConfigurations(FirewallIpConfigurationArgs.builder()
                    .name("configuration")
                    .subnetId(exampleSubnet.id())
                    .publicIpAddressId(examplePublicIp.id())
                    .build())
                .build());
    
            var exampleFirewallNatRuleCollection = new FirewallNatRuleCollection("exampleFirewallNatRuleCollection", FirewallNatRuleCollectionArgs.builder()
                .name("testcollection")
                .azureFirewallName(exampleFirewall.name())
                .resourceGroupName(example.name())
                .priority(100)
                .action("Dnat")
                .rules(FirewallNatRuleCollectionRuleArgs.builder()
                    .name("testrule")
                    .sourceAddresses("10.0.0.0/16")
                    .destinationPorts("53")
                    .destinationAddresses(examplePublicIp.ipAddress())
                    .translatedPort(53)
                    .translatedAddress("8.8.8.8")
                    .protocols(                
                        "TCP",
                        "UDP")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleVirtualNetwork:
        type: azure:network:VirtualNetwork
        name: example
        properties:
          name: testvnet
          addressSpaces:
            - 10.0.0.0/16
          location: ${example.location}
          resourceGroupName: ${example.name}
      exampleSubnet:
        type: azure:network:Subnet
        name: example
        properties:
          name: AzureFirewallSubnet
          resourceGroupName: ${example.name}
          virtualNetworkName: ${exampleVirtualNetwork.name}
          addressPrefixes:
            - 10.0.1.0/24
      examplePublicIp:
        type: azure:network:PublicIp
        name: example
        properties:
          name: testpip
          location: ${example.location}
          resourceGroupName: ${example.name}
          allocationMethod: Static
          sku: Standard
      exampleFirewall:
        type: azure:network:Firewall
        name: example
        properties:
          name: testfirewall
          location: ${example.location}
          resourceGroupName: ${example.name}
          skuName: AZFW_VNet
          skuTier: Standard
          ipConfigurations:
            - name: configuration
              subnetId: ${exampleSubnet.id}
              publicIpAddressId: ${examplePublicIp.id}
      exampleFirewallNatRuleCollection:
        type: azure:network:FirewallNatRuleCollection
        name: example
        properties:
          name: testcollection
          azureFirewallName: ${exampleFirewall.name}
          resourceGroupName: ${example.name}
          priority: 100
          action: Dnat
          rules:
            - name: testrule
              sourceAddresses:
                - 10.0.0.0/16
              destinationPorts:
                - '53'
              destinationAddresses:
                - ${examplePublicIp.ipAddress}
              translatedPort: 53
              translatedAddress: 8.8.8.8
              protocols:
                - TCP
                - UDP
    

    Create FirewallNatRuleCollection Resource

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

    Constructor syntax

    new FirewallNatRuleCollection(name: string, args: FirewallNatRuleCollectionArgs, opts?: CustomResourceOptions);
    @overload
    def FirewallNatRuleCollection(resource_name: str,
                                  args: FirewallNatRuleCollectionArgs,
                                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def FirewallNatRuleCollection(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  action: Optional[str] = None,
                                  azure_firewall_name: Optional[str] = None,
                                  priority: Optional[int] = None,
                                  resource_group_name: Optional[str] = None,
                                  rules: Optional[Sequence[FirewallNatRuleCollectionRuleArgs]] = None,
                                  name: Optional[str] = None)
    func NewFirewallNatRuleCollection(ctx *Context, name string, args FirewallNatRuleCollectionArgs, opts ...ResourceOption) (*FirewallNatRuleCollection, error)
    public FirewallNatRuleCollection(string name, FirewallNatRuleCollectionArgs args, CustomResourceOptions? opts = null)
    public FirewallNatRuleCollection(String name, FirewallNatRuleCollectionArgs args)
    public FirewallNatRuleCollection(String name, FirewallNatRuleCollectionArgs args, CustomResourceOptions options)
    
    type: azure:network:FirewallNatRuleCollection
    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 FirewallNatRuleCollectionArgs
    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 FirewallNatRuleCollectionArgs
    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 FirewallNatRuleCollectionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FirewallNatRuleCollectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FirewallNatRuleCollectionArgs
    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 firewallNatRuleCollectionResource = new Azure.Network.FirewallNatRuleCollection("firewallNatRuleCollectionResource", new()
    {
        Action = "string",
        AzureFirewallName = "string",
        Priority = 0,
        ResourceGroupName = "string",
        Rules = new[]
        {
            new Azure.Network.Inputs.FirewallNatRuleCollectionRuleArgs
            {
                DestinationAddresses = new[]
                {
                    "string",
                },
                DestinationPorts = new[]
                {
                    "string",
                },
                Name = "string",
                Protocols = new[]
                {
                    "string",
                },
                TranslatedAddress = "string",
                TranslatedPort = "string",
                Description = "string",
                SourceAddresses = new[]
                {
                    "string",
                },
                SourceIpGroups = new[]
                {
                    "string",
                },
            },
        },
        Name = "string",
    });
    
    example, err := network.NewFirewallNatRuleCollection(ctx, "firewallNatRuleCollectionResource", &network.FirewallNatRuleCollectionArgs{
    	Action:            pulumi.String("string"),
    	AzureFirewallName: pulumi.String("string"),
    	Priority:          pulumi.Int(0),
    	ResourceGroupName: pulumi.String("string"),
    	Rules: network.FirewallNatRuleCollectionRuleArray{
    		&network.FirewallNatRuleCollectionRuleArgs{
    			DestinationAddresses: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			DestinationPorts: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Name: pulumi.String("string"),
    			Protocols: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			TranslatedAddress: pulumi.String("string"),
    			TranslatedPort:    pulumi.String("string"),
    			Description:       pulumi.String("string"),
    			SourceAddresses: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			SourceIpGroups: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    	},
    	Name: pulumi.String("string"),
    })
    
    var firewallNatRuleCollectionResource = new FirewallNatRuleCollection("firewallNatRuleCollectionResource", FirewallNatRuleCollectionArgs.builder()
        .action("string")
        .azureFirewallName("string")
        .priority(0)
        .resourceGroupName("string")
        .rules(FirewallNatRuleCollectionRuleArgs.builder()
            .destinationAddresses("string")
            .destinationPorts("string")
            .name("string")
            .protocols("string")
            .translatedAddress("string")
            .translatedPort("string")
            .description("string")
            .sourceAddresses("string")
            .sourceIpGroups("string")
            .build())
        .name("string")
        .build());
    
    firewall_nat_rule_collection_resource = azure.network.FirewallNatRuleCollection("firewallNatRuleCollectionResource",
        action="string",
        azure_firewall_name="string",
        priority=0,
        resource_group_name="string",
        rules=[azure.network.FirewallNatRuleCollectionRuleArgs(
            destination_addresses=["string"],
            destination_ports=["string"],
            name="string",
            protocols=["string"],
            translated_address="string",
            translated_port="string",
            description="string",
            source_addresses=["string"],
            source_ip_groups=["string"],
        )],
        name="string")
    
    const firewallNatRuleCollectionResource = new azure.network.FirewallNatRuleCollection("firewallNatRuleCollectionResource", {
        action: "string",
        azureFirewallName: "string",
        priority: 0,
        resourceGroupName: "string",
        rules: [{
            destinationAddresses: ["string"],
            destinationPorts: ["string"],
            name: "string",
            protocols: ["string"],
            translatedAddress: "string",
            translatedPort: "string",
            description: "string",
            sourceAddresses: ["string"],
            sourceIpGroups: ["string"],
        }],
        name: "string",
    });
    
    type: azure:network:FirewallNatRuleCollection
    properties:
        action: string
        azureFirewallName: string
        name: string
        priority: 0
        resourceGroupName: string
        rules:
            - description: string
              destinationAddresses:
                - string
              destinationPorts:
                - string
              name: string
              protocols:
                - string
              sourceAddresses:
                - string
              sourceIpGroups:
                - string
              translatedAddress: string
              translatedPort: string
    

    FirewallNatRuleCollection Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The FirewallNatRuleCollection resource accepts the following input properties:

    Action string
    Specifies the action the rule will apply to matching traffic. Possible values are Dnat and Snat.
    AzureFirewallName string
    Specifies the name of the Firewall in which the NAT Rule Collection should be created. Changing this forces a new resource to be created.
    Priority int
    Specifies the priority of the rule collection. Possible values are between 100 - 65000.
    ResourceGroupName string
    Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created.
    Rules List<FirewallNatRuleCollectionRule>
    One or more rule blocks as defined below.
    Name string
    Specifies the name of the NAT Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created.
    Action string
    Specifies the action the rule will apply to matching traffic. Possible values are Dnat and Snat.
    AzureFirewallName string
    Specifies the name of the Firewall in which the NAT Rule Collection should be created. Changing this forces a new resource to be created.
    Priority int
    Specifies the priority of the rule collection. Possible values are between 100 - 65000.
    ResourceGroupName string
    Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created.
    Rules []FirewallNatRuleCollectionRuleArgs
    One or more rule blocks as defined below.
    Name string
    Specifies the name of the NAT Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created.
    action String
    Specifies the action the rule will apply to matching traffic. Possible values are Dnat and Snat.
    azureFirewallName String
    Specifies the name of the Firewall in which the NAT Rule Collection should be created. Changing this forces a new resource to be created.
    priority Integer
    Specifies the priority of the rule collection. Possible values are between 100 - 65000.
    resourceGroupName String
    Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created.
    rules List<FirewallNatRuleCollectionRule>
    One or more rule blocks as defined below.
    name String
    Specifies the name of the NAT Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created.
    action string
    Specifies the action the rule will apply to matching traffic. Possible values are Dnat and Snat.
    azureFirewallName string
    Specifies the name of the Firewall in which the NAT Rule Collection should be created. Changing this forces a new resource to be created.
    priority number
    Specifies the priority of the rule collection. Possible values are between 100 - 65000.
    resourceGroupName string
    Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created.
    rules FirewallNatRuleCollectionRule[]
    One or more rule blocks as defined below.
    name string
    Specifies the name of the NAT Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created.
    action str
    Specifies the action the rule will apply to matching traffic. Possible values are Dnat and Snat.
    azure_firewall_name str
    Specifies the name of the Firewall in which the NAT Rule Collection should be created. Changing this forces a new resource to be created.
    priority int
    Specifies the priority of the rule collection. Possible values are between 100 - 65000.
    resource_group_name str
    Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created.
    rules Sequence[FirewallNatRuleCollectionRuleArgs]
    One or more rule blocks as defined below.
    name str
    Specifies the name of the NAT Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created.
    action String
    Specifies the action the rule will apply to matching traffic. Possible values are Dnat and Snat.
    azureFirewallName String
    Specifies the name of the Firewall in which the NAT Rule Collection should be created. Changing this forces a new resource to be created.
    priority Number
    Specifies the priority of the rule collection. Possible values are between 100 - 65000.
    resourceGroupName String
    Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created.
    rules List<Property Map>
    One or more rule blocks as defined below.
    name String
    Specifies the name of the NAT Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing FirewallNatRuleCollection Resource

    Get an existing FirewallNatRuleCollection 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?: FirewallNatRuleCollectionState, opts?: CustomResourceOptions): FirewallNatRuleCollection
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            action: Optional[str] = None,
            azure_firewall_name: Optional[str] = None,
            name: Optional[str] = None,
            priority: Optional[int] = None,
            resource_group_name: Optional[str] = None,
            rules: Optional[Sequence[FirewallNatRuleCollectionRuleArgs]] = None) -> FirewallNatRuleCollection
    func GetFirewallNatRuleCollection(ctx *Context, name string, id IDInput, state *FirewallNatRuleCollectionState, opts ...ResourceOption) (*FirewallNatRuleCollection, error)
    public static FirewallNatRuleCollection Get(string name, Input<string> id, FirewallNatRuleCollectionState? state, CustomResourceOptions? opts = null)
    public static FirewallNatRuleCollection get(String name, Output<String> id, FirewallNatRuleCollectionState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Action string
    Specifies the action the rule will apply to matching traffic. Possible values are Dnat and Snat.
    AzureFirewallName string
    Specifies the name of the Firewall in which the NAT Rule Collection should be created. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the NAT Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created.
    Priority int
    Specifies the priority of the rule collection. Possible values are between 100 - 65000.
    ResourceGroupName string
    Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created.
    Rules List<FirewallNatRuleCollectionRule>
    One or more rule blocks as defined below.
    Action string
    Specifies the action the rule will apply to matching traffic. Possible values are Dnat and Snat.
    AzureFirewallName string
    Specifies the name of the Firewall in which the NAT Rule Collection should be created. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the NAT Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created.
    Priority int
    Specifies the priority of the rule collection. Possible values are between 100 - 65000.
    ResourceGroupName string
    Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created.
    Rules []FirewallNatRuleCollectionRuleArgs
    One or more rule blocks as defined below.
    action String
    Specifies the action the rule will apply to matching traffic. Possible values are Dnat and Snat.
    azureFirewallName String
    Specifies the name of the Firewall in which the NAT Rule Collection should be created. Changing this forces a new resource to be created.
    name String
    Specifies the name of the NAT Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created.
    priority Integer
    Specifies the priority of the rule collection. Possible values are between 100 - 65000.
    resourceGroupName String
    Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created.
    rules List<FirewallNatRuleCollectionRule>
    One or more rule blocks as defined below.
    action string
    Specifies the action the rule will apply to matching traffic. Possible values are Dnat and Snat.
    azureFirewallName string
    Specifies the name of the Firewall in which the NAT Rule Collection should be created. Changing this forces a new resource to be created.
    name string
    Specifies the name of the NAT Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created.
    priority number
    Specifies the priority of the rule collection. Possible values are between 100 - 65000.
    resourceGroupName string
    Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created.
    rules FirewallNatRuleCollectionRule[]
    One or more rule blocks as defined below.
    action str
    Specifies the action the rule will apply to matching traffic. Possible values are Dnat and Snat.
    azure_firewall_name str
    Specifies the name of the Firewall in which the NAT Rule Collection should be created. Changing this forces a new resource to be created.
    name str
    Specifies the name of the NAT Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created.
    priority int
    Specifies the priority of the rule collection. Possible values are between 100 - 65000.
    resource_group_name str
    Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created.
    rules Sequence[FirewallNatRuleCollectionRuleArgs]
    One or more rule blocks as defined below.
    action String
    Specifies the action the rule will apply to matching traffic. Possible values are Dnat and Snat.
    azureFirewallName String
    Specifies the name of the Firewall in which the NAT Rule Collection should be created. Changing this forces a new resource to be created.
    name String
    Specifies the name of the NAT Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created.
    priority Number
    Specifies the priority of the rule collection. Possible values are between 100 - 65000.
    resourceGroupName String
    Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created.
    rules List<Property Map>
    One or more rule blocks as defined below.

    Supporting Types

    FirewallNatRuleCollectionRule, FirewallNatRuleCollectionRuleArgs

    DestinationAddresses List<string>
    A list of destination IP addresses and/or IP ranges.
    DestinationPorts List<string>
    A list of destination ports.
    Name string
    Specifies the name of the rule.
    Protocols List<string>
    A list of protocols. Possible values are Any, ICMP, TCP and UDP. If action is Dnat, protocols can only be TCP and UDP.
    TranslatedAddress string
    The address of the service behind the Firewall.
    TranslatedPort string
    The port of the service behind the Firewall.
    Description string
    Specifies a description for the rule.
    SourceAddresses List<string>
    A list of source IP addresses and/or IP ranges.
    SourceIpGroups List<string>

    A list of source IP Group IDs for the rule.

    NOTE At least one of source_addresses and source_ip_groups must be specified for a rule.

    DestinationAddresses []string
    A list of destination IP addresses and/or IP ranges.
    DestinationPorts []string
    A list of destination ports.
    Name string
    Specifies the name of the rule.
    Protocols []string
    A list of protocols. Possible values are Any, ICMP, TCP and UDP. If action is Dnat, protocols can only be TCP and UDP.
    TranslatedAddress string
    The address of the service behind the Firewall.
    TranslatedPort string
    The port of the service behind the Firewall.
    Description string
    Specifies a description for the rule.
    SourceAddresses []string
    A list of source IP addresses and/or IP ranges.
    SourceIpGroups []string

    A list of source IP Group IDs for the rule.

    NOTE At least one of source_addresses and source_ip_groups must be specified for a rule.

    destinationAddresses List<String>
    A list of destination IP addresses and/or IP ranges.
    destinationPorts List<String>
    A list of destination ports.
    name String
    Specifies the name of the rule.
    protocols List<String>
    A list of protocols. Possible values are Any, ICMP, TCP and UDP. If action is Dnat, protocols can only be TCP and UDP.
    translatedAddress String
    The address of the service behind the Firewall.
    translatedPort String
    The port of the service behind the Firewall.
    description String
    Specifies a description for the rule.
    sourceAddresses List<String>
    A list of source IP addresses and/or IP ranges.
    sourceIpGroups List<String>

    A list of source IP Group IDs for the rule.

    NOTE At least one of source_addresses and source_ip_groups must be specified for a rule.

    destinationAddresses string[]
    A list of destination IP addresses and/or IP ranges.
    destinationPorts string[]
    A list of destination ports.
    name string
    Specifies the name of the rule.
    protocols string[]
    A list of protocols. Possible values are Any, ICMP, TCP and UDP. If action is Dnat, protocols can only be TCP and UDP.
    translatedAddress string
    The address of the service behind the Firewall.
    translatedPort string
    The port of the service behind the Firewall.
    description string
    Specifies a description for the rule.
    sourceAddresses string[]
    A list of source IP addresses and/or IP ranges.
    sourceIpGroups string[]

    A list of source IP Group IDs for the rule.

    NOTE At least one of source_addresses and source_ip_groups must be specified for a rule.

    destination_addresses Sequence[str]
    A list of destination IP addresses and/or IP ranges.
    destination_ports Sequence[str]
    A list of destination ports.
    name str
    Specifies the name of the rule.
    protocols Sequence[str]
    A list of protocols. Possible values are Any, ICMP, TCP and UDP. If action is Dnat, protocols can only be TCP and UDP.
    translated_address str
    The address of the service behind the Firewall.
    translated_port str
    The port of the service behind the Firewall.
    description str
    Specifies a description for the rule.
    source_addresses Sequence[str]
    A list of source IP addresses and/or IP ranges.
    source_ip_groups Sequence[str]

    A list of source IP Group IDs for the rule.

    NOTE At least one of source_addresses and source_ip_groups must be specified for a rule.

    destinationAddresses List<String>
    A list of destination IP addresses and/or IP ranges.
    destinationPorts List<String>
    A list of destination ports.
    name String
    Specifies the name of the rule.
    protocols List<String>
    A list of protocols. Possible values are Any, ICMP, TCP and UDP. If action is Dnat, protocols can only be TCP and UDP.
    translatedAddress String
    The address of the service behind the Firewall.
    translatedPort String
    The port of the service behind the Firewall.
    description String
    Specifies a description for the rule.
    sourceAddresses List<String>
    A list of source IP addresses and/or IP ranges.
    sourceIpGroups List<String>

    A list of source IP Group IDs for the rule.

    NOTE At least one of source_addresses and source_ip_groups must be specified for a rule.

    Import

    Azure Firewall NAT Rule Collections can be imported using the resource id, e.g.

    $ pulumi import azure:network/firewallNatRuleCollection:FirewallNatRuleCollection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/azureFirewalls/myfirewall/natRuleCollections/mycollection
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi