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

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.network.getFirewall

Explore with Pulumi AI

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

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);
Copy
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)
Copy
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
	})
}
Copy
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),
    };
});
Copy
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()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: azure:network:getFirewall
      arguments:
        name: firewall1
        resourceGroupName: firewall-RG
outputs:
  firewallPrivateIp: ${example.ipConfigurations[0].privateIpAddress}
Copy

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>
Copy
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]
Copy
func LookupFirewall(ctx *Context, args *LookupFirewallArgs, opts ...InvokeOption) (*LookupFirewallResult, error)
func LookupFirewallOutput(ctx *Context, args *LookupFirewallOutputArgs, opts ...InvokeOption) LookupFirewallResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetFirewallResult> getFirewall(GetFirewallArgs args, InvokeOptions options)
public static Output<GetFirewallResult> getFirewall(GetFirewallArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure:network/getFirewall:getFirewall
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
The name of the Azure Firewall.
ResourceGroupName This property is required. string
The name of the Resource Group in which the Azure Firewall exists.
DnsProxyEnabled bool
Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when it is true.
Name This property is required. string
The name of the Azure Firewall.
ResourceGroupName This property is required. string
The name of the Resource Group in which the Azure Firewall exists.
DnsProxyEnabled bool
Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when it is true.
name This property is required. String
The name of the Azure Firewall.
resourceGroupName This property is required. String
The name of the Resource Group in which the Azure Firewall exists.
dnsProxyEnabled Boolean
Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when it is true.
name This property is required. string
The name of the Azure Firewall.
resourceGroupName This property is required. string
The name of the Resource Group in which the Azure Firewall exists.
dnsProxyEnabled boolean
Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when it is true.
name This property is required. str
The name of the Azure Firewall.
resource_group_name This property is required. str
The name of the Resource Group in which the Azure Firewall exists.
dns_proxy_enabled bool
Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when it is true.
name This property is required. String
The name of the Azure Firewall.
resourceGroupName This property is required. String
The name of the Resource Group in which the Azure Firewall exists.
dnsProxyEnabled Boolean
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:

DnsProxyEnabled bool
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.
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>
A list of Availability Zones in which this Azure Firewall is located.
DnsProxyEnabled bool
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.
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
A list of Availability Zones in which this Azure Firewall is located.
dnsProxyEnabled Boolean
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.
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>
A list of Availability Zones in which this Azure Firewall is located.
dnsProxyEnabled boolean
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.
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[]
A list of Availability Zones in which this Azure Firewall is located.
dns_proxy_enabled bool
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_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]
A list of Availability Zones in which this Azure Firewall is located.
dnsProxyEnabled Boolean
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.
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>
A list of Availability Zones in which this Azure Firewall is located.

Supporting Types

GetFirewallIpConfiguration

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

GetFirewallManagementIpConfiguration

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

GetFirewallVirtualHub

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

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi