Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application gateway component has no effect #22401

Open
1 task done
nininetlight opened this issue Jul 7, 2023 · 0 comments
Open
1 task done

Application gateway component has no effect #22401

nininetlight opened this issue Jul 7, 2023 · 0 comments

Comments

@nininetlight
Copy link

nininetlight commented Jul 7, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

1.4.6

AzureRM Provider Version

3.48

Affected Resource(s)/Data Source(s)

azurerm_application_gateway

Terraform Configuration Files

resource "azurerm_application_gateway" "app_gateway_test" {
  name                = "app-gateway-test"
  resource_group_name = local.rg_name
  location            = local.rg_location

  sku {
    name = "WAF_v2"
    tier = "WAF_v2"
  }

  waf_configuration {
    enabled          = true
    firewall_mode    = "Detection"
    rule_set_version = "3.2"
  }

  autoscale_configuration {
    min_capacity = 1
    max_capacity = 8
  }

  gateway_ip_configuration {
    name      = "app-gateway-ip-configuration"
    subnet_id = local.appgw_subnet_id
  }

  frontend_port {
    name = local.frontend_port_name
    port = local.http_port
  }

  frontend_ip_configuration {
    name                 = local.ip_configuration_name
    public_ip_address_id = local.pip_id
  }

  backend_address_pool {
    name  = local.portal_backend_address_pool_name
    fqdns = [local.fqdn]
  }

  backend_http_settings {
    name            = local.http_setting_name
    port            = local.http_port
    protocol        = "Http"
    request_timeout = local.timeout_in_seconds

    cookie_based_affinity               = "Disabled"
    pick_host_name_from_backend_address = true
  }

  http_listener {
    name                           = local.listener_name
    frontend_ip_configuration_name = local.dummy_ip_configuration_name
    frontend_port_name             = local.frontend_port_name
    protocol                       = "Http"
  }

  request_routing_rule {
    name                       = local.request_routing_rule_name
    rule_type                  = "Basic"
    http_listener_name         = local.listener_name
    backend_address_pool_name  = local.portal_backend_address_pool_name
    backend_http_settings_name = local.http_setting_name
    priority                   = 10000
  }

  rewrite_rule_set {
    name = "test"
    rewrite_rule {
      name          = "test"
      rule_sequence = 1000
      condition {
        variable    = "var_uri_path"
        ignore_case = true
        pattern     = "/(.*)"
      }
      url {
        path       = "{var_uri_path_1}"
        components = "path_only"
      }
    }
  }
}

Debug Output/Panic Output

No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration and found no differences,
so no changes are needed.

Expected Behaviour

Expecting component value of path_only to change the rewrite rule to URL Path

image

Actual Behaviour

component value of path_only has no impact on the setting.

Steps to Reproduce

  1. terraform apply
  2. Check the resulting setting in Azure portal
  3. Remove component property
  4. terraform apply
  5. Check the resulting setting in Azure portal. Notice how the setting hasn't changed.

Important Factoids

Nothing to note.

References

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants