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. }) }))