-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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: Support for Hostname #2990
Conversation
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.
@mcharriere Thanks for the contribution, mostly it LGTM, please address comments in the PR.
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 @mcharriere,
Thank you for the contribution! I've taken a look and left some comments inline. My main concern is always setting the value in the API, typically for optional values we won't set the field in the request if the property isn't set in tf.
@@ -260,6 +260,32 @@ func TestAccAzureRMApplicationGateway_probesPickHostNameFromBackendHTTPSettings( | |||
}) | |||
} | |||
|
|||
func TestAccAzureRMApplicationGateway_backendHttpSettingsHostName(t *testing.T) { |
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.
Could we get another test with 3 steps:
- set pick true
- set hostname
- unset hostname
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.
I have a doubt regarding the test. If I set pick true and then I try to set hostname it will throw an error. Until here it's fine, i can check for that error. But I dont understand the following step. I think that unsetting hostname won't do anything because of the previous error.
Should I add a test just to check for that error (both pick and host_name set)?
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.
@katbyte I've added the test TestAccAzureRMApplicationGateway_backendHttpSettingsHostNameAndPick checking for the error and it's passing.
Please let me know if you think there is something else to check for.
As suspected i think always setting the property causes issues:
|
Oh @katbyte thanks for pointing out that. I'll fix it soon. |
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 for the updates @mcharriere!
this LGTM now 👍
This has been released in version 1.24.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 = "~> 1.24.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 👉 hashibot-feedback@hashicorp.com. Thanks! |
Added support for hostname in backend http settings. #1576