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

We recommend using Azure Native.

Azure Classic v5.67.0 published on Wednesday, Feb 21, 2024 by Pulumi

azure.network.getFirewallPolicy

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.67.0 published on Wednesday, Feb 21, 2024 by Pulumi

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

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.Network.GetFirewallPolicy.Invoke(new()
        {
            Name = "existing",
            ResourceGroupName = "existing",
        });
    
        return new Dictionary<string, object?>
        {
            ["id"] = example.Apply(getFirewallPolicyResult => getFirewallPolicyResult.Id),
        };
    });
    
    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.LookupFirewallPolicy(ctx, &network.LookupFirewallPolicyArgs{
    			Name:              "existing",
    			ResourceGroupName: "existing",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("id", example.Id)
    		return nil
    	})
    }
    
    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.GetFirewallPolicyArgs;
    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.getFirewallPolicy(GetFirewallPolicyArgs.builder()
                .name("existing")
                .resourceGroupName("existing")
                .build());
    
            ctx.export("id", example.applyValue(getFirewallPolicyResult -> getFirewallPolicyResult.id()));
        }
    }
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.network.get_firewall_policy(name="existing",
        resource_group_name="existing")
    pulumi.export("id", example.id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.network.getFirewallPolicy({
        name: "existing",
        resourceGroupName: "existing",
    });
    export const id = example.then(example => example.id);
    
    variables:
      example:
        fn::invoke:
          Function: azure:network:getFirewallPolicy
          Arguments:
            name: existing
            resourceGroupName: existing
    outputs:
      id: ${example.id}
    

    Using getFirewallPolicy

    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 getFirewallPolicy(args: GetFirewallPolicyArgs, opts?: InvokeOptions): Promise<GetFirewallPolicyResult>
    function getFirewallPolicyOutput(args: GetFirewallPolicyOutputArgs, opts?: InvokeOptions): Output<GetFirewallPolicyResult>
    def get_firewall_policy(name: Optional[str] = None,
                            resource_group_name: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetFirewallPolicyResult
    def get_firewall_policy_output(name: Optional[pulumi.Input[str]] = None,
                            resource_group_name: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetFirewallPolicyResult]
    func LookupFirewallPolicy(ctx *Context, args *LookupFirewallPolicyArgs, opts ...InvokeOption) (*LookupFirewallPolicyResult, error)
    func LookupFirewallPolicyOutput(ctx *Context, args *LookupFirewallPolicyOutputArgs, opts ...InvokeOption) LookupFirewallPolicyResultOutput

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

    public static class GetFirewallPolicy 
    {
        public static Task<GetFirewallPolicyResult> InvokeAsync(GetFirewallPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetFirewallPolicyResult> Invoke(GetFirewallPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetFirewallPolicyResult> getFirewallPolicy(GetFirewallPolicyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:network/getFirewallPolicy:getFirewallPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of this Firewall Policy.
    ResourceGroupName string
    The name of the Resource Group where the Firewall Policy exists.
    Name string
    The name of this Firewall Policy.
    ResourceGroupName string
    The name of the Resource Group where the Firewall Policy exists.
    name String
    The name of this Firewall Policy.
    resourceGroupName String
    The name of the Resource Group where the Firewall Policy exists.
    name string
    The name of this Firewall Policy.
    resourceGroupName string
    The name of the Resource Group where the Firewall Policy exists.
    name str
    The name of this Firewall Policy.
    resource_group_name str
    The name of the Resource Group where the Firewall Policy exists.
    name String
    The name of this Firewall Policy.
    resourceGroupName String
    The name of the Resource Group where the Firewall Policy exists.

    getFirewallPolicy Result

    The following output properties are available:

    BasePolicyId string
    ChildPolicies List<string>
    Dns List<GetFirewallPolicyDn>
    Firewalls List<string>
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    Name string
    ResourceGroupName string
    RuleCollectionGroups List<string>
    Tags Dictionary<string, string>
    A mapping of tags assigned to the Firewall Policy.
    ThreatIntelligenceAllowlists List<GetFirewallPolicyThreatIntelligenceAllowlist>
    ThreatIntelligenceMode string
    BasePolicyId string
    ChildPolicies []string
    Dns []GetFirewallPolicyDn
    Firewalls []string
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    Name string
    ResourceGroupName string
    RuleCollectionGroups []string
    Tags map[string]string
    A mapping of tags assigned to the Firewall Policy.
    ThreatIntelligenceAllowlists []GetFirewallPolicyThreatIntelligenceAllowlist
    ThreatIntelligenceMode string
    basePolicyId String
    childPolicies List<String>
    dns List<GetFirewallPolicyDn>
    firewalls List<String>
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    name String
    resourceGroupName String
    ruleCollectionGroups List<String>
    tags Map<String,String>
    A mapping of tags assigned to the Firewall Policy.
    threatIntelligenceAllowlists List<GetFirewallPolicyThreatIntelligenceAllowlist>
    threatIntelligenceMode String
    basePolicyId string
    childPolicies string[]
    dns GetFirewallPolicyDn[]
    firewalls string[]
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    name string
    resourceGroupName string
    ruleCollectionGroups string[]
    tags {[key: string]: string}
    A mapping of tags assigned to the Firewall Policy.
    threatIntelligenceAllowlists GetFirewallPolicyThreatIntelligenceAllowlist[]
    threatIntelligenceMode string
    base_policy_id str
    child_policies Sequence[str]
    dns Sequence[GetFirewallPolicyDn]
    firewalls Sequence[str]
    id str
    The provider-assigned unique ID for this managed resource.
    location str
    name str
    resource_group_name str
    rule_collection_groups Sequence[str]
    tags Mapping[str, str]
    A mapping of tags assigned to the Firewall Policy.
    threat_intelligence_allowlists Sequence[GetFirewallPolicyThreatIntelligenceAllowlist]
    threat_intelligence_mode str
    basePolicyId String
    childPolicies List<String>
    dns List<Property Map>
    firewalls List<String>
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    name String
    resourceGroupName String
    ruleCollectionGroups List<String>
    tags Map<String>
    A mapping of tags assigned to the Firewall Policy.
    threatIntelligenceAllowlists List<Property Map>
    threatIntelligenceMode String

    Supporting Types

    GetFirewallPolicyDn

    networkRuleFqdnEnabled Boolean
    proxyEnabled Boolean
    servers List<String>
    networkRuleFqdnEnabled Boolean
    proxyEnabled Boolean
    servers List<String>

    GetFirewallPolicyThreatIntelligenceAllowlist

    Fqdns List<string>
    IpAddresses List<string>
    Fqdns []string
    IpAddresses []string
    fqdns List<String>
    ipAddresses List<String>
    fqdns string[]
    ipAddresses string[]
    fqdns Sequence[str]
    ip_addresses Sequence[str]
    fqdns List<String>
    ipAddresses List<String>

    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.67.0 published on Wednesday, Feb 21, 2024 by Pulumi