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

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Use this data source to access information about an existing Azure Firewall.

    Example Usage

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var example = Output.Create(Azure.Network.GetFirewall.InvokeAsync(new Azure.Network.GetFirewallArgs
            {
                Name = "firewall1",
                ResourceGroupName = "firewall-RG",
            }));
            this.FirewallPrivateIp = example.Apply(example => example.IpConfigurations?[0]?.PrivateIpAddress);
        }
    
        [Output("firewallPrivateIp")]
        public Output<string> FirewallPrivateIp { get; set; }
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/network"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := network.LookupFirewall(ctx, &network.LookupFirewallArgs{
    			Name:              "firewall1",
    			ResourceGroupName: "firewall-RG",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firewallPrivateIp", example.IpConfigurations[0].PrivateIpAddress)
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.network.getFirewall({
        name: "firewall1",
        resourceGroupName: "firewall-RG",
    });
    export const firewallPrivateIp = example.then(example => example.ipConfigurations?[0]?.privateIpAddress);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.network.get_firewall(name="firewall1",
        resource_group_name="firewall-RG")
    pulumi.export("firewallPrivateIp", example.ip_configurations[0].private_ip_address)
    

    Example coming soon!

    Using getFirewall

    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 getFirewall(args: GetFirewallArgs, opts?: InvokeOptions): Promise<GetFirewallResult>
    function getFirewallOutput(args: GetFirewallOutputArgs, opts?: InvokeOptions): Output<GetFirewallResult>
    def get_firewall(name: Optional[str] = None,
                     resource_group_name: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetFirewallResult
    def get_firewall_output(name: Optional[pulumi.Input[str]] = None,
                     resource_group_name: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetFirewallResult]
    func LookupFirewall(ctx *Context, args *LookupFirewallArgs, opts ...InvokeOption) (*LookupFirewallResult, error)
    func LookupFirewallOutput(ctx *Context, args *LookupFirewallOutputArgs, opts ...InvokeOption) LookupFirewallResultOutput

    > Note: This function is named LookupFirewall in the Go SDK.

    public static class GetFirewall 
    {
        public static Task<GetFirewallResult> InvokeAsync(GetFirewallArgs args, InvokeOptions? opts = null)
        public static Output<GetFirewallResult> Invoke(GetFirewallInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetFirewallResult> getFirewall(GetFirewallArgs args, InvokeOptions options)
    public static Output<GetFirewallResult> getFirewall(GetFirewallArgs args, InvokeOptions options)
    
    fn::invoke:
      function: azure:network/getFirewall:getFirewall
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the Azure Firewall.
    ResourceGroupName string
    The name of the Resource Group in which the Azure Firewall exists.
    Name string
    The name of the Azure Firewall.
    ResourceGroupName string
    The name of the Resource Group in which the Azure Firewall exists.
    name String
    The name of the Azure Firewall.
    resourceGroupName String
    The name of the Resource Group in which the Azure Firewall exists.
    name string
    The name of the Azure Firewall.
    resourceGroupName string
    The name of the Resource Group in which the Azure Firewall exists.
    name str
    The name of the Azure Firewall.
    resource_group_name str
    The name of the Resource Group in which the Azure Firewall exists.
    name String
    The name of the Azure Firewall.
    resourceGroupName String
    The name of the Resource Group in which the Azure Firewall exists.

    getFirewall Result

    The following output properties are available:

    DnsServers List<string>
    The list of DNS servers that the Azure Firewall will direct DNS traffic to the for name resolution.
    FirewallPolicyId string
    The ID of the Firewall Policy applied to the Azure Firewall.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpConfigurations List<GetFirewallIpConfiguration>
    A ip_configuration block as defined below.
    Location string
    The Azure location where the Azure Firewall exists.
    ManagementIpConfigurations List<GetFirewallManagementIpConfiguration>
    A management_ip_configuration block as defined below, which allows force-tunnelling of traffic to be performed by the firewall.
    Name string
    ResourceGroupName string
    SkuName string
    The sku name of the Azure Firewall.
    SkuTier string
    The sku tier of the Azure Firewall.
    Tags Dictionary<string, string>
    A mapping of tags assigned to the Azure Firewall.
    ThreatIntelMode string
    The operation mode for threat intelligence-based filtering.
    VirtualHubs List<GetFirewallVirtualHub>
    A virtual_hub block as defined below.
    Zones List<string>
    The availability zones in which the Azure Firewall is created.
    DnsServers []string
    The list of DNS servers that the Azure Firewall will direct DNS traffic to the for name resolution.
    FirewallPolicyId string
    The ID of the Firewall Policy applied to the Azure Firewall.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpConfigurations []GetFirewallIpConfiguration
    A ip_configuration block as defined below.
    Location string
    The Azure location where the Azure Firewall exists.
    ManagementIpConfigurations []GetFirewallManagementIpConfiguration
    A management_ip_configuration block as defined below, which allows force-tunnelling of traffic to be performed by the firewall.
    Name string
    ResourceGroupName string
    SkuName string
    The sku name of the Azure Firewall.
    SkuTier string
    The sku tier of the Azure Firewall.
    Tags map[string]string
    A mapping of tags assigned to the Azure Firewall.
    ThreatIntelMode string
    The operation mode for threat intelligence-based filtering.
    VirtualHubs []GetFirewallVirtualHub
    A virtual_hub block as defined below.
    Zones []string
    The availability zones in which the Azure Firewall is created.
    dnsServers List<String>
    The list of DNS servers that the Azure Firewall will direct DNS traffic to the for name resolution.
    firewallPolicyId String
    The ID of the Firewall Policy applied to the Azure Firewall.
    id String
    The provider-assigned unique ID for this managed resource.
    ipConfigurations List<GetFirewallIpConfiguration>
    A ip_configuration block as defined below.
    location String
    The Azure location where the Azure Firewall exists.
    managementIpConfigurations List<GetFirewallManagementIpConfiguration>
    A management_ip_configuration block as defined below, which allows force-tunnelling of traffic to be performed by the firewall.
    name String
    resourceGroupName String
    skuName String
    The sku name of the Azure Firewall.
    skuTier String
    The sku tier of the Azure Firewall.
    tags Map<String,String>
    A mapping of tags assigned to the Azure Firewall.
    threatIntelMode String
    The operation mode for threat intelligence-based filtering.
    virtualHubs List<GetFirewallVirtualHub>
    A virtual_hub block as defined below.
    zones List<String>
    The availability zones in which the Azure Firewall is created.
    dnsServers string[]
    The list of DNS servers that the Azure Firewall will direct DNS traffic to the for name resolution.
    firewallPolicyId string
    The ID of the Firewall Policy applied to the Azure Firewall.
    id string
    The provider-assigned unique ID for this managed resource.
    ipConfigurations GetFirewallIpConfiguration[]
    A ip_configuration block as defined below.
    location string
    The Azure location where the Azure Firewall exists.
    managementIpConfigurations GetFirewallManagementIpConfiguration[]
    A management_ip_configuration block as defined below, which allows force-tunnelling of traffic to be performed by the firewall.
    name string
    resourceGroupName string
    skuName string
    The sku name of the Azure Firewall.
    skuTier string
    The sku tier of the Azure Firewall.
    tags {[key: string]: string}
    A mapping of tags assigned to the Azure Firewall.
    threatIntelMode string
    The operation mode for threat intelligence-based filtering.
    virtualHubs GetFirewallVirtualHub[]
    A virtual_hub block as defined below.
    zones string[]
    The availability zones in which the Azure Firewall is created.
    dns_servers Sequence[str]
    The list of DNS servers that the Azure Firewall will direct DNS traffic to the for name resolution.
    firewall_policy_id str
    The ID of the Firewall Policy applied to the Azure Firewall.
    id str
    The provider-assigned unique ID for this managed resource.
    ip_configurations Sequence[GetFirewallIpConfiguration]
    A ip_configuration block as defined below.
    location str
    The Azure location where the Azure Firewall exists.
    management_ip_configurations Sequence[GetFirewallManagementIpConfiguration]
    A management_ip_configuration block as defined below, which allows force-tunnelling of traffic to be performed by the firewall.
    name str
    resource_group_name str
    sku_name str
    The sku name of the Azure Firewall.
    sku_tier str
    The sku tier of the Azure Firewall.
    tags Mapping[str, str]
    A mapping of tags assigned to the Azure Firewall.
    threat_intel_mode str
    The operation mode for threat intelligence-based filtering.
    virtual_hubs Sequence[GetFirewallVirtualHub]
    A virtual_hub block as defined below.
    zones Sequence[str]
    The availability zones in which the Azure Firewall is created.
    dnsServers List<String>
    The list of DNS servers that the Azure Firewall will direct DNS traffic to the for name resolution.
    firewallPolicyId String
    The ID of the Firewall Policy applied to the Azure Firewall.
    id String
    The provider-assigned unique ID for this managed resource.
    ipConfigurations List<Property Map>
    A ip_configuration block as defined below.
    location String
    The Azure location where the Azure Firewall exists.
    managementIpConfigurations List<Property Map>
    A management_ip_configuration block as defined below, which allows force-tunnelling of traffic to be performed by the firewall.
    name String
    resourceGroupName String
    skuName String
    The sku name of the Azure Firewall.
    skuTier String
    The sku tier of the Azure Firewall.
    tags Map<String>
    A mapping of tags assigned to the Azure Firewall.
    threatIntelMode String
    The operation mode for threat intelligence-based filtering.
    virtualHubs List<Property Map>
    A virtual_hub block as defined below.
    zones List<String>
    The availability zones in which the Azure Firewall is created.

    Supporting Types

    GetFirewallIpConfiguration

    Name string
    The name of the Azure Firewall.
    PrivateIpAddress string
    The private IP address associated with the Azure Firewall.
    PublicIpAddressId string
    SubnetId string
    The ID of the Subnet where the Azure Firewall is deployed.
    Name string
    The name of the Azure Firewall.
    PrivateIpAddress string
    The private IP address associated with the Azure Firewall.
    PublicIpAddressId string
    SubnetId string
    The ID of the Subnet where the Azure Firewall is deployed.
    name String
    The name of the Azure Firewall.
    privateIpAddress String
    The private IP address associated with the Azure Firewall.
    publicIpAddressId String
    subnetId String
    The ID of the Subnet where the Azure Firewall is deployed.
    name string
    The name of the Azure Firewall.
    privateIpAddress string
    The private IP address associated with the Azure Firewall.
    publicIpAddressId string
    subnetId string
    The ID of the Subnet where the Azure Firewall is deployed.
    name str
    The name of the Azure Firewall.
    private_ip_address str
    The private IP address associated with the Azure Firewall.
    public_ip_address_id str
    subnet_id str
    The ID of the Subnet where the Azure Firewall is deployed.
    name String
    The name of the Azure Firewall.
    privateIpAddress String
    The private IP address associated with the Azure Firewall.
    publicIpAddressId String
    subnetId String
    The ID of the Subnet where the Azure Firewall is deployed.

    GetFirewallManagementIpConfiguration

    Name string
    The name of the Azure Firewall.
    PrivateIpAddress string
    The private IP address associated with the Azure Firewall.
    PublicIpAddressId string
    SubnetId string
    The ID of the Subnet where the Azure Firewall is deployed.
    Name string
    The name of the Azure Firewall.
    PrivateIpAddress string
    The private IP address associated with the Azure Firewall.
    PublicIpAddressId string
    SubnetId string
    The ID of the Subnet where the Azure Firewall is deployed.
    name String
    The name of the Azure Firewall.
    privateIpAddress String
    The private IP address associated with the Azure Firewall.
    publicIpAddressId String
    subnetId String
    The ID of the Subnet where the Azure Firewall is deployed.
    name string
    The name of the Azure Firewall.
    privateIpAddress string
    The private IP address associated with the Azure Firewall.
    publicIpAddressId string
    subnetId string
    The ID of the Subnet where the Azure Firewall is deployed.
    name str
    The name of the Azure Firewall.
    private_ip_address str
    The private IP address associated with the Azure Firewall.
    public_ip_address_id str
    subnet_id str
    The ID of the Subnet where the Azure Firewall is deployed.
    name String
    The name of the Azure Firewall.
    privateIpAddress String
    The private IP address associated with the Azure Firewall.
    publicIpAddressId String
    subnetId String
    The ID of the Subnet where the Azure Firewall is deployed.

    GetFirewallVirtualHub

    PrivateIpAddress string
    The private IP address associated with the Azure Firewall.
    PublicIpAddresses List<string>
    The list of public IP addresses associated with the Azure Firewall.
    PublicIpCount int
    The number of public IPs assigned to the Azure Firewall.
    VirtualHubId string
    The ID of the Virtual Hub where the Azure Firewall resides in.
    PrivateIpAddress string
    The private IP address associated with the Azure Firewall.
    PublicIpAddresses []string
    The list of public IP addresses associated with the Azure Firewall.
    PublicIpCount int
    The number of public IPs assigned to the Azure Firewall.
    VirtualHubId string
    The ID of the Virtual Hub where the Azure Firewall resides in.
    privateIpAddress String
    The private IP address associated with the Azure Firewall.
    publicIpAddresses List<String>
    The list of public IP addresses associated with the Azure Firewall.
    publicIpCount Integer
    The number of public IPs assigned to the Azure Firewall.
    virtualHubId String
    The ID of the Virtual Hub where the Azure Firewall resides in.
    privateIpAddress string
    The private IP address associated with the Azure Firewall.
    publicIpAddresses string[]
    The list of public IP addresses associated with the Azure Firewall.
    publicIpCount number
    The number of public IPs assigned to the Azure Firewall.
    virtualHubId string
    The ID of the Virtual Hub where the Azure Firewall resides in.
    private_ip_address str
    The private IP address associated with the Azure Firewall.
    public_ip_addresses Sequence[str]
    The list of public IP addresses associated with the Azure Firewall.
    public_ip_count int
    The number of public IPs assigned to the Azure Firewall.
    virtual_hub_id str
    The ID of the Virtual Hub where the Azure Firewall resides in.
    privateIpAddress String
    The private IP address associated with the Azure Firewall.
    publicIpAddresses List<String>
    The list of public IP addresses associated with the Azure Firewall.
    publicIpCount Number
    The number of public IPs assigned to the Azure Firewall.
    virtualHubId String
    The ID of the Virtual Hub where the Azure Firewall resides in.

    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.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.