hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.52k stars 4.6k forks source link

Support for azurerm_recovery_services_vault Allow Soft delete retention period #25185

Open mpjtaylor opened 6 months ago

mpjtaylor commented 6 months ago

Is there an existing issue for this?

Community Note

Description

To allow adjusting his is the number of days for which deleted data is retained before being permanently deleted.

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

azurerm_recovery_services_vault

Potential Terraform Configuration

resource "azurerm_recovery_services_vault" "vault" {
  name                = "example-recovery-vault"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  sku                 = "Standard"

  soft_delete_enabled = true
  soft_delete_retention_days = 24
}

References

No response

mpjtaylor commented 2 months ago

anyone else looking for this i used azapi in the meantime:

resource "azapi_update_resource" "vault" { type = "Microsoft.RecoveryServices/vaults/backupconfig@2024-04-01" parent_id = azurerm_recovery_services_vault.vault.id name = "vaultconfig" body = { properties = { softDeleteRetentionPeriodInDays = var.soft_delete_retention_period_days } } }