We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.network.getFirewallPolicy
Explore with Pulumi AI
Use this data source to access information about an existing Firewall Policy.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.network.getFirewallPolicy({
    name: "existing",
    resourceGroupName: "existing",
});
export const id = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.network.get_firewall_policy(name="existing",
    resource_group_name="existing")
pulumi.export("id", example.id)
package main
import (
	"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 := network.LookupFirewallPolicy(ctx, &network.LookupFirewallPolicyArgs{
			Name:              "existing",
			ResourceGroupName: "existing",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("id", example.Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = Azure.Network.GetFirewallPolicy.Invoke(new()
    {
        Name = "existing",
        ResourceGroupName = "existing",
    });
    return new Dictionary<string, object?>
    {
        ["id"] = example.Apply(getFirewallPolicyResult => getFirewallPolicyResult.Id),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.network.NetworkFunctions;
import com.pulumi.azure.network.inputs.GetFirewallPolicyArgs;
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) {
        final var example = NetworkFunctions.getFirewallPolicy(GetFirewallPolicyArgs.builder()
            .name("existing")
            .resourceGroupName("existing")
            .build());
        ctx.export("id", example.applyValue(getFirewallPolicyResult -> getFirewallPolicyResult.id()));
    }
}
variables:
  example:
    fn::invoke:
      function: azure:network:getFirewallPolicy
      arguments:
        name: existing
        resourceGroupName: existing
outputs:
  id: ${example.id}
Using getFirewallPolicy
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getFirewallPolicy(args: GetFirewallPolicyArgs, opts?: InvokeOptions): Promise<GetFirewallPolicyResult>
function getFirewallPolicyOutput(args: GetFirewallPolicyOutputArgs, opts?: InvokeOptions): Output<GetFirewallPolicyResult>def get_firewall_policy(name: Optional[str] = None,
                        resource_group_name: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetFirewallPolicyResult
def get_firewall_policy_output(name: Optional[pulumi.Input[str]] = None,
                        resource_group_name: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetFirewallPolicyResult]func LookupFirewallPolicy(ctx *Context, args *LookupFirewallPolicyArgs, opts ...InvokeOption) (*LookupFirewallPolicyResult, error)
func LookupFirewallPolicyOutput(ctx *Context, args *LookupFirewallPolicyOutputArgs, opts ...InvokeOption) LookupFirewallPolicyResultOutput> Note: This function is named LookupFirewallPolicy in the Go SDK.
public static class GetFirewallPolicy 
{
    public static Task<GetFirewallPolicyResult> InvokeAsync(GetFirewallPolicyArgs args, InvokeOptions? opts = null)
    public static Output<GetFirewallPolicyResult> Invoke(GetFirewallPolicyInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetFirewallPolicyResult> getFirewallPolicy(GetFirewallPolicyArgs args, InvokeOptions options)
public static Output<GetFirewallPolicyResult> getFirewallPolicy(GetFirewallPolicyArgs args, InvokeOptions options)
fn::invoke:
  function: azure:network/getFirewallPolicy:getFirewallPolicy
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- The name of this Firewall Policy.
- ResourceGroup stringName 
- The name of the Resource Group where the Firewall Policy exists.
- Name string
- The name of this Firewall Policy.
- ResourceGroup stringName 
- The name of the Resource Group where the Firewall Policy exists.
- name String
- The name of this Firewall Policy.
- resourceGroup StringName 
- The name of the Resource Group where the Firewall Policy exists.
- name string
- The name of this Firewall Policy.
- resourceGroup stringName 
- The name of the Resource Group where the Firewall Policy exists.
- name str
- The name of this Firewall Policy.
- resource_group_ strname 
- The name of the Resource Group where the Firewall Policy exists.
- name String
- The name of this Firewall Policy.
- resourceGroup StringName 
- The name of the Resource Group where the Firewall Policy exists.
getFirewallPolicy Result
The following output properties are available:
- BasePolicy stringId 
- ChildPolicies List<string>
- Dns
List<GetFirewall Policy Dn> 
- Firewalls List<string>
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- Name string
- ResourceGroup stringName 
- RuleCollection List<string>Groups 
- Dictionary<string, string>
- A mapping of tags assigned to the Firewall Policy.
- ThreatIntelligence List<GetAllowlists Firewall Policy Threat Intelligence Allowlist> 
- ThreatIntelligence stringMode 
- BasePolicy stringId 
- ChildPolicies []string
- Dns
[]GetFirewall Policy Dn 
- Firewalls []string
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- Name string
- ResourceGroup stringName 
- RuleCollection []stringGroups 
- map[string]string
- A mapping of tags assigned to the Firewall Policy.
- ThreatIntelligence []GetAllowlists Firewall Policy Threat Intelligence Allowlist 
- ThreatIntelligence stringMode 
- basePolicy StringId 
- childPolicies List<String>
- dns
List<GetFirewall Policy Dn> 
- firewalls List<String>
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- name String
- resourceGroup StringName 
- ruleCollection List<String>Groups 
- Map<String,String>
- A mapping of tags assigned to the Firewall Policy.
- threatIntelligence List<GetAllowlists Firewall Policy Threat Intelligence Allowlist> 
- threatIntelligence StringMode 
- basePolicy stringId 
- childPolicies string[]
- dns
GetFirewall Policy Dn[] 
- firewalls string[]
- id string
- The provider-assigned unique ID for this managed resource.
- location string
- name string
- resourceGroup stringName 
- ruleCollection string[]Groups 
- {[key: string]: string}
- A mapping of tags assigned to the Firewall Policy.
- threatIntelligence GetAllowlists Firewall Policy Threat Intelligence Allowlist[] 
- threatIntelligence stringMode 
- base_policy_ strid 
- child_policies Sequence[str]
- dns
Sequence[GetFirewall Policy Dn] 
- firewalls Sequence[str]
- id str
- The provider-assigned unique ID for this managed resource.
- location str
- name str
- resource_group_ strname 
- rule_collection_ Sequence[str]groups 
- Mapping[str, str]
- A mapping of tags assigned to the Firewall Policy.
- threat_intelligence_ Sequence[Getallowlists Firewall Policy Threat Intelligence Allowlist] 
- threat_intelligence_ strmode 
- basePolicy StringId 
- childPolicies List<String>
- dns List<Property Map>
- firewalls List<String>
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- name String
- resourceGroup StringName 
- ruleCollection List<String>Groups 
- Map<String>
- A mapping of tags assigned to the Firewall Policy.
- threatIntelligence List<Property Map>Allowlists 
- threatIntelligence StringMode 
Supporting Types
GetFirewallPolicyDn   
- NetworkRule boolFqdn Enabled 
- ProxyEnabled bool
- Servers List<string>
- NetworkRule boolFqdn Enabled 
- ProxyEnabled bool
- Servers []string
- networkRule BooleanFqdn Enabled 
- proxyEnabled Boolean
- servers List<String>
- networkRule booleanFqdn Enabled 
- proxyEnabled boolean
- servers string[]
- network_rule_ boolfqdn_ enabled 
- proxy_enabled bool
- servers Sequence[str]
- networkRule BooleanFqdn Enabled 
- proxyEnabled Boolean
- servers List<String>
GetFirewallPolicyThreatIntelligenceAllowlist     
- Fqdns List<string>
- IpAddresses List<string>
- Fqdns []string
- IpAddresses []string
- fqdns List<String>
- ipAddresses List<String>
- fqdns string[]
- ipAddresses string[]
- fqdns Sequence[str]
- ip_addresses Sequence[str]
- fqdns List<String>
- ipAddresses List<String>
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.