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: Wrong validation for redirect rules #3285

Closed
mcharriere opened this issue Apr 19, 2019 · 2 comments · Fixed by #3286
Closed

Application gateway: Wrong validation for redirect rules #3285

mcharriere opened this issue Apr 19, 2019 · 2 comments · Fixed by #3286

Comments

@mcharriere
Copy link
Contributor

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 (and AzureRM Provider) Version

Terraform v0.11.13

  • provider.azurerm v1.25.0

Affected Resource(s)

  • azurerm_application_gateway

Terraform Configuration Files

resource "azurerm_application_gateway" "network" {
...
  request_routing_rule {
    name               = "rrrule"
    rule_type          = "PathBasedRouting"
    http_listener_name = "httplistener"
    url_path_map_name  = "urlmap"
  }

  redirect_configuration {
    name          = "redirectrule"
    redirect_type = "Permanent"
    target_url    = "https://example.com"
  }

  url_path_map {
    name                               = "urlmap"
    default_backend_address_pool_name  = "backend1"
    default_backend_http_settings_name = "backendhttpsetting1"

   path_rule {
      name                       = "paths1"
      paths                      = ["/redirect"]
      redirect_configuration_name = "redirectrule"
    }
  }
}

Expected Behavior

This should create a path based request routing rule with a default backend and a redirect rule.

Actual Behavior

This is actually creating the application gateway as expected, but since there is a validation inside the flatten function the read function fails.
I think that checking for redirect_configuration_name and default_backend_address_pool_name is not right, since those two parameters are not mutually exclusive.

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000
@mcharriere
Copy link
Contributor Author

This is also being discussed in #1576

@ghost
Copy link

ghost commented May 29, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators May 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants