Deploying Front Door Premuim Using Terraform

Kaushalendra Kumar 106 Reputation points
2022-08-02T13:43:45.827+00:00

We are trying to deploy Azure Front door using terraform. However as there is no code block where you can define the SKU of the front door, terraform deploys an "Azure Front Door Classic" by default.

How can we deploy an Azure Front door with Azure Front Door Premium SKU using terraform?

TF Registry for Front Door- https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/frontdoor

Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
587 questions
0 comments No comments
{count} votes

Accepted answer
  1. GitaraniSharma-MSFT 47,696 Reputation points Microsoft Employee
    2022-08-02T14:11:21.337+00:00

    Hello @Kaushalendra Kumar ,

    Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.

    I understand that you would like to create Premium SKU Azure Front Door via Terraform or Bicep or ARM template and need the module reference for it.

    I couldn't find Terraform module for Azure Front Door Standard/Premium and there is no "SKU_name" attribute in azurerm_frontdoor module, so I believe it is not supported yet.
    Reference : https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/frontdoor

    I found an issue reported for this in the Hashicorp module within GitHub and looks like it is still in progress as some resources are yet to be refactored to support Azure Front Door Standard/Premium SKU.
    Refer : https://github.com/hashicorp/terraform-provider-azurerm/issues/16344

    In the mean time, you could deploy Azure Front Door Premium using ARM template or Bicep following the below link:
    https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.cdn/front-door-standard-premium/

    The above GitHub article has both azuredeploy.json (ARM) and main.bicep (Bicep) files that you can use to create a Standard/Premium Front Door.
    In the provided templates, it is using Standard SKU, you can replace it with Premium SKU as below:

    ARM:

    "skuName": {  
          "type": "string",  
          "defaultValue": "Premium_AzureFrontDoor",  
          "allowedValues": [  
            "Standard_AzureFrontDoor",  
            "Premium_AzureFrontDoor"  
    	  
    

    Bicep:

    @description('The name of the SKU to use when creating the Front Door profile.')  
    @allowed([  
      'Standard_AzureFrontDoor'  
      'Premium_AzureFrontDoor'  
    ])  
    param skuName string = 'Premium_AzureFrontDoor'  
    

    For more Azure Resource Manager deployment model templates for Front Door Standard/Premium, please refer:
    https://learn.microsoft.com/en-us/azure/frontdoor/front-door-quickstart-template-samples?pivots=front-door-standard-premium

    Kindly let us know if the above helps or you need further assistance on this issue.

    ----------------------------------------------------------------------------------------------------------------

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. steven gonsalvez 1 Reputation point
    2022-09-20T22:11:00.447+00:00

    Suppose this is the new frontdoor resource, it is created as a new resource : https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/cdn_frontdoor_profile

    0 comments No comments