ip_configuration change - #20
Open
Ned Bellavance (ned1313) wants to merge 1 commit into
Open
Conversation
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.
laund
approved these changes
Apr 21, 2019
Daniel Mabbett (DanielMabbett)
approved these changes
May 1, 2019
Mohammad Chehab (mohammadchehab)
approved these changes
Nov 9, 2019
Jose Mendoza (josem0287)
approved these changes
Nov 13, 2019
Jose Mendoza (josem0287)
left a comment
There was a problem hiding this comment.
I've tested the new configuration and it works. Without it, the deployment fails.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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:
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.