This module will create and configure an Azure Front Door and allow you to manage its resources such as origins, endpoints, and routes
This repository is a READ-ONLY sub-tree split. See https://github.com/FriendsOfTerraform/modules to create issues or submit pull requests.
This example creates an Azure Front Door profile with an origin group named demo-webapp
with two origins. Then creates an endpoint named default
and route named webapp
to route traffic to origins behind demo-webapp
module "Front Door" {
source = "github.com/FriendsOfTerraform/azure-frontdoor.git?ref=v0.0.1"
azure = {
resource_group_name = "aks-dev"
}
name = "Front Door-demo"
origin_groups = {
"demo-webapp" = {
health_probe = {}
session_affinity_enabled = false
origins = {
webapp-uswest = {
hostname = "webapp-petersin.azurewebsites.net"
}
webapp-useast = {
hostname = "petersin-webapp-useast.azurewebsites.net"
}
}
}
}
endpoints = {
"default" = {
routes = {
webapp = {
# must defines an origin group that is created by the same module
origin_group_name = "demo-webapp"
}
}
}
}
}
-
(object)
azure
[since v0.0.1]The resource group name and the location where the resources will be deployed to
azure = { resource_group_name = "sandbox" location = "westus" }
-
(string)
resource_group_name
[since v0.0.1]The name of an Azure resource group where the Front Door will be deployed
-
(string)
location = null
[since v0.0.1]The name of an Azure location where the Front Door will be deployed. If unspecified, the resource group's location will be used.
-
-
(string)
name
[since v0.0.1]The name of the Azure Front Door profile. This will also be used as a prefix to all associated resources' names.
-
(map(string))
additional_tags = {}
[since v0.0.1]Additional tags for the Azure Front Door
-
(map(string))
additional_tags_all = {}
[since v0.0.1]Additional tags for all resources deployed with this module
-
(map(object))
endpoints = {}
[since v0.0.1]Defines Front Door endpoints with associating routes
-
(map(string))
additional_tags = null
[since v0.0.1]Additional tags for the endpoint
-
(bool)
enabled = true
[since v0.0.1]Enables the endpoint
-
(map(object))
routes = null
[since v0.0.1]Defines a map of routes, in
route_name = {configuration}
format-
(string)
origin_group_name
[since v0.0.1]The name of the Front Door Origin Group where this Front Door Route should be created. YOU MUST DEFINE AN ORIGIN GROUP CREATED BY THE SAME MODULE.
-
(list(string))
accepted_protocols = ["Http", "Https"]
[since v0.0.1]One or more Protocols supported by this Front Door Route. Possible values are
Http
orHttps
-
(bool)
enabled = true
[since v0.0.1]Enables the route
-
(string)
forwarding_protocol = "MatchRequest"
[since v0.0.1]The Protocol that will be use when forwarding traffic to backends. Possible values are
HttpOnly
,HttpsOnly
orMatchRequest
-
(bool)
https_redirect_enabled = true
[since v0.0.1]Automatically redirect HTTP traffic to HTTPS traffic
-
(bool)
link_to_default_domain = true
[since v0.0.1]Defines if this Front Door Route should be linked to the default endpoint
-
(string)
origin_path = null
[since v0.0.1]A directory path on the Front Door Origin that can be used to retrieve content
-
(list(string))
patterns_to_match = ["/*"]
[since v0.0.1]The route patterns of the rule
-
-
-
(map(object))
origin_groups = {}
[since v0.0.1]Defines Front Door origin groups with associating origins, in
origin_group_name = {config}
format-
(object)
health_probe = null
[since v0.0.1]Configures the health probe of this origin group
-
(number)
interval_seconds = 100
[since v0.0.1]Specifies the number of seconds between health probes. Possible values are between
5
and31536000
seconds -
(string)
path = "/"
[since v0.0.1]Specifies the path relative to the origin that is used to determine the health of the origin.
-
(string)
probe_method = "HEAD"
[since v0.0.1]Specifies the type of health probe request that is made. Possible values are
GET
andHEAD
-
(string)
protocol = "Http"
[since v0.0.1]Specifies the protocol to use for health probe. Possible values are
Http
andHttps
-
-
(object)
load_balancing = null
[since v0.0.1]Configure the load balancing settings to define what sample set we need to use to call the backend as healthy or unhealthy
-
(number)
latency_sensitivity_milliseconds = 50
[since v0.0.1]Latency sensitivity for identifying backends with least latency. Possible values are between
0
and1000
-
(number)
sample_size = 4
[since v0.0.1]Sample size to assess backend availability. Possible values are between
0
and255
-
(number)
successful_samples_required = 3
[since v0.0.1]Successful samples required to declare the backend healthy. Possible values are between
0
and255
-
-
(map(object))
origins = null
[since v0.0.1]Defines a map of origins, in
origin_name = {configuration}
format-
(string)
hostname
[since v0.0.1]The IPv4 address, IPv6 address or Domain name of the Origin
-
(bool)
certificate_subject_name_validation = true
[since v0.0.1]Specifies whether certificate name checks are enabled for this origin
-
(bool)
enabled = true
[since v0.0.1]Enables the origin
-
(number)
http_port = 80
[since v0.0.1]The value of the HTTP port. Must be between
1
and65535
-
(number)
https_port = 443
[since v0.0.1]The value of the HTTPS port. Must be between
1
and65535
-
(string)
origin_host_header = null
[since v0.0.1]The host header value (an IPv4 address, IPv6 address or Domain name), which is sent to the origin with each request. If unspecified the hostname from the request will be used.
-
(number)
priority = 1
[since v0.0.1]Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy. Must be between
1
and5
-
(number)
weight = 500
[since v0.0.1]The weight of the origin in a given origin group for load balancing. Must be between
1
and1000
-
-
(bool)
session_affinity_enabled = true
[since v0.0.1]Specifies whether session affinity should be enabled on this host
-
-
(number)
response_timeout_seconds = 120
[since v0.0.1]Number of seconds before the send/received request times out. Valid values
16 - 240
-
(string)
tier = "Standard"
[since v0.0.1]Define the tier of the Front Door service. Valid values are
"Standard"
or"Premium"
This module does not support the following and they will be implemented in the next release:
- Custom Domains
- Rule Set