-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
azurerm_application_gateway: can combine include_path with target_url #6175
azurerm_application_gateway: can combine include_path with target_url #6175
Conversation
Redirecting say http://foo/path?query to http://bar/ include_path controls whether it will go to http://bar/path or http://bar/ This is a perfectly valid option in a redirect_configuration in combination with target_url. Currently the code gives an error if you use them in combination and omits it from the request if target_url is set. Omitting include_path has strange results in the Azure Portal (no radio button selected) and "null" defaults to true whereas the documentation says include_path should default to false. This change makes the behavior consistent with the documentation.
I've only tested this with a 302 Found redirect using target_url in a redirect_configuration. I don't fully understand the purpose behind this check that include_path should not be used in combination with target_url. Did the API change since this resource was first designed, or does this change break something in some other usage of redirect_configuration? Hopefully someone more familiar with this code and the Application Gateway can advise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @bailsman,
my money would be on the API changed, but i can't say for sure. However could you add a test where we set both target URL and include path so we can verify it works & ensure if the API changes again in the future we notice? thanks!
Added a test!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @mbfrahry! LGTM now
This has been released in version 2.4.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 2.4.0"
}
# ... other configuration ... |
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! |
Redirecting say http://foo/path?query to http://bar/
include_path controls whether it will go to
http://bar/path
or
http://bar/
This is a perfectly valid option in a redirect_configuration in
combination with target_url. Currently the code gives an error if you
use them in combination and omits it from the request if target_url is
set.
Omitting include_path has strange results in the Azure Portal
(no radio button selected) and "null" defaults to true whereas the
documentation says include_path should default to false.
This change makes the behavior consistent with the documentation.