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

We recommend using Azure Native.

Azure Classic v5.84.0 published on Tuesday, Jul 16, 2024 by Pulumi

azure.network.getFirewall

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.84.0 published on Tuesday, Jul 16, 2024 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);
    
    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/v5/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)
    // Output-based functions aren't available in Java yet
    
    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.
    DnsProxyEnabled bool
    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.
    ResourceGroupName 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 String
    The name of the Azure Firewall.
    resourceGroupName 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 string
    The name of the Azure Firewall.
    resourceGroupName 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 str
    The name of the Azure Firewall.
    resource_group_name 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 String
    The name of the Azure Firewall.
    resourceGroupName 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 string
    The name of the Azure Firewall.
    PrivateIpAddress string
    The private IP address associated with the Azure Firewall.
    PublicIpAddressId string
    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.
    PrivateIpAddress string
    The private IP address associated with the Azure Firewall.
    PublicIpAddressId string
    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.
    privateIpAddress String
    The private IP address associated with the Azure Firewall.
    publicIpAddressId String
    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.
    privateIpAddress string
    The private IP address associated with the Azure Firewall.
    publicIpAddressId string
    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_address str
    The private IP address associated with the Azure Firewall.
    public_ip_address_id str
    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.
    privateIpAddress String
    The private IP address associated with the Azure Firewall.
    publicIpAddressId String
    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.
    PrivateIpAddress string
    The private IP address associated with the Azure Firewall.
    PublicIpAddressId string
    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.
    PrivateIpAddress string
    The private IP address associated with the Azure Firewall.
    PublicIpAddressId string
    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.
    privateIpAddress String
    The private IP address associated with the Azure Firewall.
    publicIpAddressId String
    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.
    privateIpAddress string
    The private IP address associated with the Azure Firewall.
    publicIpAddressId string
    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_address str
    The private IP address associated with the Azure Firewall.
    public_ip_address_id str
    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.
    privateIpAddress String
    The private IP address associated with the Azure Firewall.
    publicIpAddressId String
    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

    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.

    Azure Classic v5.84.0 published on Tuesday, Jul 16, 2024 by Pulumi