Are Azure's storage account blob settings still being used in Terraform?

Hey,

I’m trying to automate our Storage Accounts in Azure using Terraform, particularly the option for soft delete and its retention. I managed to find this: https://github.com/terraform-providers/terraform-provider-azurerm/issues/1070 and that the feature was merged in version 1.40.0

Thus I tried something as per the below:

resource "azurerm_storage_account_blob_settings" "testsabs" {
  resource_group_name        = "${azurerm_resource_group.testrg.name}"
  storage_account_name       = "${azurerm_storage_account.testsa.name}"
  enable_soft_delete         = true
  soft_delete_retention_days = 99

But when trying to plan I get the following :

The provider provider.azurerm does not support resource type
“azurerm_storage_account_blob_settings”.

I am using version 1.44.0 of Azurerm and Terraform version 0.12.29

Any assistance appreciated.

Thanks

J

Hello J,

what you probably want to do is define a blob_properties block and then a delete_retention_policy block and specify the number of days to retain a blob after deletion.

References:
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_account#blob_properties