Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ip_configuration requires primary field #19

Open
ned1313 opened this issue Nov 13, 2018 · 1 comment
Open

ip_configuration requires primary field #19

ned1313 opened this issue Nov 13, 2018 · 1 comment

Comments

@ned1313
Copy link

ned1313 commented Nov 13, 2018

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.

@dduleep
Copy link

dduleep commented Oct 23, 2019

same issue here

Error: Missing required argument

  on .terraform/modules/computegroup/Azure-terraform-azurerm-computegroup-354b05c/main.tf line 71, in resource "azurerm_virtual_machine_scale_set" "vm-linux":
  71:     ip_configuration {

The argument "primary" is required, but no definition was found.

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

No branches or pull requests

2 participants