Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LastAccessTimeBasedTracking is not supported for the account #11853

Closed
sschmeck opened this issue May 25, 2021 · 5 comments
Closed

LastAccessTimeBasedTracking is not supported for the account #11853

sschmeck opened this issue May 25, 2021 · 5 comments

Comments

@sschmeck
Copy link
Contributor

sschmeck commented May 25, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureRM Provider) Version

Terraform v0.14.10
hashicorp/azurerm v2.57.0

Affected Resource(s)

  • azurerm_storage_account

Terraform Configuration Files

terraform {
  required_version = "0.14.10"
  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "=2.57.0"
    }
  }
}

provider "azurerm" {
  features {}
}

resource "azurerm_resource_group" "rg" {
  name     = "example-resources"
  location = "West Europe"
}

resource "azurerm_storage_account" "sa" {
  name                      = "examplesa"
  resource_group_name       = azurerm_resource_group.rg.name
  location                  = azurerm_resource_group.rg.location
  account_tier              = "Standard"
  account_kind              = "StorageV2"
  account_replication_type  = "LRS"
  enable_https_traffic_only = true
  is_hns_enabled            = true
  min_tls_version           = "TLS1_2"

  blob_properties {
    cors_rule {
      allowed_headers    = ["*"]
      allowed_methods    = ["GET"]
      allowed_origins    = ["*"]
      exposed_headers    = ["*"]
      max_age_in_seconds = "600"
    }
  }
}

Expected Behaviour

Apply complete! Resources: 2 added, 0 changed, 0 destroyed.

Actual Behaviour

Error: Error updating Azure Storage Account `blob_properties` "examplesa": storage.BlobServicesClient#SetServiceProperties: Failure sending request: StatusCode=409 -- Original Error: autorest/azure: Service returned an error. Status
=<nil> Code="FeatureNotSupportedForAccount" Message="LastAccessTimeBasedTracking is not supported for the account."

  on main.tf line 24, in resource "azurerm_storage_account" "sa":
  24: resource "azurerm_storage_account" "sa" {

Steps to Reproduce

  1. terraform apply

Important Factoids

We used that setup for about 3 weeks but since Monday (May 24, 2021), the error above occurs. To reproduce the problem you need to setup is_hns_enabled = true together with the blob_properties block.

The problem occurs only with provider version >=2.57.0 and seems related to the PR #11301.

References

@TPPWC
Copy link

TPPWC commented May 27, 2021

We face the same problem. We are working with Modules:

dynamic "delete_retention_policy" {
      for_each = var.blob_delete_retention_policy != 0 ? [1] : []
      content {
        days = var.blob_delete_retention_policy
      }
    }

We are deploying to west europe.

kr

tom

@yriveiro
Copy link

We face the same problem. We are working with Modules:

dynamic "delete_retention_policy" {
      for_each = var.blob_delete_retention_policy != 0 ? [1] : []
      content {
        days = var.blob_delete_retention_policy
      }
    }

We are deploying to west europe.

kr

tom

Same configuration, same version, same bug.

katbyte pushed a commit that referenced this issue Jun 2, 2021
…y` are not supported in AzureUSGovernment (#11960)

FIx #11772
#11853

--- PASS: TestAccStorageAccount_blobProperties_containerAndLastAccessTimeDisabled (252.05s)
@katbyte katbyte modified the milestones: v2.62.0, v2.63.0 Jun 2, 2021
@sschmeck
Copy link
Contributor Author

sschmeck commented Jun 4, 2021

Fixed with version 2.62.0. Thanks, @yupwei68.

@sschmeck sschmeck closed this as completed Jun 4, 2021
@ghost
Copy link

ghost commented Jun 11, 2021

This has been released in version 2.63.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.63.0"
}
# ... other configuration ...

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants