-
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_firewall: supports dns_setting
#8878
azurerm_firewall: supports dns_setting
#8878
Conversation
`azurerm_firewall` supports `dns_setting` and `azurerm_firewall_network_rule_collection` supports `destination_fqdns`.
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.
hey @magodo
Thanks for this PR - I've taken a look through and left a few comments inline but if we can fix those up then this is otherwise looking good 👍
Thanks!
azurerm/internal/services/network/firewall_network_rule_collection_resource.go
Show resolved
Hide resolved
|
||
return map[string]*string{ | ||
"Network.DNS.EnableProxy": utils.String(fmt.Sprintf("%t", v["enabled"].(bool))), | ||
"Network.DNS.Servers": utils.String(strings.Join(servers, ",")), |
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.
Can we file a Swagger bug about these? Since this is a dictionary there's no guarantees there won't be breaking changes here
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.
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 link to this in the code?
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.
Yes, I have added them in my last commit.
} | ||
|
||
return map[string]*string{ | ||
"Network.DNS.EnableProxy": utils.String(fmt.Sprintf("%t", v["enabled"].(bool))), |
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.
presumably this is a String to handle the Tri-state (True, False, Unset) here - is this defaulted/planned to be defaulted going forward? In general we're removing "enabled" fields and using the presence/omission of the block to infer that - but that won't work for tri-state fields, can we reach out to the service team and confirm the intention here?
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 will reply here later once I got the update from service team.
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.
any update @magodo ?
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.
Just got the update that the absense of Network.DNS.EnableProxy
is identical to setting it to false
, which means there is no "Unset" state. So I guess we can use the precense of the dns_servers
as an indicator whether to enable the proxy or not?
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.
@magodo no, it is not. Firewall supports DNS Proxy to "nowhere" aka Azure default DNS. Also DNS proxy could be disabled even if the proxy servers are set. These options are really independent of each other. The first implementation was more correct than the one which was committed.
@katbyte I have updated the |
This has been released in version 2.35.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.35.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! |
azurerm_firewall
supportsdns_setting
andazurerm_firewall_network_rule_collection
supportsdestination_fqdns
.Test Result
Fixes #8312, fixes #7743.