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 change #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

ip_configuration change #20

wants to merge 1 commit into from

Conversation

ned1313
Copy link

@ned1313 ned1313 commented Nov 13, 2018

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.
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.
Copy link

@josem0287 josem0287 left a comment

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