paving icon indicating copy to clipboard operation
paving copied to clipboard

azure: "Public access is not permitted on this storage account" for "stemcell"

Open blgm opened this issue 2 years ago • 1 comments

I have recently started to get this error on Azure:

│ Error: Error creating Container "stemcell" (Account "((redacted))" / Resource Group "((redacted))"): containers.Client#Create: Failure sending request: StatusCode=409 -- Original Error: autorest/azure: Service returned an error. Status=<nil> Code="PublicAccessNotPermitted" Message="Public access is not permitted on this storage account.\nRequestId:747bf0d2-401e-000e-0348-16f43b000000\nTime:2023-11-13T15:45:04.2506860Z"
│ 
│   with azurerm_storage_container.stemcell,
│   on ops-manager-storage.tf line 74, in resource "azurerm_storage_container" "stemcell":
│   74: resource "azurerm_storage_container" "stemcell" {

Current definition of this resource is:

resource "azurerm_storage_container" "stemcell" {
  name                  = "stemcell"
  depends_on            = [azurerm_storage_account.bosh]
  storage_account_name  = azurerm_storage_account.bosh.name
  container_access_type = "blob"
}

Changing it to this seemed to work so far:

resource "azurerm_storage_container" "stemcell" {
  name                  = "stemcell"
  depends_on            = [azurerm_storage_account.bosh]
  storage_account_name  = azurerm_storage_account.bosh.name
  container_access_type = "private"
}

It also makes it consistent with every other "azurerm_storage_container" that's defined.

I'm still testing this change, but raising this issue early in case other folks see the same error.

blgm avatar Nov 13 '23 16:11 blgm

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.

cf-gitbot avatar Nov 13 '23 16:11 cf-gitbot