Skip to content

Commit

Permalink
Use proper URL
Browse files Browse the repository at this point in the history
  • Loading branch information
harryy94 committed Feb 4, 2025
1 parent b6f32ec commit 077ac4f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 73 deletions.
72 changes: 0 additions & 72 deletions src/infrastructure/terraform/frontdoor.tf
Original file line number Diff line number Diff line change
@@ -1,75 +1,3 @@
# resource "azurerm_frontdoor" "web-frontdoor" {
# name = local.frontdoor_name
# resource_group_name = azurerm_resource_group.web-rg.name
# tags = local.common_tags
#
# routing_rule {
# name = "webRoutingRule"
# accepted_protocols = ["Http", "Https"]
# patterns_to_match = ["/*"]
# frontend_endpoints = ["${local.service_prefix}-web-fd"]
# forwarding_configuration {
# forwarding_protocol = "MatchRequest"
# backend_pool_name = "${local.service_prefix}-webBackend"
# }
# }
#
# routing_rule {
# name = "webStagingRoutingRule"
# accepted_protocols = ["Http", "Https"]
# patterns_to_match = ["/staging-health"]
# frontend_endpoints = ["${local.service_prefix}-web-fd"]
# forwarding_configuration {
# forwarding_protocol = "MatchRequest"
# backend_pool_name = "${local.service_prefix}-webStagingBackend"
# custom_forwarding_path = "/health"
# }
# }
#
# backend_pool_load_balancing {
# name = "${local.service_prefix}-LoadBalancingSettings"
# }
#
# backend_pool_health_probe {
# name = "${local.service_prefix}-HealthProbeSetting"
# enabled = false
# }
#
# backend_pool {
# name = "${local.service_prefix}-webBackend"
# backend {
# host_header = azurerm_linux_web_app.web-app-service.default_hostname
# address = azurerm_linux_web_app.web-app-service.default_hostname
# http_port = 80
# https_port = 443
# }
#
# load_balancing_name = "${local.service_prefix}-LoadBalancingSettings"
# health_probe_name = "${local.service_prefix}-HealthProbeSetting"
# }
# backend_pool {
# name = "${local.service_prefix}-webStagingBackend"
# backend {
# host_header = azurerm_linux_web_app_slot.web-app-service-staging.default_hostname
# address = azurerm_linux_web_app_slot.web-app-service-staging.default_hostname
# http_port = 80
# https_port = 443
# }
#
# load_balancing_name = "${local.service_prefix}-LoadBalancingSettings"
# health_probe_name = "${local.service_prefix}-HealthProbeSetting"
# }
# backend_pool_settings {
# enforce_backend_pools_certificate_name_check = true
# }
#
# frontend_endpoint {
# name = local.frontdoor_name
# host_name = local.frontdoor_url
# web_application_firewall_policy_link_id = azurerm_frontdoor_firewall_policy.web_firewall_policy.id
# }
# }
#
resource "azurerm_frontdoor_firewall_policy" "web_firewall_policy" {
name = "webFirewallPolicy"
resource_group_name = azurerm_resource_group.web-rg.name
Expand Down
2 changes: 1 addition & 1 deletion src/infrastructure/terraform/web.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ locals {
"ContentfulOptions__DeliveryApiKey" = "@Microsoft.KeyVault(SecretUri=${azurerm_key_vault_secret.contentful-delivery-api-key.versionless_id})"
"ContentfulOptions__PreviewApiKey" = "@Microsoft.KeyVault(SecretUri=${azurerm_key_vault_secret.contentful-preview-api-key.versionless_id})"
"ContentfulOptions__SpaceId" = "@Microsoft.KeyVault(SecretUri=${azurerm_key_vault_secret.contentful-space-id.versionless_id})"
"BaseUrl" = "https://${local.frontdoor_url}"
"BaseUrl" = azurerm_cdn_frontdoor_endpoint.frontdoor-web-endpoint.host_name
"ApplicationInsights__ConnectionString" = "@Microsoft.KeyVault(SecretUri=${azurerm_key_vault_secret.application-insights-connection-string.versionless_id})"
"Caching__Type" = "None"
"Caching__ConnectionString" = "@Microsoft.KeyVault(SecretUri=${azurerm_key_vault_secret.redis-cache-connection-string.versionless_id})"
Expand Down

0 comments on commit 077ac4f

Please sign in to comment.