diff --git a/internal/services/cosmos/cosmosdb_account_resource.go b/internal/services/cosmos/cosmosdb_account_resource.go index 61deee153107..5144d2d6d946 100644 --- a/internal/services/cosmos/cosmosdb_account_resource.go +++ b/internal/services/cosmos/cosmosdb_account_resource.go @@ -301,7 +301,7 @@ func resourceCosmosDbAccount() *pluginsdk.Resource { Optional: true, Elem: &pluginsdk.Schema{ Type: pluginsdk.TypeString, - ValidateFunc: validation.IsCIDR, + ValidateFunc: validation.Any(validation.IsCIDR, validation.IsIPv4Address), }, } } diff --git a/internal/services/cosmos/cosmosdb_account_resource_test.go b/internal/services/cosmos/cosmosdb_account_resource_test.go index 64b6a0f87e3b..5515060cfc27 100644 --- a/internal/services/cosmos/cosmosdb_account_resource_test.go +++ b/internal/services/cosmos/cosmosdb_account_resource_test.go @@ -4640,7 +4640,7 @@ resource "azurerm_cosmosdb_account" "test" { } is_virtual_network_filter_enabled = true - ip_range_filter = ["55.0.1.0/24", "55.0.2.0/24"] + ip_range_filter = ["55.0.1.0/24", "55.0.2.0/24", "0.0.0.0"] virtual_network_rule { id = azurerm_subnet.subnet1.id