Terraform-provider-azurerm: Feature Request: Azure Front Door

Created on 5 Apr 2019  ·  6Comments  ·  Source: terraform-providers/terraform-provider-azurerm

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Azure Front door has gone into GA:
https://azure.microsoft.com/en-gb/services/frontdoor/
https://azure.microsoft.com/en-gb/blog/azure-front-door-service-is-now-generally-available/

Would be really good to have this supported by the provider.

New or Affected Resource(s)

New resource of

  • azurerm_front_door
  • azurerm_front_door_health_probe_setting
  • azurerm_front_door_load_balancing_setting
  • azurerm_front_door_frontend_host
  • azurerm_front_door_backend
  • azurerm_front_door_backend_pool
  • azurerm_front_door_routing_rule

Potential Terraform Configuration

resource "azurerm_front_door" "test" {
  name = "example-frontdoor"
  location            = "${azurerm_resource_group.test.location}"
  resource_group_name = "${azurerm_resource_group.test.name}"
  state = "enabled"
}

resource "azurerm_front_door_health_probe_setting" "test" {
  name = "example-healthprobesetting"
  path = "/"
  protocol = "https"
  interval = 120
}

resource "azurerm_front_door_load_balancer_setting" "test" {
  name = "example-loadbalancersetting"
  sample_size = "4"
  successful_samples_required = "2"
}

resource "azurerm_front_door_frontend_host" "test" {
  name = "example-frontendhost"
  host_name = "example-frontendhost.azuredf.net"
  session_affinity_state = "enabled"
  session_affinity_ttl = "0"
}

resource "azurerm_front_door_backend_pool" "test" {
  name = "example-backendpool"
  load_balancer_setting = "${azurerm_front_door_load_balancer_setting.test.id}"
  health_probe_setting = "${azurerm_front_door_health_probe_setting.test.id}"
}

resource "azurerm_front_door_backend" "test" {
  "backend_pool" = "${azurerm_front_door_backend_pool.test.id}"
  "address" = "some-back-end-address" #Not sure on this bit, could refer to an app service for example
  "http_port" = "80"
  "https_port" = "443"
  "weight" = "50"
  "priority" = "1"
  "state" = "enabled"  
}

resource "azurerm_front_door_routing_rule" "test" {
  name = "example-routingrule"
  resource_group_name = "${azurerm_resource_group.test.name}"
  front_endpoints = [
     "${azurerm_front_door_frontend_host.test.id}"
  ]
  backend_pool = "${azurerm_front_door_backend_pool.test.id}"
  accepted_protocols = [
    "http",
    "https"
  ]
  patterns_to_match = [
    "/*"
  ]
  forwarding_protocol = "MatchRequest"
  state = "enabled"
}

There are probably resources you can merge together, not sure how these things are usually split out from terraforms perspective. This is basically based off the ARM script below.

References

The basic ARM example for Front Door:
https://github.com/Azure/azure-quickstart-templates/blob/master/101-front-door-create-basic/azuredeploy.json

new-data-source new-resource servicfrontdoor

Most helpful comment

This has been released in version 1.34.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 1.34.0"
}
# ... other configuration ...

All 6 comments

I like the proposed breakout for it. At a glance it's similar to the load balancer which I like. The application gateway, which has everything in a single giant resource, is much less useful IMHO.

Any news on this? Front Door integration is highly appreciated!

Another thing to consider as part of this would be support for creating a Web Application Firewall as well. It is now generally available: https://azure.microsoft.com/en-us/updates/web-application-firewall-for-azure-front-door-service-available/.

@adback03 looks like something is being included for that:
https://github.com/terraform-providers/terraform-provider-azurerm/commit/8291122291773d5950a1801213629f9ba117bcaf#diff-9ad287782e22ef9d4d0572130159511eR329

This has been released in version 1.34.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 1.34.0"
}
# ... other configuration ...

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

Was this page helpful?
0 / 5 - 0 ratings