FirewallNetworkRuleCollectionArgs

data class FirewallNetworkRuleCollectionArgs(val action: Output<String>? = null, val azureFirewallName: Output<String>? = null, val name: Output<String>? = null, val priority: Output<Int>? = null, val resourceGroupName: Output<String>? = null, val rules: Output<List<FirewallNetworkRuleCollectionRuleArgs>>? = null) : ConvertibleToJava<FirewallNetworkRuleCollectionArgs>

Manages a Network Rule Collection within an Azure Firewall.

Example Usage

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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.addressSpaces("10.0.0.0/16")
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.build());
var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("10.0.1.0/24")
.build());
var examplePublicIp = new PublicIp("examplePublicIp", PublicIpArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.allocationMethod("Static")
.sku("Standard")
.build());
var exampleFirewall = new Firewall("exampleFirewall", FirewallArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.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()
.azureFirewallName(exampleFirewall.name())
.resourceGroupName(exampleResourceGroup.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());
}
}

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

Constructors

Link copied to clipboard
fun FirewallNetworkRuleCollectionArgs(action: Output<String>? = null, azureFirewallName: Output<String>? = null, name: Output<String>? = null, priority: Output<Int>? = null, resourceGroupName: Output<String>? = null, rules: Output<List<FirewallNetworkRuleCollectionRuleArgs>>? = null)

Functions

Link copied to clipboard
open override fun toJava(): FirewallNetworkRuleCollectionArgs

Properties

Link copied to clipboard
val action: Output<String>? = null

Specifies the action the rule will apply to matching traffic. Possible values are Allow and Deny.

Link copied to clipboard
val azureFirewallName: Output<String>? = null

Specifies the name of the Firewall in which the Network Rule Collection should be created. Changing this forces a new resource to be created.

Link copied to clipboard
val name: Output<String>? = null

Specifies the name of the Network Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created.

Link copied to clipboard
val priority: Output<Int>? = null

Specifies the priority of the rule collection. Possible values are between 100 - 65000.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created.

Link copied to clipboard

One or more rule blocks as defined below.