How to config vm_agent_platform_updates_enabled false?

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!

What do you mean by this @kyo-hyun ? I can see the vm_agent_platform_updates_enabled is set to false as what you’ve configured in the Terraform config.

1 Like

Sorry, I didn’t explain it well.
What I mean is that in Terraform, it seems to be created with false, but when I check in Azure, the option is actually set to true.
I definitely set it to false, but somehow it’s still true.

But it’s resolved now. I think it was probably a version issue.
Anyway thanks for your response!