Error creating storage account with network rules

Error: retrieving Storage Account: (Name “sqldbzzzzz7storage” / Resource Group “rg-zzzzz-ca-hhf-akr1maacs-westus2”): storage.AccountsClient#GetProperties: Failure responding to request: StatusCode=404 – Original Error: autorest/azure: Service returned an error. Status=404 Code=“StorageAccountNotFound” Message=“The storage account sqldbzzzzz7storage was not found.”

data “azurerm_subnet” “sqlserver” {

name = var.subnetName

virtual_network_name = var.vnetName

resource_group_name = var.vnetRg

}

Creating a storgae account for sql server audit

resource “azurerm_storage_account” “sqlserver” {

name = var.sqlStorageAccountName

resource_group_name = var.resource_group.name

location = var.location

account_tier = “Standard”

account_replication_type = “LRS”

enable_https_traffic_only = true

min_tls_version = “TLS1_2”

network_rules {

default_action             = "Deny"

virtual_network_subnet_ids = [data.azurerm_subnet.sqlserver.id]

bypass                     = ["None"]

}

}