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

dependencies: migrate firewall to hashicorp/go-azure-sdk #22863

Merged
merged 8 commits into from
Sep 26, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"fmt"
"log"
"strconv"
"strings"
"time"

"github.com/hashicorp/go-azure-helpers/lang/pointer"
Expand Down Expand Up @@ -757,7 +758,13 @@ func flattenFirewallPolicyRuleCollection(input *[]firewallpolicyrulecollectiongr

var action string
if rule.Action != nil {
action = string(pointer.From(rule.Action.Type))
// todo 4.0 change this from DNAT to Dnat
// doing this because we hardcode Dnat for https://github.com/Azure/azure-rest-api-specs/issues/9986
if strings.EqualFold(string(pointer.From(rule.Action.Type)), "Dnat") {
action = "Dnat"
} else {
action = string(pointer.From(rule.Action.Type))
}
Comment on lines +761 to +767
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since Firewall is using the new base layer, this shouldn't be needed - the base layer should be updating Action to be DNAT as defined in the Swagger - what's the issue this is fixing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue is that we're specifying Dnat in the config files which should mean our users are too

image

}

rules, err := flattenFirewallPolicyRuleNat(rule.Rules)
Expand Down