Hi teams!
I’m stuyding Terraform with azure.
but there is one problem.
I have been deploying azure windows vm with terraform.
I want to config azurerm_windows_virtual_machine option “false”.
but it doesn’t config.
what do I do?
below is my code
resource "azurerm_network_interface" "nic" {
name = "NIC-test"
location = "koreacentral"
resource_group_name = "RG-rygus-terraform"
accelerated_networking_enabled = true
ip_configuration {
name = "Ipconfiguration-test"
subnet_id = module.vnet["terraform_vnet"].get_subnet_id["sub1"]
private_ip_address_allocation = "Static"
private_ip_address = "10.0.1.22"
public_ip_address_id = null
}
}
resource "azurerm_windows_virtual_machine" "vm_windows" {
name = "khkim-test"
resource_group_name = "RG-rygus-terraform"
location = "koreacentral"
size = "Standard_E2s_v4"
admin_username = "rygus"
admin_password = "test123456!@#"
network_interface_ids = [azurerm_network_interface.nic.id]
timezone = "Korea Standard Time"
enable_automatic_updates = false
patch_mode = "Manual"
vm_agent_platform_updates_enable = false
os_disk {
name = "OSDISK-test"
caching = "ReadWrite"
storage_account_type = "Standard_LRS"
}
source_image_reference {
publisher = "MicrosoftWindowsServer"
offer = "WindowsServer"
sku = "2016-datacenter"
version = "latest"
}
}
Thank you!