Skip to content

Commit

Permalink
Merge pull request #19719 from magodo/storage_account_network_rule_ex…
Browse files Browse the repository at this point in the history
…ist_check

`azurerm_storage_account_network_rules` - Do not check `bypass` during "existance" check
  • Loading branch information
tombuildsstuff authored Jan 4, 2023
2 parents 8d9a6f0 + a4bea1c commit 463f077
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,10 @@ func checkForNonDefaultStorageAccountNetworkRule(rule *storage.NetworkRuleSet) b
return false
}

// THe default action "Allow" is set in the creation of the storage account resource as default value.
if (rule.IPRules != nil && len(*rule.IPRules) != 0) ||
(rule.VirtualNetworkRules != nil && len(*rule.VirtualNetworkRules) != 0) ||
rule.Bypass != "AzureServices" || rule.DefaultAction != "Allow" {
rule.DefaultAction != "Allow" {
return true
}

Expand Down

0 comments on commit 463f077

Please sign in to comment.