Skip to content

Instantly share code, notes, and snippets.

@straubt1
Created February 20, 2020 14:03
Show Gist options
  • Save straubt1/501477f52423d41a701fe89e08cb3c38 to your computer and use it in GitHub Desktop.
Save straubt1/501477f52423d41a701fe89e08cb3c38 to your computer and use it in GitHub Desktop.
[Terraform] Azure Storage Account Soft Delete
resource "random_pet" "name" {
length = 3
separator = ""
}
resource "azurerm_resource_group" "example" {
name = random_pet.name.id
location = "centralus"
}
resource "azurerm_storage_account" "example" {
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
name = random_pet.name.id
account_tier = "Standard"
account_replication_type = "LRS"
blob_properties {
delete_retention_policy {
days = 7
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment