terraform-provider-azurerm
terraform-provider-azurerm copied to clipboard
Error thrown CannotMixIPBasedAddressesAndIPConfigurationsOnLoadBalancerBackendAddressPool when using azurerm_network_interface_backend_address_pool_association
Is there an existing issue for this?
- [X] I have searched the existing issues
Community Note
- Please vote on this issue by adding a :thumbsup: reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, 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.
Terraform Version
1.8.3
AzureRM Provider Version
3.103.1
Affected Resource(s)/Data Source(s)
azurerm_network_interface_backend_address_pool_association
Terraform Configuration Files
This Gist shows a minimal reproduction of the error: https://gist.github.com/ashleysommer/7a9d62eb3dbc770118e95d4d963da940
Debug Output/Panic Output
Error: updating Backend Address Pool Association for Network Interface: (Name "nic-1" / Resource Group "minimal_rg"): network.InterfacesClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="CannotMixIPBasedAddressesAndIPConfigurationsOnLoadBalancerBackendAddressPool" Message="Mixing backend ipconfigurations and IPAddresses in backend pool /subscriptions/f9226acc-94d1-46a8-af99-88fb2757df4a/resourceGroups/minimal_rg/providers/Microsoft.Network/loadBalancers/lb-1/backendAddressPools/lb-backend-pool-1 is not allowed." Details=[]
│
│ with azurerm_network_interface_backend_address_pool_association.my_nic_address_pool,
│ on main.tf line 132, in resource "azurerm_network_interface_backend_address_pool_association" "my_nic_address_pool":
│ 132: resource "azurerm_network_interface_backend_address_pool_association" "my_nic_address_pool" {
This Gist contains the relevant debug output: https://gist.github.com/ashleysommer/4a6767bd3b774eebb2b3f7718926e850
Expected Behaviour
I'm trying to assign my VM's NIC to a Load-Balancer Backend Address Pool using azurerm_network_interface_backend_address_pool_association
, I followed the docs for azurerm_network_interface_backend_address_pool_association
as well as other example implementations and guides, I believe I've configured it correctly.
Actual Behaviour
Azure fails to associate the NIC to the Load-balancer's Backend Address Pool.
Code="CannotMixIPBasedAddressesAndIPConfigurationsOnLoadBalancerBackendAddressPool" Message="Mixing backend ipconfigurations and IPAddresses in backend pool /subscriptions/f9226acc-94d1-46a8-af99-88fb2757df4a/resourceGroups/minimal_rg/providers/Microsoft.Network/loadBalancers/lb-1/backendAddressPools/lb-backend-pool-1 is not allowed."
The error indicates mixing IP-based addresses and IP Configurations on the LoadBalancer Backend Address Pool, however notice in the example I'm only adding a single item, that is a NIC IP Configuration to the Backend Address Pool.
Steps to Reproduce
Use minimal reproduction supplied, run terraform apply
.
Important Factoids
No response
References
Seems like a recent issue with the Azure backend? Searching google for "CannotMixIPBasedAddressesAndIPConfigurationsOnLoadBalancerBackendAddressPool" only shows hits starting from the last 3 days. Searching this issue tracker and other issue trackers shows no reference to this error being reported before.
This may be fixed by https://github.com/hashicorp/terraform-provider-azurerm/pull/25959 ?