import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a Network Rule Collection within an Azure Firewall. * * ## Example Usage * * ```typescript * 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", * ], * }], * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.Network` - 2025-01-01 * * ## Import * * Azure Firewall Network Rule Collections can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:network/firewallNetworkRuleCollection:FirewallNetworkRuleCollection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/azureFirewalls/myfirewall/networkRuleCollections/mycollection * ``` */ export declare class FirewallNetworkRuleCollection extends pulumi.CustomResource { /** * Get an existing FirewallNetworkRuleCollection resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: FirewallNetworkRuleCollectionState, opts?: pulumi.CustomResourceOptions): FirewallNetworkRuleCollection; /** * Returns true if the given object is an instance of FirewallNetworkRuleCollection. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is FirewallNetworkRuleCollection; /** * Specifies the action the rule will apply to matching traffic. Possible values are `Allow` and `Deny`. */ readonly action: pulumi.Output; /** * Specifies the name of the Firewall in which the Network Rule Collection should be created. Changing this forces a new resource to be created. */ readonly azureFirewallName: pulumi.Output; /** * Specifies the name of the Network Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * Specifies the priority of the rule collection. Possible values are between `100` - `65000`. */ readonly priority: pulumi.Output; /** * Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created. */ readonly resourceGroupName: pulumi.Output; /** * One or more `rule` blocks as defined below. */ readonly rules: pulumi.Output; /** * Create a FirewallNetworkRuleCollection resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: FirewallNetworkRuleCollectionArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering FirewallNetworkRuleCollection resources. */ export interface FirewallNetworkRuleCollectionState { /** * Specifies the action the rule will apply to matching traffic. Possible values are `Allow` and `Deny`. */ action?: pulumi.Input; /** * Specifies the name of the Firewall in which the Network Rule Collection should be created. Changing this forces a new resource to be created. */ azureFirewallName?: pulumi.Input; /** * Specifies the name of the Network Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * Specifies the priority of the rule collection. Possible values are between `100` - `65000`. */ priority?: pulumi.Input; /** * Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created. */ resourceGroupName?: pulumi.Input; /** * One or more `rule` blocks as defined below. */ rules?: pulumi.Input[]>; } /** * The set of arguments for constructing a FirewallNetworkRuleCollection resource. */ export interface FirewallNetworkRuleCollectionArgs { /** * Specifies the action the rule will apply to matching traffic. Possible values are `Allow` and `Deny`. */ action: pulumi.Input; /** * Specifies the name of the Firewall in which the Network Rule Collection should be created. Changing this forces a new resource to be created. */ azureFirewallName: pulumi.Input; /** * Specifies the name of the Network Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * Specifies the priority of the rule collection. Possible values are between `100` - `65000`. */ priority: pulumi.Input; /** * Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created. */ resourceGroupName: pulumi.Input; /** * One or more `rule` blocks as defined below. */ rules: pulumi.Input[]>; }