1. Packages
  2. Packages
  3. Azure Classic
  4. API Docs
  5. cdn
  6. getFrontdoorSecurityPolicy

We recommend using Azure Native.

Viewing docs for Azure v6.37.0
published on Friday, May 22, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v6.37.0
published on Friday, May 22, 2026 by Pulumi

    Gets information about an existing Front Door (standard/premium) Security Policy.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("example", {
        name: "example-cdn-frontdoor",
        location: "West Europe",
    });
    const exampleFrontdoorProfile = new azure.cdn.FrontdoorProfile("example", {
        name: "example-frontdoor-profile",
        resourceGroupName: exampleResourceGroup.name,
        skuName: "Standard_AzureFrontDoor",
    });
    const exampleFrontdoorFirewallPolicy = new azure.cdn.FrontdoorFirewallPolicy("example", {
        name: "examplecdnfrontdoorfirewallpolicy",
        resourceGroupName: exampleResourceGroup.name,
        skuName: exampleFrontdoorProfile.skuName,
        enabled: true,
        mode: "Prevention",
        redirectUrl: "https://www.example.com",
        customRules: [{
            name: "Rule1",
            enabled: true,
            priority: 1,
            rateLimitDurationInMinutes: 1,
            rateLimitThreshold: 10,
            type: "MatchRule",
            action: "Block",
            matchConditions: [{
                matchVariable: "RemoteAddr",
                operator: "IPMatch",
                negationCondition: false,
                matchValues: ["192.168.1.0/24"],
            }],
        }],
    });
    const exampleZone = new azure.dns.Zone("example", {
        name: "example-frontdoor.com",
        resourceGroupName: exampleResourceGroup.name,
    });
    const exampleFrontdoorCustomDomain = new azure.cdn.FrontdoorCustomDomain("example", {
        name: "example-custom-domain",
        cdnFrontdoorProfileId: exampleFrontdoorProfile.id,
        dnsZoneId: exampleZone.id,
        hostName: "www.example-frontdoor.com",
        tls: {
            certificateType: "ManagedCertificate",
            minimumTlsVersion: "TLS12",
        },
    });
    const exampleFrontdoorSecurityPolicy = new azure.cdn.FrontdoorSecurityPolicy("example", {
        name: "example-security-policy",
        cdnFrontdoorProfileId: exampleFrontdoorProfile.id,
        securityPolicies: {
            firewall: {
                cdnFrontdoorFirewallPolicyId: exampleFrontdoorFirewallPolicy.id,
                association: {
                    domains: [{
                        cdnFrontdoorDomainId: exampleFrontdoorCustomDomain.id,
                    }],
                    patternsToMatch: "/*",
                },
            },
        },
    });
    const example = azure.cdn.getFrontdoorSecurityPolicyOutput({
        name: exampleFrontdoorSecurityPolicy.name,
        profileName: exampleFrontdoorProfile.name,
        resourceGroupName: exampleResourceGroup.name,
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("example",
        name="example-cdn-frontdoor",
        location="West Europe")
    example_frontdoor_profile = azure.cdn.FrontdoorProfile("example",
        name="example-frontdoor-profile",
        resource_group_name=example_resource_group.name,
        sku_name="Standard_AzureFrontDoor")
    example_frontdoor_firewall_policy = azure.cdn.FrontdoorFirewallPolicy("example",
        name="examplecdnfrontdoorfirewallpolicy",
        resource_group_name=example_resource_group.name,
        sku_name=example_frontdoor_profile.sku_name,
        enabled=True,
        mode="Prevention",
        redirect_url="https://www.example.com",
        custom_rules=[{
            "name": "Rule1",
            "enabled": True,
            "priority": 1,
            "rate_limit_duration_in_minutes": 1,
            "rate_limit_threshold": 10,
            "type": "MatchRule",
            "action": "Block",
            "match_conditions": [{
                "match_variable": "RemoteAddr",
                "operator": "IPMatch",
                "negation_condition": False,
                "match_values": ["192.168.1.0/24"],
            }],
        }])
    example_zone = azure.dns.Zone("example",
        name="example-frontdoor.com",
        resource_group_name=example_resource_group.name)
    example_frontdoor_custom_domain = azure.cdn.FrontdoorCustomDomain("example",
        name="example-custom-domain",
        cdn_frontdoor_profile_id=example_frontdoor_profile.id,
        dns_zone_id=example_zone.id,
        host_name="www.example-frontdoor.com",
        tls={
            "certificate_type": "ManagedCertificate",
            "minimum_tls_version": "TLS12",
        })
    example_frontdoor_security_policy = azure.cdn.FrontdoorSecurityPolicy("example",
        name="example-security-policy",
        cdn_frontdoor_profile_id=example_frontdoor_profile.id,
        security_policies={
            "firewall": {
                "cdn_frontdoor_firewall_policy_id": example_frontdoor_firewall_policy.id,
                "association": {
                    "domains": [{
                        "cdn_frontdoor_domain_id": example_frontdoor_custom_domain.id,
                    }],
                    "patterns_to_match": "/*",
                },
            },
        })
    example = azure.cdn.get_frontdoor_security_policy_output(name=example_frontdoor_security_policy.name,
        profile_name=example_frontdoor_profile.name,
        resource_group_name=example_resource_group.name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/cdn"
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dns"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-cdn-frontdoor"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleFrontdoorProfile, err := cdn.NewFrontdoorProfile(ctx, "example", &cdn.FrontdoorProfileArgs{
    			Name:              pulumi.String("example-frontdoor-profile"),
    			ResourceGroupName: exampleResourceGroup.Name,
    			SkuName:           pulumi.String("Standard_AzureFrontDoor"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleFrontdoorFirewallPolicy, err := cdn.NewFrontdoorFirewallPolicy(ctx, "example", &cdn.FrontdoorFirewallPolicyArgs{
    			Name:              pulumi.String("examplecdnfrontdoorfirewallpolicy"),
    			ResourceGroupName: exampleResourceGroup.Name,
    			SkuName:           exampleFrontdoorProfile.SkuName,
    			Enabled:           pulumi.Bool(true),
    			Mode:              pulumi.String("Prevention"),
    			RedirectUrl:       pulumi.String("https://www.example.com"),
    			CustomRules: cdn.FrontdoorFirewallPolicyCustomRuleArray{
    				&cdn.FrontdoorFirewallPolicyCustomRuleArgs{
    					Name:                       pulumi.String("Rule1"),
    					Enabled:                    pulumi.Bool(true),
    					Priority:                   pulumi.Int(1),
    					RateLimitDurationInMinutes: pulumi.Int(1),
    					RateLimitThreshold:         pulumi.Int(10),
    					Type:                       pulumi.String("MatchRule"),
    					Action:                     pulumi.String("Block"),
    					MatchConditions: cdn.FrontdoorFirewallPolicyCustomRuleMatchConditionArray{
    						&cdn.FrontdoorFirewallPolicyCustomRuleMatchConditionArgs{
    							MatchVariable:     pulumi.String("RemoteAddr"),
    							Operator:          pulumi.String("IPMatch"),
    							NegationCondition: pulumi.Bool(false),
    							MatchValues: pulumi.StringArray{
    								pulumi.String("192.168.1.0/24"),
    							},
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleZone, err := dns.NewZone(ctx, "example", &dns.ZoneArgs{
    			Name:              pulumi.String("example-frontdoor.com"),
    			ResourceGroupName: exampleResourceGroup.Name,
    		})
    		if err != nil {
    			return err
    		}
    		exampleFrontdoorCustomDomain, err := cdn.NewFrontdoorCustomDomain(ctx, "example", &cdn.FrontdoorCustomDomainArgs{
    			Name:                  pulumi.String("example-custom-domain"),
    			CdnFrontdoorProfileId: exampleFrontdoorProfile.ID(),
    			DnsZoneId:             exampleZone.ID(),
    			HostName:              pulumi.String("www.example-frontdoor.com"),
    			Tls: &cdn.FrontdoorCustomDomainTlsArgs{
    				CertificateType:   pulumi.String("ManagedCertificate"),
    				MinimumTlsVersion: pulumi.String("TLS12"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleFrontdoorSecurityPolicy, err := cdn.NewFrontdoorSecurityPolicy(ctx, "example", &cdn.FrontdoorSecurityPolicyArgs{
    			Name:                  pulumi.String("example-security-policy"),
    			CdnFrontdoorProfileId: exampleFrontdoorProfile.ID(),
    			SecurityPolicies: &cdn.FrontdoorSecurityPolicySecurityPoliciesArgs{
    				Firewall: &cdn.FrontdoorSecurityPolicySecurityPoliciesFirewallArgs{
    					CdnFrontdoorFirewallPolicyId: exampleFrontdoorFirewallPolicy.ID(),
    					Association: &cdn.FrontdoorSecurityPolicySecurityPoliciesFirewallAssociationArgs{
    						Domains: cdn.FrontdoorSecurityPolicySecurityPoliciesFirewallAssociationDomainArray{
    							&cdn.FrontdoorSecurityPolicySecurityPoliciesFirewallAssociationDomainArgs{
    								CdnFrontdoorDomainId: exampleFrontdoorCustomDomain.ID(),
    							},
    						},
    						PatternsToMatch: pulumi.String("/*"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_ = cdn.LookupFrontdoorSecurityPolicyOutput(ctx, cdn.GetFrontdoorSecurityPolicyOutputArgs{
    			Name:              exampleFrontdoorSecurityPolicy.Name,
    			ProfileName:       exampleFrontdoorProfile.Name,
    			ResourceGroupName: exampleResourceGroup.Name,
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleResourceGroup = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-cdn-frontdoor",
            Location = "West Europe",
        });
    
        var exampleFrontdoorProfile = new Azure.Cdn.FrontdoorProfile("example", new()
        {
            Name = "example-frontdoor-profile",
            ResourceGroupName = exampleResourceGroup.Name,
            SkuName = "Standard_AzureFrontDoor",
        });
    
        var exampleFrontdoorFirewallPolicy = new Azure.Cdn.FrontdoorFirewallPolicy("example", new()
        {
            Name = "examplecdnfrontdoorfirewallpolicy",
            ResourceGroupName = exampleResourceGroup.Name,
            SkuName = exampleFrontdoorProfile.SkuName,
            Enabled = true,
            Mode = "Prevention",
            RedirectUrl = "https://www.example.com",
            CustomRules = new[]
            {
                new Azure.Cdn.Inputs.FrontdoorFirewallPolicyCustomRuleArgs
                {
                    Name = "Rule1",
                    Enabled = true,
                    Priority = 1,
                    RateLimitDurationInMinutes = 1,
                    RateLimitThreshold = 10,
                    Type = "MatchRule",
                    Action = "Block",
                    MatchConditions = new[]
                    {
                        new Azure.Cdn.Inputs.FrontdoorFirewallPolicyCustomRuleMatchConditionArgs
                        {
                            MatchVariable = "RemoteAddr",
                            Operator = "IPMatch",
                            NegationCondition = false,
                            MatchValues = new[]
                            {
                                "192.168.1.0/24",
                            },
                        },
                    },
                },
            },
        });
    
        var exampleZone = new Azure.Dns.Zone("example", new()
        {
            Name = "example-frontdoor.com",
            ResourceGroupName = exampleResourceGroup.Name,
        });
    
        var exampleFrontdoorCustomDomain = new Azure.Cdn.FrontdoorCustomDomain("example", new()
        {
            Name = "example-custom-domain",
            CdnFrontdoorProfileId = exampleFrontdoorProfile.Id,
            DnsZoneId = exampleZone.Id,
            HostName = "www.example-frontdoor.com",
            Tls = new Azure.Cdn.Inputs.FrontdoorCustomDomainTlsArgs
            {
                CertificateType = "ManagedCertificate",
                MinimumTlsVersion = "TLS12",
            },
        });
    
        var exampleFrontdoorSecurityPolicy = new Azure.Cdn.FrontdoorSecurityPolicy("example", new()
        {
            Name = "example-security-policy",
            CdnFrontdoorProfileId = exampleFrontdoorProfile.Id,
            SecurityPolicies = new Azure.Cdn.Inputs.FrontdoorSecurityPolicySecurityPoliciesArgs
            {
                Firewall = new Azure.Cdn.Inputs.FrontdoorSecurityPolicySecurityPoliciesFirewallArgs
                {
                    CdnFrontdoorFirewallPolicyId = exampleFrontdoorFirewallPolicy.Id,
                    Association = new Azure.Cdn.Inputs.FrontdoorSecurityPolicySecurityPoliciesFirewallAssociationArgs
                    {
                        Domains = new[]
                        {
                            new Azure.Cdn.Inputs.FrontdoorSecurityPolicySecurityPoliciesFirewallAssociationDomainArgs
                            {
                                CdnFrontdoorDomainId = exampleFrontdoorCustomDomain.Id,
                            },
                        },
                        PatternsToMatch = "/*",
                    },
                },
            },
        });
    
        var example = Azure.Cdn.GetFrontdoorSecurityPolicy.Invoke(new()
        {
            Name = exampleFrontdoorSecurityPolicy.Name,
            ProfileName = exampleFrontdoorProfile.Name,
            ResourceGroupName = exampleResourceGroup.Name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.cdn.FrontdoorProfile;
    import com.pulumi.azure.cdn.FrontdoorProfileArgs;
    import com.pulumi.azure.cdn.FrontdoorFirewallPolicy;
    import com.pulumi.azure.cdn.FrontdoorFirewallPolicyArgs;
    import com.pulumi.azure.cdn.inputs.FrontdoorFirewallPolicyCustomRuleArgs;
    import com.pulumi.azure.dns.Zone;
    import com.pulumi.azure.dns.ZoneArgs;
    import com.pulumi.azure.cdn.FrontdoorCustomDomain;
    import com.pulumi.azure.cdn.FrontdoorCustomDomainArgs;
    import com.pulumi.azure.cdn.inputs.FrontdoorCustomDomainTlsArgs;
    import com.pulumi.azure.cdn.FrontdoorSecurityPolicy;
    import com.pulumi.azure.cdn.FrontdoorSecurityPolicyArgs;
    import com.pulumi.azure.cdn.inputs.FrontdoorSecurityPolicySecurityPoliciesArgs;
    import com.pulumi.azure.cdn.inputs.FrontdoorSecurityPolicySecurityPoliciesFirewallArgs;
    import com.pulumi.azure.cdn.inputs.FrontdoorSecurityPolicySecurityPoliciesFirewallAssociationArgs;
    import com.pulumi.azure.cdn.CdnFunctions;
    import com.pulumi.azure.cdn.inputs.GetFrontdoorSecurityPolicyArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
                .name("example-cdn-frontdoor")
                .location("West Europe")
                .build());
    
            var exampleFrontdoorProfile = new FrontdoorProfile("exampleFrontdoorProfile", FrontdoorProfileArgs.builder()
                .name("example-frontdoor-profile")
                .resourceGroupName(exampleResourceGroup.name())
                .skuName("Standard_AzureFrontDoor")
                .build());
    
            var exampleFrontdoorFirewallPolicy = new FrontdoorFirewallPolicy("exampleFrontdoorFirewallPolicy", FrontdoorFirewallPolicyArgs.builder()
                .name("examplecdnfrontdoorfirewallpolicy")
                .resourceGroupName(exampleResourceGroup.name())
                .skuName(exampleFrontdoorProfile.skuName())
                .enabled(true)
                .mode("Prevention")
                .redirectUrl("https://www.example.com")
                .customRules(FrontdoorFirewallPolicyCustomRuleArgs.builder()
                    .name("Rule1")
                    .enabled(true)
                    .priority(1)
                    .rateLimitDurationInMinutes(1)
                    .rateLimitThreshold(10)
                    .type("MatchRule")
                    .action("Block")
                    .matchConditions(FrontdoorFirewallPolicyCustomRuleMatchConditionArgs.builder()
                        .matchVariable("RemoteAddr")
                        .operator("IPMatch")
                        .negationCondition(false)
                        .matchValues("192.168.1.0/24")
                        .build())
                    .build())
                .build());
    
            var exampleZone = new Zone("exampleZone", ZoneArgs.builder()
                .name("example-frontdoor.com")
                .resourceGroupName(exampleResourceGroup.name())
                .build());
    
            var exampleFrontdoorCustomDomain = new FrontdoorCustomDomain("exampleFrontdoorCustomDomain", FrontdoorCustomDomainArgs.builder()
                .name("example-custom-domain")
                .cdnFrontdoorProfileId(exampleFrontdoorProfile.id())
                .dnsZoneId(exampleZone.id())
                .hostName("www.example-frontdoor.com")
                .tls(FrontdoorCustomDomainTlsArgs.builder()
                    .certificateType("ManagedCertificate")
                    .minimumTlsVersion("TLS12")
                    .build())
                .build());
    
            var exampleFrontdoorSecurityPolicy = new FrontdoorSecurityPolicy("exampleFrontdoorSecurityPolicy", FrontdoorSecurityPolicyArgs.builder()
                .name("example-security-policy")
                .cdnFrontdoorProfileId(exampleFrontdoorProfile.id())
                .securityPolicies(FrontdoorSecurityPolicySecurityPoliciesArgs.builder()
                    .firewall(FrontdoorSecurityPolicySecurityPoliciesFirewallArgs.builder()
                        .cdnFrontdoorFirewallPolicyId(exampleFrontdoorFirewallPolicy.id())
                        .association(FrontdoorSecurityPolicySecurityPoliciesFirewallAssociationArgs.builder()
                            .domains(FrontdoorSecurityPolicySecurityPoliciesFirewallAssociationDomainArgs.builder()
                                .cdnFrontdoorDomainId(exampleFrontdoorCustomDomain.id())
                                .build())
                            .patternsToMatch("/*")
                            .build())
                        .build())
                    .build())
                .build());
    
            final var example = CdnFunctions.getFrontdoorSecurityPolicy(GetFrontdoorSecurityPolicyArgs.builder()
                .name(exampleFrontdoorSecurityPolicy.name())
                .profileName(exampleFrontdoorProfile.name())
                .resourceGroupName(exampleResourceGroup.name())
                .build());
    
        }
    }
    
    resources:
      exampleResourceGroup:
        type: azure:core:ResourceGroup
        name: example
        properties:
          name: example-cdn-frontdoor
          location: West Europe
      exampleFrontdoorProfile:
        type: azure:cdn:FrontdoorProfile
        name: example
        properties:
          name: example-frontdoor-profile
          resourceGroupName: ${exampleResourceGroup.name}
          skuName: Standard_AzureFrontDoor
      exampleFrontdoorFirewallPolicy:
        type: azure:cdn:FrontdoorFirewallPolicy
        name: example
        properties:
          name: examplecdnfrontdoorfirewallpolicy
          resourceGroupName: ${exampleResourceGroup.name}
          skuName: ${exampleFrontdoorProfile.skuName}
          enabled: true
          mode: Prevention
          redirectUrl: https://www.example.com
          customRules:
            - name: Rule1
              enabled: true
              priority: 1
              rateLimitDurationInMinutes: 1
              rateLimitThreshold: 10
              type: MatchRule
              action: Block
              matchConditions:
                - matchVariable: RemoteAddr
                  operator: IPMatch
                  negationCondition: false
                  matchValues:
                    - 192.168.1.0/24
      exampleZone:
        type: azure:dns:Zone
        name: example
        properties:
          name: example-frontdoor.com
          resourceGroupName: ${exampleResourceGroup.name}
      exampleFrontdoorCustomDomain:
        type: azure:cdn:FrontdoorCustomDomain
        name: example
        properties:
          name: example-custom-domain
          cdnFrontdoorProfileId: ${exampleFrontdoorProfile.id}
          dnsZoneId: ${exampleZone.id}
          hostName: www.example-frontdoor.com
          tls:
            certificateType: ManagedCertificate
            minimumTlsVersion: TLS12
      exampleFrontdoorSecurityPolicy:
        type: azure:cdn:FrontdoorSecurityPolicy
        name: example
        properties:
          name: example-security-policy
          cdnFrontdoorProfileId: ${exampleFrontdoorProfile.id}
          securityPolicies:
            firewall:
              cdnFrontdoorFirewallPolicyId: ${exampleFrontdoorFirewallPolicy.id}
              association:
                domains:
                  - cdnFrontdoorDomainId: ${exampleFrontdoorCustomDomain.id}
                patternsToMatch: /*
    variables:
      example:
        fn::invoke:
          function: azure:cdn:getFrontdoorSecurityPolicy
          arguments:
            name: ${exampleFrontdoorSecurityPolicy.name}
            profileName: ${exampleFrontdoorProfile.name}
            resourceGroupName: ${exampleResourceGroup.name}
    
    pulumi {
      required_providers {
        azure = {
          source = "pulumi/azure"
        }
      }
    }
    
    data "azure_cdn_getfrontdoorsecuritypolicy" "example" {
      name                = azure_cdn_frontdoorsecuritypolicy.example.name
      profile_name        = azure_cdn_frontdoorprofile.example.name
      resource_group_name = azure_core_resourcegroup.example.name
    }
    
    resource "azure_core_resourcegroup" "example" {
      name     = "example-cdn-frontdoor"
      location = "West Europe"
    }
    resource "azure_cdn_frontdoorprofile" "example" {
      name                = "example-frontdoor-profile"
      resource_group_name = azure_core_resourcegroup.example.name
      sku_name            = "Standard_AzureFrontDoor"
    }
    resource "azure_cdn_frontdoorfirewallpolicy" "example" {
      name                = "examplecdnfrontdoorfirewallpolicy"
      resource_group_name = azure_core_resourcegroup.example.name
      sku_name            = azure_cdn_frontdoorprofile.example.sku_name
      enabled             = true
      mode                = "Prevention"
      redirect_url        = "https://www.example.com"
      custom_rules {
        name                           = "Rule1"
        enabled                        = true
        priority                       = 1
        rate_limit_duration_in_minutes = 1
        rate_limit_threshold           = 10
        type                           = "MatchRule"
        action                         = "Block"
        match_conditions {
          match_variable     = "RemoteAddr"
          operator           = "IPMatch"
          negation_condition = false
          match_values       = ["192.168.1.0/24"]
        }
      }
    }
    resource "azure_dns_zone" "example" {
      name                = "example-frontdoor.com"
      resource_group_name = azure_core_resourcegroup.example.name
    }
    resource "azure_cdn_frontdoorcustomdomain" "example" {
      name                     = "example-custom-domain"
      cdn_frontdoor_profile_id = azure_cdn_frontdoorprofile.example.id
      dns_zone_id              = azure_dns_zone.example.id
      host_name                = "www.example-frontdoor.com"
      tls = {
        certificate_type    = "ManagedCertificate"
        minimum_tls_version = "TLS12"
      }
    }
    resource "azure_cdn_frontdoorsecuritypolicy" "example" {
      name                     = "example-security-policy"
      cdn_frontdoor_profile_id = azure_cdn_frontdoorprofile.example.id
      security_policies = {
        firewall = {
          cdn_frontdoor_firewall_policy_id = azure_cdn_frontdoorfirewallpolicy.example.id
          association = {
            domains = [{
              "cdnFrontdoorDomainId" = azure_cdn_frontdoorcustomdomain.example.id
            }]
            patterns_to_match = "/*"
          }
        }
      }
    }
    

    API Providers

    This data source uses the following Azure API Providers:

    • Microsoft.Cdn - 2024-02-01

    Using getFrontdoorSecurityPolicy

    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 getFrontdoorSecurityPolicy(args: GetFrontdoorSecurityPolicyArgs, opts?: InvokeOptions): Promise<GetFrontdoorSecurityPolicyResult>
    function getFrontdoorSecurityPolicyOutput(args: GetFrontdoorSecurityPolicyOutputArgs, opts?: InvokeOptions): Output<GetFrontdoorSecurityPolicyResult>
    def get_frontdoor_security_policy(name: Optional[str] = None,
                                      profile_name: Optional[str] = None,
                                      resource_group_name: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetFrontdoorSecurityPolicyResult
    def get_frontdoor_security_policy_output(name: pulumi.Input[Optional[str]] = None,
                                      profile_name: pulumi.Input[Optional[str]] = None,
                                      resource_group_name: pulumi.Input[Optional[str]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetFrontdoorSecurityPolicyResult]
    func LookupFrontdoorSecurityPolicy(ctx *Context, args *LookupFrontdoorSecurityPolicyArgs, opts ...InvokeOption) (*LookupFrontdoorSecurityPolicyResult, error)
    func LookupFrontdoorSecurityPolicyOutput(ctx *Context, args *LookupFrontdoorSecurityPolicyOutputArgs, opts ...InvokeOption) LookupFrontdoorSecurityPolicyResultOutput

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

    public static class GetFrontdoorSecurityPolicy 
    {
        public static Task<GetFrontdoorSecurityPolicyResult> InvokeAsync(GetFrontdoorSecurityPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetFrontdoorSecurityPolicyResult> Invoke(GetFrontdoorSecurityPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetFrontdoorSecurityPolicyResult> getFrontdoorSecurityPolicy(GetFrontdoorSecurityPolicyArgs args, InvokeOptions options)
    public static Output<GetFrontdoorSecurityPolicyResult> getFrontdoorSecurityPolicy(GetFrontdoorSecurityPolicyArgs args, InvokeOptions options)
    
    fn::invoke:
      function: azure:cdn/getFrontdoorSecurityPolicy:getFrontdoorSecurityPolicy
      arguments:
        # arguments dictionary
    data "azure_cdn_getfrontdoorsecuritypolicy" "name" {
        # arguments
    }

    The following arguments are supported:

    Name string
    The name of the Front Door Security Policy.
    ProfileName string
    The name of the Front Door Profile.
    ResourceGroupName string
    The name of the Resource Group.
    Name string
    The name of the Front Door Security Policy.
    ProfileName string
    The name of the Front Door Profile.
    ResourceGroupName string
    The name of the Resource Group.
    name string
    The name of the Front Door Security Policy.
    profile_name string
    The name of the Front Door Profile.
    resource_group_name string
    The name of the Resource Group.
    name String
    The name of the Front Door Security Policy.
    profileName String
    The name of the Front Door Profile.
    resourceGroupName String
    The name of the Resource Group.
    name string
    The name of the Front Door Security Policy.
    profileName string
    The name of the Front Door Profile.
    resourceGroupName string
    The name of the Resource Group.
    name str
    The name of the Front Door Security Policy.
    profile_name str
    The name of the Front Door Profile.
    resource_group_name str
    The name of the Resource Group.
    name String
    The name of the Front Door Security Policy.
    profileName String
    The name of the Front Door Profile.
    resourceGroupName String
    The name of the Resource Group.

    getFrontdoorSecurityPolicy Result

    The following output properties are available:

    CdnFrontdoorProfileId string
    The ID of the Front Door Profile associated with this Front Door Security Policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    ProfileName string
    ResourceGroupName string
    SecurityPolicies List<GetFrontdoorSecurityPolicySecurityPolicy>
    A securityPolicies block as defined below.
    CdnFrontdoorProfileId string
    The ID of the Front Door Profile associated with this Front Door Security Policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    ProfileName string
    ResourceGroupName string
    SecurityPolicies []GetFrontdoorSecurityPolicySecurityPolicy
    A securityPolicies block as defined below.
    cdn_frontdoor_profile_id string
    The ID of the Front Door Profile associated with this Front Door Security Policy.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    profile_name string
    resource_group_name string
    security_policies list(object)
    A securityPolicies block as defined below.
    cdnFrontdoorProfileId String
    The ID of the Front Door Profile associated with this Front Door Security Policy.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    profileName String
    resourceGroupName String
    securityPolicies List<GetFrontdoorSecurityPolicySecurityPolicy>
    A securityPolicies block as defined below.
    cdnFrontdoorProfileId string
    The ID of the Front Door Profile associated with this Front Door Security Policy.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    profileName string
    resourceGroupName string
    securityPolicies GetFrontdoorSecurityPolicySecurityPolicy[]
    A securityPolicies block as defined below.
    cdn_frontdoor_profile_id str
    The ID of the Front Door Profile associated with this Front Door Security Policy.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    profile_name str
    resource_group_name str
    security_policies Sequence[GetFrontdoorSecurityPolicySecurityPolicy]
    A securityPolicies block as defined below.
    cdnFrontdoorProfileId String
    The ID of the Front Door Profile associated with this Front Door Security Policy.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    profileName String
    resourceGroupName String
    securityPolicies List<Property Map>
    A securityPolicies block as defined below.

    Supporting Types

    GetFrontdoorSecurityPolicySecurityPolicy

    firewalls list(object)
    A firewall block as defined below.
    firewalls List<Property Map>
    A firewall block as defined below.

    GetFrontdoorSecurityPolicySecurityPolicyFirewall

    Associations List<GetFrontdoorSecurityPolicySecurityPolicyFirewallAssociation>
    An association block as defined below.
    CdnFrontdoorFirewallPolicyId string
    The ID of the Front Door Firewall Policy associated with this Front Door Security Policy.
    Associations []GetFrontdoorSecurityPolicySecurityPolicyFirewallAssociation
    An association block as defined below.
    CdnFrontdoorFirewallPolicyId string
    The ID of the Front Door Firewall Policy associated with this Front Door Security Policy.
    associations list(object)
    An association block as defined below.
    cdn_frontdoor_firewall_policy_id string
    The ID of the Front Door Firewall Policy associated with this Front Door Security Policy.
    associations List<GetFrontdoorSecurityPolicySecurityPolicyFirewallAssociation>
    An association block as defined below.
    cdnFrontdoorFirewallPolicyId String
    The ID of the Front Door Firewall Policy associated with this Front Door Security Policy.
    associations GetFrontdoorSecurityPolicySecurityPolicyFirewallAssociation[]
    An association block as defined below.
    cdnFrontdoorFirewallPolicyId string
    The ID of the Front Door Firewall Policy associated with this Front Door Security Policy.
    associations Sequence[GetFrontdoorSecurityPolicySecurityPolicyFirewallAssociation]
    An association block as defined below.
    cdn_frontdoor_firewall_policy_id str
    The ID of the Front Door Firewall Policy associated with this Front Door Security Policy.
    associations List<Property Map>
    An association block as defined below.
    cdnFrontdoorFirewallPolicyId String
    The ID of the Front Door Firewall Policy associated with this Front Door Security Policy.

    GetFrontdoorSecurityPolicySecurityPolicyFirewallAssociation

    Domains List<GetFrontdoorSecurityPolicySecurityPolicyFirewallAssociationDomain>
    A domain block as defined below.
    PatternsToMatches List<string>
    The paths associated with this firewall policy.
    Domains []GetFrontdoorSecurityPolicySecurityPolicyFirewallAssociationDomain
    A domain block as defined below.
    PatternsToMatches []string
    The paths associated with this firewall policy.
    domains list(object)
    A domain block as defined below.
    patterns_to_matches list(string)
    The paths associated with this firewall policy.
    domains List<GetFrontdoorSecurityPolicySecurityPolicyFirewallAssociationDomain>
    A domain block as defined below.
    patternsToMatches List<String>
    The paths associated with this firewall policy.
    domains GetFrontdoorSecurityPolicySecurityPolicyFirewallAssociationDomain[]
    A domain block as defined below.
    patternsToMatches string[]
    The paths associated with this firewall policy.
    domains Sequence[GetFrontdoorSecurityPolicySecurityPolicyFirewallAssociationDomain]
    A domain block as defined below.
    patterns_to_matches Sequence[str]
    The paths associated with this firewall policy.
    domains List<Property Map>
    A domain block as defined below.
    patternsToMatches List<String>
    The paths associated with this firewall policy.

    GetFrontdoorSecurityPolicySecurityPolicyFirewallAssociationDomain

    Active bool
    Is the Front Door Custom Domain or Front Door Endpoint active?
    CdnFrontdoorDomainId string
    The ID of the Front Door Custom Domain or Front Door Endpoint associated with this Front Door Security Policy.
    Active bool
    Is the Front Door Custom Domain or Front Door Endpoint active?
    CdnFrontdoorDomainId string
    The ID of the Front Door Custom Domain or Front Door Endpoint associated with this Front Door Security Policy.
    active bool
    Is the Front Door Custom Domain or Front Door Endpoint active?
    cdn_frontdoor_domain_id string
    The ID of the Front Door Custom Domain or Front Door Endpoint associated with this Front Door Security Policy.
    active Boolean
    Is the Front Door Custom Domain or Front Door Endpoint active?
    cdnFrontdoorDomainId String
    The ID of the Front Door Custom Domain or Front Door Endpoint associated with this Front Door Security Policy.
    active boolean
    Is the Front Door Custom Domain or Front Door Endpoint active?
    cdnFrontdoorDomainId string
    The ID of the Front Door Custom Domain or Front Door Endpoint associated with this Front Door Security Policy.
    active bool
    Is the Front Door Custom Domain or Front Door Endpoint active?
    cdn_frontdoor_domain_id str
    The ID of the Front Door Custom Domain or Front Door Endpoint associated with this Front Door Security Policy.
    active Boolean
    Is the Front Door Custom Domain or Front Door Endpoint active?
    cdnFrontdoorDomainId String
    The ID of the Front Door Custom Domain or Front Door Endpoint associated with this Front Door Security Policy.

    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.

    Viewing docs for Azure v6.37.0
    published on Friday, May 22, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial