Restructure into modules to enable persistent disk

This commit is contained in:
2025-10-04 16:57:12 +02:00
parent 3cfe796184
commit 8d2fc90a25
12 changed files with 253 additions and 194 deletions
+17
View File
@@ -0,0 +1,17 @@
resource "azurerm_resource_group" "rg" {
name = "${var.prefix}-persistent-rg"
location = var.location
}
resource "azurerm_managed_disk" "data_disk" {
name = "${var.prefix}-winvm-datadisk"
location = var.location
resource_group_name = azurerm_resource_group.rg.name
storage_account_type = "Premium_LRS"
create_option = "Empty"
disk_size_gb = var.datadisk_size_gb
lifecycle {
prevent_destroy = true
}
}