» azurerm_frontdoor_custom_https_configuration

Manages the Custom Https Configuration for an Azure Front Door Frontend Endpoint..

resource "azurerm_resource_group" "example" {
  name     = "FrontDoorExampleResourceGroup"
  location = "EastUS2"
}

data "azurerm_key_vault" "vault" {
  name                = "example-vault"
  resource_group_name = "example-vault-rg"
}

resource "azurerm_frontdoor" "example" {
  name                                         = "example-FrontDoor"
  resource_group_name                          = azurerm_resource_group.example.name
  enforce_backend_pools_certificate_name_check = false

  routing_rule {
    name               = "exampleRoutingRule1"
    accepted_protocols = ["Http", "Https"]
    patterns_to_match  = ["/*"]
    frontend_endpoints = ["exampleFrontendEndpoint1"]
    forwarding_configuration {
      forwarding_protocol = "MatchRequest"
      backend_pool_name   = "exampleBackendBing"
    }
  }

  backend_pool_load_balancing {
    name = "exampleLoadBalancingSettings1"
  }

  backend_pool_health_probe {
    name = "exampleHealthProbeSetting1"
  }

  backend_pool {
    name = "exampleBackendBing"
    backend {
      host_header = "www.bing.com"
      address     = "www.bing.com"
      http_port   = 80
      https_port  = 443
    }

    load_balancing_name = "exampleLoadBalancingSettings1"
    health_probe_name   = "exampleHealthProbeSetting1"
  }

  frontend_endpoint {
    name      = "exampleFrontendEndpoint1"
    host_name = "example-FrontDoor.azurefd.net"
  }

  frontend_endpoint {
    name      = "exampleFrontendEndpoint2"
    host_name = "examplefd1.examplefd.net"
  }
}

resource "azurerm_frontdoor_custom_https_configuration" "example_custom_https_0" {
  frontend_endpoint_id              = azurerm_frontdoor.example.frontend_endpoint[0].id
  resource_group_name               = azurerm_resource_group.example.name
  custom_https_provisioning_enabled = false
}

resource "azurerm_frontdoor_custom_https_configuration" "example_custom_https_1" {
  frontend_endpoint_id              = azurerm_frontdoor.example.frontend_endpoint[1].id
  resource_group_name               = azurerm_resource_group.example.name
  custom_https_provisioning_enabled = true

  custom_https_configuration {
    certificate_source                         = "AzureKeyVault"
    azure_key_vault_certificate_secret_name    = "examplefd1"
    azure_key_vault_certificate_secret_version = "ec8d0737e0df4f4gb52ecea858e97a73"
    azure_key_vault_certificate_vault_id       = data.azurerm_key_vault.vault.id
  }
}

» Argument Reference

The custom_https_configuration block is also valid inside an azurerm_frontdoor_custom_https_configuration, which supports the following arguments:


The custom_https_configuration block supports the following:

  • certificate_source - (Optional) Certificate source to encrypted HTTPS traffic with. Allowed values are FrontDoor or AzureKeyVault. Defaults to FrontDoor.

The following attributes are only valid if certificate_source is set to AzureKeyVault:


» Attributes Reference

azurerm_frontdoor_custom_https_configuration exports the following attributes:

  • id - The Resource ID of the Azure Front Door Custom https configuration.

custom_https_configuration exports the following:

» Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 6 hours) Used when creating a Custom Https Configuration.
  • update - (Defaults to 6 hours) Used when updating a Custom Https Configuration.
  • read - (Defaults to 5 minutes) Used when retrieving a Custom Https Configuration.
  • delete - (Defaults to 6 hours) Used when deleting a Custom Https Configuration.

» Import

Front Door Custom Https Configurations can be imported using the Frontend endpoint name, e.g.

terraform import azurerm_frontdoor_custom_https_configuration.example_custom_https_1 /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/mygroup1/providers/Microsoft.Network/frontdoors/frontdoor1/frontendendpoints/exampleFrontendEndpoint2/customHttpsConfiguration/exampleFrontendEndpoint2