Skip to content

ip_configuration change - #20

Open
Ned Bellavance (ned1313) wants to merge 1 commit into
Azure:masterfrom
ned1313:master
Open

ip_configuration change#20
Ned Bellavance (ned1313) wants to merge 1 commit into
Azure:masterfrom
ned1313:master

Conversation

@ned1313

Copy link
Copy Markdown

In reference to issue 19.
The 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. I've updated the main.tf with the change. The value isn't referenced in the variables, so this doesn't really need to be surfaced up to the end user.

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.
Ned Bellavance (ned1313) added a commit to ned1313/terraform-azurerm-vmss-cloudinit that referenced this pull request Nov 14, 2018
This is the same issue referenced in the pull [request](Azure/terraform-azurerm-computegroup#20)

The ip_configuration now requires a primary setting.

@josem0287 Jose Mendoza (josem0287) left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested the new configuration and it works. Without it, the deployment fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants