locropulenton
locropulenton

Reputation: 4853

"Use for App Service" parameter when configuring a gateway in terraform

How can I check "Use for App Service" parameter in terraform when configuring a gateway?

This is my current gateway configuration in terraform

resource "azurerm_application_gateway" "test" {

  backend_http_settings {
    name                  = "${azurerm_virtual_network.vnet.name}-be-htst"
    cookie_based_affinity = "Disabled"
    port                  = 443
    protocol              = "Http"
    request_timeout       = 20
    probe_name            = "${azurerm_virtual_network.vnet.name}-be-probe"
  }
}

Here I have my azure configuration

Upvotes: 1

Views: 334

Answers (1)

4c74356b41
4c74356b41

Reputation: 72171

i just went through one of my app gateways, ticking this checkbox changes absolutely nothing in the resource definition >> its safe to ignore it. what you need to do is properly configure your backendAddressPools, backendHttpSettingsCollection and your probes for this to work

that checkbox forces the use of custom probe and "use host name from backend address" which you can "tick" when creating http settings.

some gotchas:

  1. backendaddresspools have to have backendaddresses configured:

    "backendAddresses": [ { "fqdn": "webapp.azurewebsites.net" } ]

  2. probe have to have pickHostNameFromBackendHttpSettings set to true.

    "pickHostNameFromBackendHttpSettings": true,

Upvotes: 1

Related Questions