1
votes

i am using a key called "zones" while creating an azure vm using the resource "azurerm_virtual_machine". I am using terraform version 0.11.13. According to the docs, "zones" key is allowed. https://www.terraform.io/docs/providers/azurerm/r/virtual_machine.html

But when i run "terraform plan", i see the following error: Error: azurerm_virtual_machine.testVM[4]: : invalid or unknown key: zones

Verified if i am using the key "zones" for the correct resource type and it looks okay according to hashicorp docs

resource "azurerm_virtual_machine" "testVM" {
  <code to create VM>
  zones                         = ["1"]
}
1

1 Answers

0
votes

you need to update your azurerm provider to the latest version. this is not something terraform handles directly, resource provider does that. I think you could do that by deleting the "internal" tf folder and running tf init.