get Firewall
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);
Content copied to clipboard
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)
Content copied to clipboard
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),
};
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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.ipConfigurations()[0].privateIpAddress());
}
}
Content copied to clipboard
variables:
example:
fn::invoke:
function: azure:network:getFirewall
arguments:
name: firewall1
resourceGroupName: firewall-RG
outputs:
firewallPrivateIp: ${example.ipConfigurations[0].privateIpAddress}
Content copied to clipboard
API Providers
This data source uses the following Azure API Providers:
Microsoft.Network
: 2024-05-01
Return
A collection of values returned by getFirewall.
Parameters
argument
A collection of arguments for invoking getFirewall.
suspend fun getFirewall(dnsProxyEnabled: Boolean? = null, name: String, resourceGroupName: String): GetFirewallResult
Return
A collection of values returned by getFirewall.
Parameters
dns Proxy Enabled
Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when it is true
.
name
The name of the Azure Firewall.
resource Group Name
The name of the Resource Group in which the Azure Firewall exists.
See also
suspend fun getFirewall(argument: suspend GetFirewallPlainArgsBuilder.() -> Unit): GetFirewallResult
Return
A collection of values returned by getFirewall.
Parameters
argument
Builder for com.pulumi.azure.network.kotlin.inputs.GetFirewallPlainArgs.