Skip to content

Commit

Permalink
Merge pull request #55 from naikpriti/patch1
Browse files Browse the repository at this point in the history
add container_delete_retention_policy
  • Loading branch information
jhisc authored Sep 30, 2022
2 parents 5df0ee9 + 51d573e commit caa307e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ resource "azurerm_storage_account" "sa" {
days = var.blob_delete_retention_days
}
}

dynamic "container_delete_retention_policy" {
for_each = (var.container_delete_retention_days == 0 ? [] : [1])
content {
days = var.container_delete_retention_days
}
}

dynamic "cors_rule" {
for_each = (var.blob_cors == null ? {} : var.blob_cors)
content {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,9 @@ variable "blob_versioning_enabled" {
type = bool
default = false
}

variable "container_delete_retention_days" {
description = "Retention days for deleted container. Valid value is between 1 and 365 (set to 0 to disable)."
type = number
default = 7
}

0 comments on commit caa307e

Please sign in to comment.