You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.
Hard to share the entire log, too much info to obfuscate, but this is the main problem... the second execution of a plan shows that the ips added by the listener to the VM NICs will be removed:
# azurerm_network_interface.wvm_nic1 will be updated in-place~ resource "azurerm_network_interface""wvm_nic1" {
id = "xxxxx"
name = "nic1"# (13 unchanged attributes hidden)
- ip_configuration {
- name = "myaglistener-79cac856" -> null
- primary = false -> null
- private_ip_address = "10.0.1.99" -> null
- private_ip_address_allocation = "Static" -> null
- private_ip_address_version = "IPv4" -> null
- subnet_id = "xxxxx" -> null
}
# (1 unchanged block hidden)
}
# azurerm_network_interface.wvm_nic2 will be updated in-place~ resource "azurerm_network_interface""wvm_nic2" {
id = "xxxxx"
name = "nic2"# (13 unchanged attributes hidden)
- ip_configuration {
- name = "myaglistener-a2a725ab" -> null
- primary = false -> null
- private_ip_address = "10.1.3.99" -> null
- private_ip_address_allocation = "Static" -> null
- private_ip_address_version = "IPv4" -> null
- subnet_id = "xxxxxxx" -> null
}
# (1 unchanged block hidden)
}
Expected Behaviour
If no configs are done to the code, the second planning (and any subsequent planning) of the cluster configuration should say that there are no changes and the applies therefore should say that there were no infrastructure changes done.
Actual Behaviour
The listener IP configuration introduced in the VM (DB node) NIC by the azurerm_mssql_virtual_machine_availability_group_listener resource are removed because they are not part of the VM state, these only appear in the state of the listener resource.
Steps to Reproduce
terraform plan
terraform apply
terraform plan
Important Factoids
Nothing atypical but a few comments: Assumption: You have a managed adds domain (or a traditional AD) already created. Important Note: Both users VM local and AD, are admin and domain admin respectively, to simplify the always on creation process. Another thing I tied: Added explicitly a new ip config to each VM expecting that the listener resource uses them since they already exist, but no, the listener literally creates the ip config and adds it to the VM, so if I do this, there is an error indicating that the listener tried to allocate an IP that is not available.
References
No response
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Community Note
Terraform Version
1.7.0
AzureRM Provider Version
3.107
Affected Resource(s)/Data Source(s)
azurerm_network_interface, azurerm_mssql_virtual_machine_group, azurerm_mssql_virtual_machine_availability_group_listener
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
If no configs are done to the code, the second planning (and any subsequent planning) of the cluster configuration should say that there are no changes and the applies therefore should say that there were no infrastructure changes done.
Actual Behaviour
The listener IP configuration introduced in the VM (DB node) NIC by the azurerm_mssql_virtual_machine_availability_group_listener resource are removed because they are not part of the VM state, these only appear in the state of the listener resource.
Steps to Reproduce
terraform plan
terraform apply
terraform plan
Important Factoids
Nothing atypical but a few comments: Assumption: You have a managed adds domain (or a traditional AD) already created. Important Note: Both users VM local and AD, are admin and domain admin respectively, to simplify the always on creation process. Another thing I tied: Added explicitly a new ip config to each VM expecting that the listener resource uses them since they already exist, but no, the listener literally creates the ip config and adds it to the VM, so if I do this, there is an error indicating that the listener tried to allocate an IP that is not available.
References
No response
The text was updated successfully, but these errors were encountered: