Enhance Azure Storage Account module with additional variables and blob data protection features
This commit is contained in:
29
main.tf
29
main.tf
@@ -24,6 +24,35 @@ resource "azurerm_storage_account" "this" {
|
||||
public_network_access_enabled = var.public_network_access_enabled
|
||||
min_tls_version = "TLS1_2"
|
||||
|
||||
blob_properties {
|
||||
versioning_enabled = var.enable_blob_versioning
|
||||
change_feed_enabled = var.enable_blob_change_feed
|
||||
|
||||
dynamic "delete_retention_policy" {
|
||||
for_each = var.enable_blob_soft_delete ? [1] : []
|
||||
|
||||
content {
|
||||
days = var.blob_soft_delete_retention_days
|
||||
}
|
||||
}
|
||||
|
||||
dynamic "container_delete_retention_policy" {
|
||||
for_each = var.enable_container_soft_delete ? [1] : []
|
||||
|
||||
content {
|
||||
days = var.container_soft_delete_retention_days
|
||||
}
|
||||
}
|
||||
|
||||
dynamic "restore_policy" {
|
||||
for_each = var.enable_point_in_time_restore_for_containers ? [1] : []
|
||||
|
||||
content {
|
||||
days = var.point_in_time_restore_days
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tags = var.tags
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user