fortinet/fortigate-terraform-deploy

Attempted to change size from "Standard_F4s" change to "Standard_F4s_v2"

Closed this issue · 1 comments

When attempting to change the VM size the Standard F4 size failed to update to Standard F4 v2 due to the number of NIC's allowed.

Error as follows.

Error: compute.VirtualMachinesClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="NetworkInterfaceCountExceeded" Message="The number of network interfaces for virtual machine fgt-b-vm-fgt exceeds the maximum allowed for the virtual machine size Standard_F4s_v2. The number of network interfaces is 4 and the maximum allowed is 2. " Details=[]
with azurerm_virtual_machine.fgt_b_vm
on 03-fortigate.tf line 470, in resource "azurerm_virtual_machine" "fgt_b_vm":
resource "azurerm_virtual_machine" "fgt_b_vm" {
Error: compute.VirtualMachinesClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="NetworkInterfaceCountExceeded" Message="The number of network interfaces for virtual machine vm-fgt-a exceeds the maximum allowed for the virtual machine size Standard_F4s_v2. The number of network interfaces is 4 and the maximum allowed is 2. " Details=[]
with azurerm_virtual_machine.fgt_a_vm
on 03-fortigate.tf line 281, in resource "azurerm_virtual_machine" "fgt_a_vm":
resource "azurerm_virtual_machine" "fgt_a_vm" {

Hi,

Standard F4 allows 4 network interfaces where as Standard_F4_v2 only allows 2 network interfaces. Hence, you would need to find an instance that support at least 4 network interfaces. As, that's is usually required for doing HA setup.

https://learn.microsoft.com/en-us/azure/virtual-machines/fsv2-series

Cheers