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

Add allow_permanent_delete property to delete_retention_policy (azurerm_storage_account.blob_properties) #21830

Closed
1 task done
johnfsq opened this issue May 18, 2023 · 1 comment · Fixed by #25778
Closed
1 task done

Comments

@johnfsq
Copy link

johnfsq commented May 18, 2023

Is there an existing issue for this?

  • I have searched the existing issues

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

Description

This feature is required for being able to permanently delete blobs when soft delete and versioning are enabled. It can be found in the Azure Portal under the Data Protection section of a Storage Account.

az cli 2.48.1 shows this property via the command:
az storage account blob-service-properties show -n [storageaccount] -r [resourcegroup]

With this section in the output:

{
  ...
  "deleteRetentionPolicy": {
    "_allowPermanentDelete_": true,
    "days": 1,
    "enabled": true
  }
  ...
}

It can be set with:
az storage account blob-service-properties update --set deleteRetentionPolicy.allowPermanentDelete=true ...

New or Affected Resource(s)/Data Source(s)

azurerm_storage_account

Potential Terraform Configuration

resource "azurerm_storage_account" "example" {
  ...
  blob_properties {
    delete_retention_policy {
      allow_permanent_delete = true
    }
  }
}

References

https://learn.microsoft.com/en-us/cli/azure/storage/account/blob-service-properties?view=azure-cli-latest

favoretti added a commit to favoretti/terraform-provider-azurerm that referenced this issue Apr 27, 2024
Add `permanent_delete_enabled` to blob properties delete retention
policy.

Took over hashicorp#22109

Fixes hashicorp#21830
katbyte pushed a commit that referenced this issue May 6, 2024
* `azurerm_storage_account`: add `permanent_delete_enabled`

Add `permanent_delete_enabled` to blob properties delete retention
policy.

Took over #22109

Fixes #21830

* Fix typo

* Not for containers

* Refactor a bit more

* Refactor a bit more
@github-actions github-actions bot added this to the v3.103.0 milestone May 6, 2024
Copy link

github-actions bot commented Jun 6, 2024

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 Jun 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.