Azure Public access level for containers

Hi, I’m trying to change container_access_type value from “private”, but I keep getting an error.

Please assist, thanks.

provider “azurerm” {
version = “=2.25.0”
features {}
}

resource “azurerm_resource_group” “storage” {
name = “tfstorageresourcegroup”
location = “North Europe”
}

resource “azurerm_storage_account” “account” {
name = “{azurerm_resource_group.storage.name}" location = "{azurerm_resource_group.storage.location}”
account_tier = “Standard”
resource_group_name = “${azurerm_resource_group.storage.name}”
account_replication_type = “LRS”
enable_https_traffic_only = true
allow_blob_public_access = true
}

resource “azurerm_storage_container” “container” {
name = “tftestcontainer”
storage_account_name = “${azurerm_storage_account.account.name}”
container_access_type = “container”
}

resource “azurerm_storage_blob” “blob” {
name = “tftestblob”
storage_account_name = “{azurerm_storage_account.account.name}" storage_container_name = "{azurerm_storage_container.container.name}”
type = “Page”
size = “5120”
}

Error: Error updating the Access Control for Container “tftestcontainer” (Storage Account “tfstorageresourcegroup” / Resource Group “tfstorageresourcegroup”): containers.Client#SetAccessControl: Failure sending request: StatusCode=409 – Original Error: autorest/azure: Service returned an error. Status= Code=“PublicAccessNotPermitted” Message=“Public access is not permitted on this storage account.\nRequestId:80d021ca-501e-009f-4aa6-86a404000000\nTime:2020-09-09T12:38:47.5769058Z”