F5Networks / terraform-azure-bigip-module

Terraform module for Deploying BIG-IP in azure
Apache License 2.0
10 stars 23 forks source link

Mgmt Nic error during "apply" #63

Closed sandevc closed 3 months ago

sandevc commented 7 months ago

Hi, When trying to deploy 2 x instances get the below error which basically says that the private ip on the mgmt Nic is already allocated to another instance. Seems like it's not looping and assigning the next ip to vm02. (I already changed the instance_count to 2 in the variables.tf file)

__Network Interface Name: "tf-azure-bigip-3nic-a26f-mgmt-nic-0"): performing CreateOrUpdate: unexpected status 400 with error: PrivateIPAddressIsAllocated: IP configuration /subscriptions/8cb11dae-d73f-4728-95d2-cf9acd785e30/resourceGroups/tf-azure-bigip-rg-a022/providers/Microsoft.Network/networkInterfaces/tf-azure-bigip-3nic-a26f-mgmt-nic-0/ipConfigurations/tf-azure-bigip-3nic-a26f-mgmt-ip-0 is using the private IP address 10.2.1.5 which is already allocated to resource /subscriptions/8cb11dae-d73f-4728-95d2-cf9acd785e30/resourceGroups/tf-azure-bigip-rg-a022/providers/Microsoft.Network/networkInterfaces/tf-azure-bigip-3nic-50ab-mgmt-nic-0/ipConfigurations/tf-azure-bigip-3nic-50ab-mgmt-ip-0. │ │ with module.bigip[0].azurerm_network_interface.mgmt_nic[0], │ on ../../main.tf line 299, in resource "azurerm_network_interface" "mgmt_nic": │ 299: resource "azurerm_network_interface" "mgmt_nic" { │__

pgouband commented 7 months ago

Hi,

Thanks for reporting. Added to the backlog and internal tracking ID for this request is: INFRAANO-1507.

RavinderReddyF5 commented 6 months ago

Hi @sandevc, I think you might be passed static ip in your scenario? may be you should try get assigning dynamic assignment of IPs as provided in example here: https://github.com/F5Networks/terraform-azure-bigip-module/blob/main/examples/bigip_azure_3nic_deploy/main.tf#L50-L64

RavinderReddyF5 commented 3 months ago

HI @sandevc, please open new issue if issue still persist