From 21218cc16c9a29466cd3c5acf6f9b75d4f380a9c Mon Sep 17 00:00:00 2001 From: christian-calabrese Date: Tue, 23 Jul 2024 13:56:35 +0200 Subject: [PATCH] feat: added components variable in rewrite urls --- app_gateway/main.tf | 1 + app_gateway/variables.tf | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app_gateway/main.tf b/app_gateway/main.tf index a50fe8bb..0f6fa3ad 100644 --- a/app_gateway/main.tf +++ b/app_gateway/main.tf @@ -249,6 +249,7 @@ resource "azurerm_application_gateway" "this" { path = rewrite_rule.value.url.path query_string = rewrite_rule.value.url.query_string reroute = rewrite_rule.value.url.reroute + components = rewrite_rule.value.url.components } } } diff --git a/app_gateway/variables.tf b/app_gateway/variables.tf index d3fb5db8..d33a2e4e 100644 --- a/app_gateway/variables.tf +++ b/app_gateway/variables.tf @@ -153,9 +153,10 @@ variable "rewrite_rule_sets" { })) url = object({ - path = string # The URL path to rewrite. - query_string = string # The query string to rewrite. - reroute = optional(bool, false) # Whether the URL path map should be reevaluated after this rewrite has been applied. + path = string # The URL path to rewrite. + query_string = string # The query string to rewrite. + reroute = optional(bool, false) # Whether the URL path map should be reevaluated after this rewrite has been applied. + components = optional(string, null) # The components used to rewrite the URL. Possible values are path_only and query_string_only to limit the rewrite to the URL Path or URL Query String only. }) }))