Skip to content
This repository was archived by the owner on Sep 13, 2023. It is now read-only.

Commit 8d895bc

Browse files
committed
2 parents 556a2e1 + 6c93444 commit 8d895bc

2 files changed

Lines changed: 228 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Changelog
2+
3+
## [0.0.1](https://github.com/T-Systems-MMS/terraform-frontdoor/tree/0.0.1) (2021-12-22)
4+
5+
[Full Changelog](https://github.com/T-Systems-MMS/terraform-frontdoor/compare/a6212ce3a8c9ab830b6b9b4afe4e47cba444958f...0.0.1)
6+
7+
8+
9+
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*

README.md

Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
<!-- BEGIN_TF_DOCS -->
2+
# frontdoor
3+
4+
This module manages Azure FrontDoor.
5+
6+
<-- This file is autogenerated, please do not change. -->
7+
8+
## Requirements
9+
10+
| Name | Version |
11+
|------|---------|
12+
| terraform | ~>1.0 |
13+
| azurerm | ~>2.79 |
14+
15+
## Providers
16+
17+
| Name | Version |
18+
|------|---------|
19+
| azurerm | ~>2.79 |
20+
| null | n/a |
21+
22+
## Resources
23+
24+
| Name | Type |
25+
|------|------|
26+
| azurerm_frontdoor.frontdoor | resource |
27+
| azurerm_frontdoor_custom_https_configuration.frontdoor_custom_https_configuration | resource |
28+
| azurerm_frontdoor_firewall_policy.frontdoor_firewall_policy | resource |
29+
| azurerm_resource_group_template_deployment.frontdoor_rules_engine | resource |
30+
| [null_resource.frontdoor_routing_rule-rules_engine](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
31+
| [null_resource.frontdoor_rules_engine](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
32+
33+
## Inputs
34+
35+
| Name | Description | Type | Default | Required |
36+
|------|-------------|------|---------|:--------:|
37+
| resource_group_name | resource_group whitin the resource should be created | `string` | n/a | yes |
38+
| frontdoor | resource definition, default settings are defined within locals and merged with var settings | `any` | `{}` | no |
39+
| frontdoor_config | resource configuration, default settings are defined within locals and merged with var settings | `any` | `{}` | no |
40+
| frontdoor_custom_https_configuration | resource definition, default settings are defined within locals and merged with var settings | `any` | `{}` | no |
41+
| frontdoor_firewall_config | resource configuration, default settings are defined within locals and merged with var settings | `any` | `{}` | no |
42+
| frontdoor_firewall_policy | resource definition, default settings are defined within locals and merged with var settings | `any` | `{}` | no |
43+
| frontdoor_rules_engine | resource definition, default settings are defined within locals and merged with var settings | `any` | `{}` | no |
44+
| frontdoor_rules_engine_config | resource configuration, default settings are defined within locals and merged with var settings | `any` | `{}` | no |
45+
| location | location where the resource should be created | `string` | `"global"` | no |
46+
| resource_name | Azure FrontDoor | `any` | `{}` | no |
47+
| tags | mapping of tags to assign, default settings are defined within locals and merged with var settings | `any` | `{}` | no |
48+
49+
## Outputs
50+
51+
| Name | Description |
52+
|------|-------------|
53+
| frontdoor | azurerm_frontdoor results |
54+
| frontdoor_firewall_policy | azurerm_frontdoor_firewall_policy results |
55+
56+
## Examples
57+
58+
```hcl
59+
module "frontdoor" {
60+
source = "../terraform-frontdoor"
61+
resource_group_name = "service-env-rg"
62+
resource_name = {
63+
frontdoor_firewall_policy = {
64+
env = "serviceenvfdwafpolicy"
65+
}
66+
frontdoor = {
67+
env = "service-env-fd"
68+
}
69+
}
70+
frontdoor_firewall_policy = {
71+
mode = "Prevention"
72+
}
73+
frontdoor_firewall_config = {
74+
env = {
75+
managed_rule = {
76+
Microsoft_BotManagerRuleSet = {
77+
type = "Microsoft_BotManagerRuleSet"
78+
version = "1.0"
79+
override = []
80+
}
81+
}
82+
custom_rule = {
83+
ip_access = {
84+
name = "iprestriction"
85+
action = "Block"
86+
enabled = true
87+
priority = 0
88+
type = "MatchRule"
89+
match_conditions = {
90+
mms = {
91+
match_variable = "RemoteAddr"
92+
operator = "IPMatch"
93+
negation_condition = true
94+
match_values = "127.0.0.2"
95+
}
96+
}
97+
}
98+
}
99+
}
100+
}
101+
frontdoor = {
102+
backend_pools_send_receive_timeout_seconds = 60
103+
enforce_backend_pools_certificate_name_check = false
104+
}
105+
frontdoor_config = {
106+
env = {
107+
backend_pool_health_probe = {
108+
healthprobe = {}
109+
}
110+
backend_pool_load_balancing = {
111+
loadbalancing = {}
112+
}
113+
frontend_endpoint = {
114+
frontendendpoint = {
115+
host_name = "service-env-fd.azurefd.net"
116+
web_application_firewall_policy_link_id = module.frontdoor.frontdoor_firewall_policy.env.id
117+
}
118+
mydomain-de = {
119+
host_name = "mydomain.de"
120+
web_application_firewall_policy_link_id = module.frontdoor.frontdoor_firewall_policy.env.id
121+
}
122+
mydomain-com = {
123+
host_name = "mydomain.com"
124+
web_application_firewall_policy_link_id = module.frontdoor.frontdoor_firewall_policy.env.id
125+
}
126+
}
127+
backend_pool = {
128+
kubernetes_cluster_controller = {
129+
address = "0.0.0.0"
130+
}
131+
}
132+
routing_rule = {
133+
/** forwarding configuration */
134+
default = {
135+
frontend_endpoints = ["frontendendpoint"]
136+
backend_pool_name = "kubernetes_cluster_controller"
137+
forwarding_protocol = "MatchRequest"
138+
cache_enabled = true
139+
cache_use_dynamic_compression = true
140+
cache_query_parameter_strip_directive = "StripNone"
141+
}
142+
kubernetes_cluster_controller = {
143+
frontend_endpoints = ["mydomain-de", "mydomain-com"]
144+
backend_pool_name = "kubernetes_cluster_controller"
145+
accepted_protocols = ["Https"]
146+
forwarding_protocol = "HttpsOnly"
147+
cache_enabled = true
148+
cache_use_dynamic_compression = true
149+
cache_query_parameter_strip_directive = "StripAll"
150+
}
151+
/** redirect configuration */
152+
rewrite-http-to-https = {
153+
frontend_endpoints = ["mydomain-de", "mydomain-com"]
154+
configuration = "redirect_configuration"
155+
accepted_protocols = ["Http"]
156+
redirect_protocol = "HttpsOnly"
157+
redirect_type = "Moved"
158+
}
159+
}
160+
}
161+
}
162+
frontdoor_custom_https_configuration = {
163+
mydomain-de = {
164+
frontend_endpoint_id = module.frontdoor.frontdoor.env.frontend_endpoint["mydomain-de"].id
165+
custom_https_provisioning_enabled = true
166+
certificate_source = "AzureKeyVault"
167+
azure_key_vault_certificate_vault_id = data.azurerm_key_vault.key_vault_mgmt.id
168+
azure_key_vault_certificate_secret_name = data.azurerm_key_vault_secret.mydomain-de-certificate.name
169+
azure_key_vault_certificate_secret_version = data.azurerm_key_vault_secret.mydomain-de-certificate.version
170+
}
171+
mydomain-com = {
172+
frontend_endpoint_id = module.frontdoor.frontdoor.env.frontend_endpoint["mydomain-com"].id
173+
custom_https_provisioning_enabled = true
174+
certificate_source = "AzureKeyVault"
175+
azure_key_vault_certificate_vault_id = data.azurerm_key_vault.key_vault_mgmt.id
176+
azure_key_vault_certificate_secret_name = data.azurerm_key_vault_secret.mydomain-com-certificate.name
177+
azure_key_vault_certificate_secret_version = data.azurerm_key_vault_secret.mydomain-com-certificate.version
178+
}
179+
}
180+
frontdoor_rules_engine = {
181+
mydomain-com = {
182+
frontdoor_name = "service-env-fd.azurefd.net"
183+
routing_rule_name = "kubernetes_cluster_controller"
184+
}
185+
}
186+
frontdoor_rules_engine_config = {
187+
mydomaincom = {
188+
rules = {
189+
entire = {
190+
priority = "0"
191+
match_processing_behavior = "Stop"
192+
action = {
193+
route_configuration_override = {
194+
custom_host = "mydomain.com"
195+
custom_path = "/"
196+
redirect_protocol = "HttpsOnly"
197+
redirect_type = "PermanentRedirect"
198+
}
199+
}
200+
match_conditions = [
201+
{
202+
match_value = ["mydomain.com mydomain.com/"]
203+
match_variable = "RequestUri"
204+
operator = "Equal"
205+
negate_condition = false
206+
selector = ""
207+
transforms = []
208+
}
209+
]
210+
}
211+
}
212+
}
213+
}
214+
tags = {
215+
service = "service_name"
216+
}
217+
}
218+
```
219+
<!-- END_TF_DOCS -->

0 commit comments

Comments
 (0)