Azure Data Lake Gen2 FileSystem creation error

Hi there,
I want to create a DataLake storage account and Container on this account using Terraform. Resource group and storage accounts are created successfully, but when TF deploys a “azure_storage_data_lake_gen2_filesystem”, it creates the filesystem for 7.5 minutes and then return an error:

"Error checking for existence of existing File System “containername” (Account “storageaccountname”): datalakestore.Client#GetProperties: Failure sending request: StatusCode=0 – Original Error: Head “https://storageaccountname.dfs.core.windows.net/containername?resource=filesystem”: authenticationrequired.

Code is pretty standard from TF examples:

resource "azurerm_storage_data_lake_gen2_filesystem" "this" {
 name = "containername"
 storage_account_id = azurerm_storage_account.this.id
}

If I add az command call from TF code, it successfully creates a folder

provisioner "local-exec" {
 command = "az storage fs create --name containername --account-name ${local.storageAccountName} --auth-mode login"
}

Any ideas what could be the problem?