Skip to content

Commit

Permalink
#24910: capturing and returning error as per review
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavmb committed Feb 16, 2024
1 parent aa15067 commit 8b56252
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/services/firewall/firewall_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,10 @@ func resourceFirewallDelete(d *pluginsdk.ResourceData, meta interface{}) error {
}

if read.Model.Properties != nil && read.Model.Properties.FirewallPolicy != nil && read.Model.Properties.FirewallPolicy.Id != nil {
id, _ := firewallpolicies.ParseFirewallPolicyIDInsensitively(*read.Model.Properties.FirewallPolicy.Id)
id, err := firewallpolicies.ParseFirewallPolicyIDInsensitively(*read.Model.Properties.FirewallPolicy.Id)
if err != nil {
return err
}
locks.ByName(id.FirewallPolicyName, AzureFirewallPolicyResourceName)
defer locks.UnlockByName(id.FirewallPolicyName, AzureFirewallPolicyResourceName)
}
Expand Down

0 comments on commit 8b56252

Please sign in to comment.