201-confidential-os-disk patch (#141)

* add default value for variables; add random string for rgn
This commit is contained in:
Dingjia Chen
2023-02-09 20:14:32 -06:00
committed by GitHub
parent dd30e9384e
commit 6baa9203b7
4 changed files with 19 additions and 6 deletions

View File

@ -6,12 +6,12 @@ data "azurerm_platform_image" "example" {
}
resource "azurerm_resource_group" "example" {
name = "${var.name_prefix}-rg"
name = "${random_pet.rg_name.id}-rg"
location = var.location
}
resource "azurerm_managed_disk" "example" {
name = "${var.name_prefix}-disk"
resource "azurerm_managed_disk" "main" {
name = "${random_pet.rg_name.id}-disk"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
storage_account_type = "Standard_LRS"
@ -22,3 +22,7 @@ resource "azurerm_managed_disk" "example" {
security_type = "ConfidentialVM_DiskEncryptedWithPlatformKey"
}
resource "random_pet" "rg_name" {
prefix = var.name_prefix
}