From b57fb499ce66eaad09430d586013b1de409b59d1 Mon Sep 17 00:00:00 2001 From: Ned Bellavance Date: Tue, 13 Nov 2018 06:44:37 -0500 Subject: [PATCH] ip_configuration change he latest version of the virtual machine scale set resource requires the primary setting within the ip_configuration. The current main.tf has this: ` network_profile { name = "${var.network_profile}" primary = true ip_configuration { name = "IPConfiguration" subnet_id = "${var.vnet_subnet_id}" load_balancer_backend_address_pool_ids = ["${var.load_balancer_backend_address_pool_ids}"] } } ` And that fails on plan with the error: Error: module.computegroup.azurerm_virtual_machine_scale_set.vm-linux: "network_profile.0.ip_configuration.0.primary": required field is not set If I change the following to this: ` network_profile { name = "${var.network_profile}" primary = true ip_configuration { name = "IPConfiguration" subnet_id = "${var.vnet_subnet_id}" primary = true load_balancer_backend_address_pool_ids = ["${var.load_balancer_backend_address_pool_ids}"] } } ` The plan runs without error. --- main.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/main.tf b/main.tf index 4bcb317..2ecad66 100644 --- a/main.tf +++ b/main.tf @@ -71,6 +71,7 @@ resource "azurerm_virtual_machine_scale_set" "vm-linux" { ip_configuration { name = "IPConfiguration" subnet_id = "${var.vnet_subnet_id}" + primary = true load_balancer_backend_address_pool_ids = ["${var.load_balancer_backend_address_pool_ids}"] } }