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

We recommend using Azure Native.

Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi

azure.network.FirewallNetworkRuleCollection

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi

    Manages a Network 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 exampleFirewallNetworkRuleCollection = new azure.network.FirewallNetworkRuleCollection("example", {
        name: "testcollection",
        azureFirewallName: exampleFirewall.name,
        resourceGroupName: example.name,
        priority: 100,
        action: "Allow",
        rules: [{
            name: "testrule",
            sourceAddresses: ["10.0.0.0/16"],
            destinationPorts: ["53"],
            destinationAddresses: [
                "8.8.8.8",
                "8.8.4.4",
            ],
            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=[{
            "name": "configuration",
            "subnet_id": example_subnet.id,
            "public_ip_address_id": example_public_ip.id,
        }])
    example_firewall_network_rule_collection = azure.network.FirewallNetworkRuleCollection("example",
        name="testcollection",
        azure_firewall_name=example_firewall.name,
        resource_group_name=example.name,
        priority=100,
        action="Allow",
        rules=[{
            "name": "testrule",
            "source_addresses": ["10.0.0.0/16"],
            "destination_ports": ["53"],
            "destination_addresses": [
                "8.8.8.8",
                "8.8.4.4",
            ],
            "protocols": [
                "TCP",
                "UDP",
            ],
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v6/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.NewFirewallNetworkRuleCollection(ctx, "example", &network.FirewallNetworkRuleCollectionArgs{
    			Name:              pulumi.String("testcollection"),
    			AzureFirewallName: exampleFirewall.Name,
    			ResourceGroupName: example.Name,
    			Priority:          pulumi.Int(100),
    			Action:            pulumi.String("Allow"),
    			Rules: network.FirewallNetworkRuleCollectionRuleArray{
    				&network.FirewallNetworkRuleCollectionRuleArgs{
    					Name: pulumi.String("testrule"),
    					SourceAddresses: pulumi.StringArray{
    						pulumi.String("10.0.0.0/16"),
    					},
    					DestinationPorts: pulumi.StringArray{
    						pulumi.String("53"),
    					},
    					DestinationAddresses: pulumi.StringArray{
    						pulumi.String("8.8.8.8"),
    						pulumi.String("8.8.4.4"),
    					},
    					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 exampleFirewallNetworkRuleCollection = new Azure.Network.FirewallNetworkRuleCollection("example", new()
        {
            Name = "testcollection",
            AzureFirewallName = exampleFirewall.Name,
            ResourceGroupName = example.Name,
            Priority = 100,
            Action = "Allow",
            Rules = new[]
            {
                new Azure.Network.Inputs.FirewallNetworkRuleCollectionRuleArgs
                {
                    Name = "testrule",
                    SourceAddresses = new[]
                    {
                        "10.0.0.0/16",
                    },
                    DestinationPorts = new[]
                    {
                        "53",
                    },
                    DestinationAddresses = new[]
                    {
                        "8.8.8.8",
                        "8.8.4.4",
                    },
                    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.FirewallNetworkRuleCollection;
    import com.pulumi.azure.network.FirewallNetworkRuleCollectionArgs;
    import com.pulumi.azure.network.inputs.FirewallNetworkRuleCollectionRuleArgs;
    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 exampleFirewallNetworkRuleCollection = new FirewallNetworkRuleCollection("exampleFirewallNetworkRuleCollection", FirewallNetworkRuleCollectionArgs.builder()
                .name("testcollection")
                .azureFirewallName(exampleFirewall.name())
                .resourceGroupName(example.name())
                .priority(100)
                .action("Allow")
                .rules(FirewallNetworkRuleCollectionRuleArgs.builder()
                    .name("testrule")
                    .sourceAddresses("10.0.0.0/16")
                    .destinationPorts("53")
                    .destinationAddresses(                
                        "8.8.8.8",
                        "8.8.4.4")
                    .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}
      exampleFirewallNetworkRuleCollection:
        type: azure:network:FirewallNetworkRuleCollection
        name: example
        properties:
          name: testcollection
          azureFirewallName: ${exampleFirewall.name}
          resourceGroupName: ${example.name}
          priority: 100
          action: Allow
          rules:
            - name: testrule
              sourceAddresses:
                - 10.0.0.0/16
              destinationPorts:
                - '53'
              destinationAddresses:
                - 8.8.8.8
                - 8.8.4.4
              protocols:
                - TCP
                - UDP
    

    Create FirewallNetworkRuleCollection Resource

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

    Constructor syntax

    new FirewallNetworkRuleCollection(name: string, args: FirewallNetworkRuleCollectionArgs, opts?: CustomResourceOptions);
    @overload
    def FirewallNetworkRuleCollection(resource_name: str,
                                      args: FirewallNetworkRuleCollectionArgs,
                                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def FirewallNetworkRuleCollection(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[FirewallNetworkRuleCollectionRuleArgs]] = None,
                                      name: Optional[str] = None)
    func NewFirewallNetworkRuleCollection(ctx *Context, name string, args FirewallNetworkRuleCollectionArgs, opts ...ResourceOption) (*FirewallNetworkRuleCollection, error)
    public FirewallNetworkRuleCollection(string name, FirewallNetworkRuleCollectionArgs args, CustomResourceOptions? opts = null)
    public FirewallNetworkRuleCollection(String name, FirewallNetworkRuleCollectionArgs args)
    public FirewallNetworkRuleCollection(String name, FirewallNetworkRuleCollectionArgs args, CustomResourceOptions options)
    
    type: azure:network:FirewallNetworkRuleCollection
    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 FirewallNetworkRuleCollectionArgs
    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 FirewallNetworkRuleCollectionArgs
    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 FirewallNetworkRuleCollectionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FirewallNetworkRuleCollectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FirewallNetworkRuleCollectionArgs
    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 firewallNetworkRuleCollectionResource = new Azure.Network.FirewallNetworkRuleCollection("firewallNetworkRuleCollectionResource", new()
    {
        Action = "string",
        AzureFirewallName = "string",
        Priority = 0,
        ResourceGroupName = "string",
        Rules = new[]
        {
            new Azure.Network.Inputs.FirewallNetworkRuleCollectionRuleArgs
            {
                DestinationPorts = new[]
                {
                    "string",
                },
                Name = "string",
                Protocols = new[]
                {
                    "string",
                },
                Description = "string",
                DestinationAddresses = new[]
                {
                    "string",
                },
                DestinationFqdns = new[]
                {
                    "string",
                },
                DestinationIpGroups = new[]
                {
                    "string",
                },
                SourceAddresses = new[]
                {
                    "string",
                },
                SourceIpGroups = new[]
                {
                    "string",
                },
            },
        },
        Name = "string",
    });
    
    example, err := network.NewFirewallNetworkRuleCollection(ctx, "firewallNetworkRuleCollectionResource", &network.FirewallNetworkRuleCollectionArgs{
    	Action:            pulumi.String("string"),
    	AzureFirewallName: pulumi.String("string"),
    	Priority:          pulumi.Int(0),
    	ResourceGroupName: pulumi.String("string"),
    	Rules: network.FirewallNetworkRuleCollectionRuleArray{
    		&network.FirewallNetworkRuleCollectionRuleArgs{
    			DestinationPorts: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Name: pulumi.String("string"),
    			Protocols: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Description: pulumi.String("string"),
    			DestinationAddresses: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			DestinationFqdns: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			DestinationIpGroups: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			SourceAddresses: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			SourceIpGroups: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    	},
    	Name: pulumi.String("string"),
    })
    
    var firewallNetworkRuleCollectionResource = new FirewallNetworkRuleCollection("firewallNetworkRuleCollectionResource", FirewallNetworkRuleCollectionArgs.builder()
        .action("string")
        .azureFirewallName("string")
        .priority(0)
        .resourceGroupName("string")
        .rules(FirewallNetworkRuleCollectionRuleArgs.builder()
            .destinationPorts("string")
            .name("string")
            .protocols("string")
            .description("string")
            .destinationAddresses("string")
            .destinationFqdns("string")
            .destinationIpGroups("string")
            .sourceAddresses("string")
            .sourceIpGroups("string")
            .build())
        .name("string")
        .build());
    
    firewall_network_rule_collection_resource = azure.network.FirewallNetworkRuleCollection("firewallNetworkRuleCollectionResource",
        action="string",
        azure_firewall_name="string",
        priority=0,
        resource_group_name="string",
        rules=[{
            "destinationPorts": ["string"],
            "name": "string",
            "protocols": ["string"],
            "description": "string",
            "destinationAddresses": ["string"],
            "destinationFqdns": ["string"],
            "destinationIpGroups": ["string"],
            "sourceAddresses": ["string"],
            "sourceIpGroups": ["string"],
        }],
        name="string")
    
    const firewallNetworkRuleCollectionResource = new azure.network.FirewallNetworkRuleCollection("firewallNetworkRuleCollectionResource", {
        action: "string",
        azureFirewallName: "string",
        priority: 0,
        resourceGroupName: "string",
        rules: [{
            destinationPorts: ["string"],
            name: "string",
            protocols: ["string"],
            description: "string",
            destinationAddresses: ["string"],
            destinationFqdns: ["string"],
            destinationIpGroups: ["string"],
            sourceAddresses: ["string"],
            sourceIpGroups: ["string"],
        }],
        name: "string",
    });
    
    type: azure:network:FirewallNetworkRuleCollection
    properties:
        action: string
        azureFirewallName: string
        name: string
        priority: 0
        resourceGroupName: string
        rules:
            - description: string
              destinationAddresses:
                - string
              destinationFqdns:
                - string
              destinationIpGroups:
                - string
              destinationPorts:
                - string
              name: string
              protocols:
                - string
              sourceAddresses:
                - string
              sourceIpGroups:
                - string
    

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

    Action string
    Specifies the action the rule will apply to matching traffic. Possible values are Allow and Deny.
    AzureFirewallName string
    Specifies the name of the Firewall in which the Network 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<FirewallNetworkRuleCollectionRule>
    One or more rule blocks as defined below.
    Name string
    Specifies the name of the Network 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 Allow and Deny.
    AzureFirewallName string
    Specifies the name of the Firewall in which the Network 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 []FirewallNetworkRuleCollectionRuleArgs
    One or more rule blocks as defined below.
    Name string
    Specifies the name of the Network 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 Allow and Deny.
    azureFirewallName String
    Specifies the name of the Firewall in which the Network 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<FirewallNetworkRuleCollectionRule>
    One or more rule blocks as defined below.
    name String
    Specifies the name of the Network 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 Allow and Deny.
    azureFirewallName string
    Specifies the name of the Firewall in which the Network 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 FirewallNetworkRuleCollectionRule[]
    One or more rule blocks as defined below.
    name string
    Specifies the name of the Network 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 Allow and Deny.
    azure_firewall_name str
    Specifies the name of the Firewall in which the Network 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[FirewallNetworkRuleCollectionRuleArgs]
    One or more rule blocks as defined below.
    name str
    Specifies the name of the Network 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 Allow and Deny.
    azureFirewallName String
    Specifies the name of the Firewall in which the Network 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 Network 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 FirewallNetworkRuleCollection 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 FirewallNetworkRuleCollection Resource

    Get an existing FirewallNetworkRuleCollection 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?: FirewallNetworkRuleCollectionState, opts?: CustomResourceOptions): FirewallNetworkRuleCollection
    @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[FirewallNetworkRuleCollectionRuleArgs]] = None) -> FirewallNetworkRuleCollection
    func GetFirewallNetworkRuleCollection(ctx *Context, name string, id IDInput, state *FirewallNetworkRuleCollectionState, opts ...ResourceOption) (*FirewallNetworkRuleCollection, error)
    public static FirewallNetworkRuleCollection Get(string name, Input<string> id, FirewallNetworkRuleCollectionState? state, CustomResourceOptions? opts = null)
    public static FirewallNetworkRuleCollection get(String name, Output<String> id, FirewallNetworkRuleCollectionState 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 Allow and Deny.
    AzureFirewallName string
    Specifies the name of the Firewall in which the Network Rule Collection should be created. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the Network 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<FirewallNetworkRuleCollectionRule>
    One or more rule blocks as defined below.
    Action string
    Specifies the action the rule will apply to matching traffic. Possible values are Allow and Deny.
    AzureFirewallName string
    Specifies the name of the Firewall in which the Network Rule Collection should be created. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the Network 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 []FirewallNetworkRuleCollectionRuleArgs
    One or more rule blocks as defined below.
    action String
    Specifies the action the rule will apply to matching traffic. Possible values are Allow and Deny.
    azureFirewallName String
    Specifies the name of the Firewall in which the Network Rule Collection should be created. Changing this forces a new resource to be created.
    name String
    Specifies the name of the Network 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<FirewallNetworkRuleCollectionRule>
    One or more rule blocks as defined below.
    action string
    Specifies the action the rule will apply to matching traffic. Possible values are Allow and Deny.
    azureFirewallName string
    Specifies the name of the Firewall in which the Network Rule Collection should be created. Changing this forces a new resource to be created.
    name string
    Specifies the name of the Network 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 FirewallNetworkRuleCollectionRule[]
    One or more rule blocks as defined below.
    action str
    Specifies the action the rule will apply to matching traffic. Possible values are Allow and Deny.
    azure_firewall_name str
    Specifies the name of the Firewall in which the Network Rule Collection should be created. Changing this forces a new resource to be created.
    name str
    Specifies the name of the Network 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[FirewallNetworkRuleCollectionRuleArgs]
    One or more rule blocks as defined below.
    action String
    Specifies the action the rule will apply to matching traffic. Possible values are Allow and Deny.
    azureFirewallName String
    Specifies the name of the Firewall in which the Network Rule Collection should be created. Changing this forces a new resource to be created.
    name String
    Specifies the name of the Network 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

    FirewallNetworkRuleCollectionRule, FirewallNetworkRuleCollectionRuleArgs

    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.
    Description string
    Specifies a description for the rule.
    DestinationAddresses List<string>
    Either a list of destination IP addresses and/or IP ranges, or a list of destination Service Tags.
    DestinationFqdns List<string>

    A list of destination FQDNS for the rule.

    NOTE You must enable DNS Proxy to use FQDNs in your network rules.

    NOTE At least one of destination_addresses, destination_ip_groups and destination_fqdns must be specified for a rule.

    DestinationIpGroups List<string>
    A list of destination IP Group IDs for the rule.
    SourceAddresses List<string>
    A list of source IP addresses and/or IP ranges.
    SourceIpGroups List<string>

    A list of IP Group IDs for the rule.

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

    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.
    Description string
    Specifies a description for the rule.
    DestinationAddresses []string
    Either a list of destination IP addresses and/or IP ranges, or a list of destination Service Tags.
    DestinationFqdns []string

    A list of destination FQDNS for the rule.

    NOTE You must enable DNS Proxy to use FQDNs in your network rules.

    NOTE At least one of destination_addresses, destination_ip_groups and destination_fqdns must be specified for a rule.

    DestinationIpGroups []string
    A list of destination IP Group IDs for the rule.
    SourceAddresses []string
    A list of source IP addresses and/or IP ranges.
    SourceIpGroups []string

    A list of IP Group IDs for the rule.

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

    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.
    description String
    Specifies a description for the rule.
    destinationAddresses List<String>
    Either a list of destination IP addresses and/or IP ranges, or a list of destination Service Tags.
    destinationFqdns List<String>

    A list of destination FQDNS for the rule.

    NOTE You must enable DNS Proxy to use FQDNs in your network rules.

    NOTE At least one of destination_addresses, destination_ip_groups and destination_fqdns must be specified for a rule.

    destinationIpGroups List<String>
    A list of destination IP Group IDs for the rule.
    sourceAddresses List<String>
    A list of source IP addresses and/or IP ranges.
    sourceIpGroups List<String>

    A list of IP Group IDs for the rule.

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

    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.
    description string
    Specifies a description for the rule.
    destinationAddresses string[]
    Either a list of destination IP addresses and/or IP ranges, or a list of destination Service Tags.
    destinationFqdns string[]

    A list of destination FQDNS for the rule.

    NOTE You must enable DNS Proxy to use FQDNs in your network rules.

    NOTE At least one of destination_addresses, destination_ip_groups and destination_fqdns must be specified for a rule.

    destinationIpGroups string[]
    A list of destination IP Group IDs for the rule.
    sourceAddresses string[]
    A list of source IP addresses and/or IP ranges.
    sourceIpGroups string[]

    A list of IP Group IDs for the rule.

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

    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.
    description str
    Specifies a description for the rule.
    destination_addresses Sequence[str]
    Either a list of destination IP addresses and/or IP ranges, or a list of destination Service Tags.
    destination_fqdns Sequence[str]

    A list of destination FQDNS for the rule.

    NOTE You must enable DNS Proxy to use FQDNs in your network rules.

    NOTE At least one of destination_addresses, destination_ip_groups and destination_fqdns must be specified for a rule.

    destination_ip_groups Sequence[str]
    A list of destination IP Group IDs 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 IP Group IDs for the rule.

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

    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.
    description String
    Specifies a description for the rule.
    destinationAddresses List<String>
    Either a list of destination IP addresses and/or IP ranges, or a list of destination Service Tags.
    destinationFqdns List<String>

    A list of destination FQDNS for the rule.

    NOTE You must enable DNS Proxy to use FQDNs in your network rules.

    NOTE At least one of destination_addresses, destination_ip_groups and destination_fqdns must be specified for a rule.

    destinationIpGroups List<String>
    A list of destination IP Group IDs for the rule.
    sourceAddresses List<String>
    A list of source IP addresses and/or IP ranges.
    sourceIpGroups List<String>

    A list of 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 Network Rule Collections can be imported using the resource id, e.g.

    $ pulumi import azure:network/firewallNetworkRuleCollection:FirewallNetworkRuleCollection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/azureFirewalls/myfirewall/networkRuleCollections/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 v6.2.0 published on Friday, Sep 27, 2024 by Pulumi