Restructure into modules to enable persistent disk
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user