Skip to content

Commit

Permalink
Attach VDP ruleset to domains (#437)
Browse files Browse the repository at this point in the history
  • Loading branch information
DrizzlyOwl authored Oct 24, 2024
1 parent 754a3b3 commit 872a9f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cdn.tf
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ resource "azurerm_cdn_frontdoor_rule" "vdp_thanks_txt" {
depends_on = [azurerm_cdn_frontdoor_origin_group.group, azurerm_cdn_frontdoor_origin.origin]
name = "thankstxtredirect"
cdn_frontdoor_rule_set_id = azurerm_cdn_frontdoor_rule_set.vdp[0].id
order = 1
order = 2
behavior_on_match = "Continue"

actions {
Expand Down
2 changes: 2 additions & 0 deletions locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -446,10 +446,12 @@ locals {
ruleset_redirects_id = length(local.cdn_frontdoor_host_redirects) > 0 ? [azurerm_cdn_frontdoor_rule_set.redirects[0].id] : []
ruleset_add_response_headers_id = length(local.cdn_frontdoor_host_add_response_headers) > 0 ? [azurerm_cdn_frontdoor_rule_set.add_response_headers[0].id] : []
ruleset_remove_response_headers_id = length(local.cdn_frontdoor_remove_response_headers) > 0 ? [azurerm_cdn_frontdoor_rule_set.remove_response_headers[0].id] : []
ruleset_vdp_id = local.enable_cdn_frontdoor_vdp_redirects ? [azurerm_cdn_frontdoor_rule_set.vdp[0].id] : []
ruleset_ids = concat(
local.ruleset_redirects_id,
local.ruleset_add_response_headers_id,
local.ruleset_remove_response_headers_id,
local.ruleset_vdp_id
)
cdn_frontdoor_enable_rate_limiting = var.cdn_frontdoor_enable_rate_limiting
cdn_frontdoor_rate_limiting_duration_in_minutes = var.cdn_frontdoor_rate_limiting_duration_in_minutes
Expand Down

0 comments on commit 872a9f0

Please sign in to comment.