We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.network.getFirewall
Explore with Pulumi AI
Use this data source to access information about an existing Azure Firewall.
Example Usage
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)
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.LookupFirewall(ctx, &network.LookupFirewallArgs{
			Name:              "firewall1",
			ResourceGroupName: "firewall-RG",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firewallPrivateIp", example.IpConfigurations[0].PrivateIpAddress)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = Azure.Network.GetFirewall.Invoke(new()
    {
        Name = "firewall1",
        ResourceGroupName = "firewall-RG",
    });
    return new Dictionary<string, object?>
    {
        ["firewallPrivateIp"] = example.Apply(getFirewallResult => getFirewallResult.IpConfigurations[0]?.PrivateIpAddress),
    };
});
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.GetFirewallArgs;
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.getFirewall(GetFirewallArgs.builder()
            .name("firewall1")
            .resourceGroupName("firewall-RG")
            .build());
        ctx.export("firewallPrivateIp", example.applyValue(getFirewallResult -> getFirewallResult.ipConfigurations()[0].privateIpAddress()));
    }
}
variables:
  example:
    fn::invoke:
      function: azure:network:getFirewall
      arguments:
        name: firewall1
        resourceGroupName: firewall-RG
outputs:
  firewallPrivateIp: ${example.ipConfigurations[0].privateIpAddress}
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(dns_proxy_enabled: Optional[bool] = None,
                 name: Optional[str] = None,
                 resource_group_name: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetFirewallResult
def get_firewall_output(dns_proxy_enabled: Optional[pulumi.Input[bool]] = None,
                 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 dictionaryThe following arguments are supported:
- Name string
- The name of the Azure Firewall.
- ResourceGroup stringName 
- The name of the Resource Group in which the Azure Firewall exists.
- DnsProxy boolEnabled 
- Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when it is true.
- Name string
- The name of the Azure Firewall.
- ResourceGroup stringName 
- The name of the Resource Group in which the Azure Firewall exists.
- DnsProxy boolEnabled 
- Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when it is true.
- name String
- The name of the Azure Firewall.
- resourceGroup StringName 
- The name of the Resource Group in which the Azure Firewall exists.
- dnsProxy BooleanEnabled 
- Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when it is true.
- name string
- The name of the Azure Firewall.
- resourceGroup stringName 
- The name of the Resource Group in which the Azure Firewall exists.
- dnsProxy booleanEnabled 
- Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when it is true.
- name str
- The name of the Azure Firewall.
- resource_group_ strname 
- The name of the Resource Group in which the Azure Firewall exists.
- dns_proxy_ boolenabled 
- Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when it is true.
- name String
- The name of the Azure Firewall.
- resourceGroup StringName 
- The name of the Resource Group in which the Azure Firewall exists.
- dnsProxy BooleanEnabled 
- Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when it is true.
getFirewall Result
The following output properties are available:
- DnsProxy boolEnabled 
- Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when it is true.
- DnsServers List<string>
- The list of DNS servers that the Azure Firewall will direct DNS traffic to for name resolution.
- FirewallPolicy stringId 
- The ID of the Firewall Policy applied to the Azure Firewall.
- Id string
- The provider-assigned unique ID for this managed resource.
- IpConfigurations List<GetFirewall Ip Configuration> 
- A ip_configurationblock as defined below.
- Location string
- The Azure location where the Azure Firewall exists.
- ManagementIp List<GetConfigurations Firewall Management Ip Configuration> 
- A management_ip_configurationblock as defined below, which allows force-tunnelling of traffic to be performed by the firewall.
- Name string
- ResourceGroup stringName 
- SkuName string
- The SKU name of the Azure Firewall.
- SkuTier string
- The SKU tier of the Azure Firewall.
- Dictionary<string, string>
- A mapping of tags assigned to the Azure Firewall.
- ThreatIntel stringMode 
- The operation mode for threat intelligence-based filtering.
- VirtualHubs List<GetFirewall Virtual Hub> 
- A virtual_hubblock as defined below.
- Zones List<string>
- A list of Availability Zones in which this Azure Firewall is located.
- DnsProxy boolEnabled 
- Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when it is true.
- DnsServers []string
- The list of DNS servers that the Azure Firewall will direct DNS traffic to for name resolution.
- FirewallPolicy stringId 
- The ID of the Firewall Policy applied to the Azure Firewall.
- Id string
- The provider-assigned unique ID for this managed resource.
- IpConfigurations []GetFirewall Ip Configuration 
- A ip_configurationblock as defined below.
- Location string
- The Azure location where the Azure Firewall exists.
- ManagementIp []GetConfigurations Firewall Management Ip Configuration 
- A management_ip_configurationblock as defined below, which allows force-tunnelling of traffic to be performed by the firewall.
- Name string
- ResourceGroup stringName 
- SkuName string
- The SKU name of the Azure Firewall.
- SkuTier string
- The SKU tier of the Azure Firewall.
- map[string]string
- A mapping of tags assigned to the Azure Firewall.
- ThreatIntel stringMode 
- The operation mode for threat intelligence-based filtering.
- VirtualHubs []GetFirewall Virtual Hub 
- A virtual_hubblock as defined below.
- Zones []string
- A list of Availability Zones in which this Azure Firewall is located.
- dnsProxy BooleanEnabled 
- Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when it is true.
- dnsServers List<String>
- The list of DNS servers that the Azure Firewall will direct DNS traffic to for name resolution.
- firewallPolicy StringId 
- The ID of the Firewall Policy applied to the Azure Firewall.
- id String
- The provider-assigned unique ID for this managed resource.
- ipConfigurations List<GetFirewall Ip Configuration> 
- A ip_configurationblock as defined below.
- location String
- The Azure location where the Azure Firewall exists.
- managementIp List<GetConfigurations Firewall Management Ip Configuration> 
- A management_ip_configurationblock as defined below, which allows force-tunnelling of traffic to be performed by the firewall.
- name String
- resourceGroup StringName 
- skuName String
- The SKU name of the Azure Firewall.
- skuTier String
- The SKU tier of the Azure Firewall.
- Map<String,String>
- A mapping of tags assigned to the Azure Firewall.
- threatIntel StringMode 
- The operation mode for threat intelligence-based filtering.
- virtualHubs List<GetFirewall Virtual Hub> 
- A virtual_hubblock as defined below.
- zones List<String>
- A list of Availability Zones in which this Azure Firewall is located.
- dnsProxy booleanEnabled 
- Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when it is true.
- dnsServers string[]
- The list of DNS servers that the Azure Firewall will direct DNS traffic to for name resolution.
- firewallPolicy stringId 
- The ID of the Firewall Policy applied to the Azure Firewall.
- id string
- The provider-assigned unique ID for this managed resource.
- ipConfigurations GetFirewall Ip Configuration[] 
- A ip_configurationblock as defined below.
- location string
- The Azure location where the Azure Firewall exists.
- managementIp GetConfigurations Firewall Management Ip Configuration[] 
- A management_ip_configurationblock as defined below, which allows force-tunnelling of traffic to be performed by the firewall.
- name string
- resourceGroup stringName 
- skuName string
- The SKU name of the Azure Firewall.
- skuTier string
- The SKU tier of the Azure Firewall.
- {[key: string]: string}
- A mapping of tags assigned to the Azure Firewall.
- threatIntel stringMode 
- The operation mode for threat intelligence-based filtering.
- virtualHubs GetFirewall Virtual Hub[] 
- A virtual_hubblock as defined below.
- zones string[]
- A list of Availability Zones in which this Azure Firewall is located.
- dns_proxy_ boolenabled 
- Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when it is true.
- dns_servers Sequence[str]
- The list of DNS servers that the Azure Firewall will direct DNS traffic to for name resolution.
- firewall_policy_ strid 
- 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[GetFirewall Ip Configuration] 
- A ip_configurationblock as defined below.
- location str
- The Azure location where the Azure Firewall exists.
- management_ip_ Sequence[Getconfigurations Firewall Management Ip Configuration] 
- A management_ip_configurationblock as defined below, which allows force-tunnelling of traffic to be performed by the firewall.
- name str
- resource_group_ strname 
- sku_name str
- The SKU name of the Azure Firewall.
- sku_tier str
- The SKU tier of the Azure Firewall.
- Mapping[str, str]
- A mapping of tags assigned to the Azure Firewall.
- threat_intel_ strmode 
- The operation mode for threat intelligence-based filtering.
- virtual_hubs Sequence[GetFirewall Virtual Hub] 
- A virtual_hubblock as defined below.
- zones Sequence[str]
- A list of Availability Zones in which this Azure Firewall is located.
- dnsProxy BooleanEnabled 
- Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when it is true.
- dnsServers List<String>
- The list of DNS servers that the Azure Firewall will direct DNS traffic to for name resolution.
- firewallPolicy StringId 
- 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_configurationblock as defined below.
- location String
- The Azure location where the Azure Firewall exists.
- managementIp List<Property Map>Configurations 
- A management_ip_configurationblock as defined below, which allows force-tunnelling of traffic to be performed by the firewall.
- name String
- resourceGroup StringName 
- skuName String
- The SKU name of the Azure Firewall.
- skuTier String
- The SKU tier of the Azure Firewall.
- Map<String>
- A mapping of tags assigned to the Azure Firewall.
- threatIntel StringMode 
- The operation mode for threat intelligence-based filtering.
- virtualHubs List<Property Map>
- A virtual_hubblock as defined below.
- zones List<String>
- A list of Availability Zones in which this Azure Firewall is located.
Supporting Types
GetFirewallIpConfiguration   
- Name string
- The name of the Azure Firewall.
- PrivateIp stringAddress 
- The private IP address associated with the Azure Firewall.
- PublicIp stringAddress Id 
- The ID of the Public IP address of the Azure Firewall.
- SubnetId string
- The ID of the Subnet where the Azure Firewall is deployed.
- Name string
- The name of the Azure Firewall.
- PrivateIp stringAddress 
- The private IP address associated with the Azure Firewall.
- PublicIp stringAddress Id 
- The ID of the Public IP address of the Azure Firewall.
- SubnetId string
- The ID of the Subnet where the Azure Firewall is deployed.
- name String
- The name of the Azure Firewall.
- privateIp StringAddress 
- The private IP address associated with the Azure Firewall.
- publicIp StringAddress Id 
- The ID of the Public IP address of the Azure Firewall.
- subnetId String
- The ID of the Subnet where the Azure Firewall is deployed.
- name string
- The name of the Azure Firewall.
- privateIp stringAddress 
- The private IP address associated with the Azure Firewall.
- publicIp stringAddress Id 
- The ID of the Public IP address of the Azure Firewall.
- subnetId string
- The ID of the Subnet where the Azure Firewall is deployed.
- name str
- The name of the Azure Firewall.
- private_ip_ straddress 
- The private IP address associated with the Azure Firewall.
- public_ip_ straddress_ id 
- The ID of the Public IP address of the Azure Firewall.
- subnet_id str
- The ID of the Subnet where the Azure Firewall is deployed.
- name String
- The name of the Azure Firewall.
- privateIp StringAddress 
- The private IP address associated with the Azure Firewall.
- publicIp StringAddress Id 
- The ID of the Public IP address of the Azure Firewall.
- subnetId String
- The ID of the Subnet where the Azure Firewall is deployed.
GetFirewallManagementIpConfiguration    
- Name string
- The name of the Azure Firewall.
- PrivateIp stringAddress 
- The private IP address associated with the Azure Firewall.
- PublicIp stringAddress Id 
- The ID of the Public IP address of the Azure Firewall.
- SubnetId string
- The ID of the Subnet where the Azure Firewall is deployed.
- Name string
- The name of the Azure Firewall.
- PrivateIp stringAddress 
- The private IP address associated with the Azure Firewall.
- PublicIp stringAddress Id 
- The ID of the Public IP address of the Azure Firewall.
- SubnetId string
- The ID of the Subnet where the Azure Firewall is deployed.
- name String
- The name of the Azure Firewall.
- privateIp StringAddress 
- The private IP address associated with the Azure Firewall.
- publicIp StringAddress Id 
- The ID of the Public IP address of the Azure Firewall.
- subnetId String
- The ID of the Subnet where the Azure Firewall is deployed.
- name string
- The name of the Azure Firewall.
- privateIp stringAddress 
- The private IP address associated with the Azure Firewall.
- publicIp stringAddress Id 
- The ID of the Public IP address of the Azure Firewall.
- subnetId string
- The ID of the Subnet where the Azure Firewall is deployed.
- name str
- The name of the Azure Firewall.
- private_ip_ straddress 
- The private IP address associated with the Azure Firewall.
- public_ip_ straddress_ id 
- The ID of the Public IP address of the Azure Firewall.
- subnet_id str
- The ID of the Subnet where the Azure Firewall is deployed.
- name String
- The name of the Azure Firewall.
- privateIp StringAddress 
- The private IP address associated with the Azure Firewall.
- publicIp StringAddress Id 
- The ID of the Public IP address of the Azure Firewall.
- subnetId String
- The ID of the Subnet where the Azure Firewall is deployed.
GetFirewallVirtualHub   
- PrivateIp stringAddress 
- The private IP address associated with the Azure Firewall.
- PublicIp List<string>Addresses 
- The list of public IP addresses associated with the Azure Firewall.
- PublicIp intCount 
- The number of public IPs assigned to the Azure Firewall.
- VirtualHub stringId 
- The ID of the Virtual Hub where the Azure Firewall resides in.
- PrivateIp stringAddress 
- The private IP address associated with the Azure Firewall.
- PublicIp []stringAddresses 
- The list of public IP addresses associated with the Azure Firewall.
- PublicIp intCount 
- The number of public IPs assigned to the Azure Firewall.
- VirtualHub stringId 
- The ID of the Virtual Hub where the Azure Firewall resides in.
- privateIp StringAddress 
- The private IP address associated with the Azure Firewall.
- publicIp List<String>Addresses 
- The list of public IP addresses associated with the Azure Firewall.
- publicIp IntegerCount 
- The number of public IPs assigned to the Azure Firewall.
- virtualHub StringId 
- The ID of the Virtual Hub where the Azure Firewall resides in.
- privateIp stringAddress 
- The private IP address associated with the Azure Firewall.
- publicIp string[]Addresses 
- The list of public IP addresses associated with the Azure Firewall.
- publicIp numberCount 
- The number of public IPs assigned to the Azure Firewall.
- virtualHub stringId 
- The ID of the Virtual Hub where the Azure Firewall resides in.
- private_ip_ straddress 
- The private IP address associated with the Azure Firewall.
- public_ip_ Sequence[str]addresses 
- The list of public IP addresses associated with the Azure Firewall.
- public_ip_ intcount 
- The number of public IPs assigned to the Azure Firewall.
- virtual_hub_ strid 
- The ID of the Virtual Hub where the Azure Firewall resides in.
- privateIp StringAddress 
- The private IP address associated with the Azure Firewall.
- publicIp List<String>Addresses 
- The list of public IP addresses associated with the Azure Firewall.
- publicIp NumberCount 
- The number of public IPs assigned to the Azure Firewall.
- virtualHub StringId 
- 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 azurermTerraform Provider.