Forum Discussion

Michael447's avatar
2 months ago

Terraform vSocket 2-NIC Module issues

We are in the process of deploying a 2 NIC vSocket cluster in Azure with Terraform.
In doing so, we have encountered hurdles, some of which have been solved by  a newly published terraform module from cato:
https://github.com/catonetworks/terraform-cato-vsocket-azure-ha-vnet-2nic/

However, there is no 2-Nic module that only deploys the VSockets without deploying additional resources.
The current 2-NIC module does not allow resource groups or VNETs to be created, but other resources such as subnets, public IP, interfaces, NSG, routing tables etc. are still created.
This means that we have to take the module apart and adapt it to our requirements. However, we would like to be able to fall back on a standard module from CATO and not maintain a customized module.


Interestingly, this module is already available for the 3-NIC Solution:
https://github.com/catonetworks/terraform-cato-vsocket-azure/blob/main/main.tf (Standalone)
https://github.com/catonetworks/terraform-cato-vsocket-azure-ha/blob/main/main.tf (HA)

What we need is a 2-NIC module, which is analogous to the above without additional Azure resources deployed.

Furthermore, the 2-NIC module also limits which options can be used for the azurerm_linux_virtual_machine resource.
The following options are missing:

- Naming Convention (the option to use completely custom names for the vSockets)
- Use of availability zones

Is there any information on whether and when something like this is coming?

2 Replies

  • RobertG's avatar
    RobertG
    Icon for Cato Employee rankCato Employee

    Hi Michael,

    We have a few different areas and topics so I will try to break them down and answer the best I can, also the module has been through some major upgrades fixing some of your requests.
     
    There are specific limitations in the naming of the Azure resources and we build a custom name taking into account these limitations automatically using the site_name variable as a base.
     
    The new resource type azurerm_linux_virtual_machine is now in use and updated for this module.
    As you have stated there is the option to specify vnet and resource groups which are already created.
     
    Currently the use of custom naming in the module for vSocket is not possible and main reason for this is to allow the same functionality as our other deployment methods like the Marketplace. That being said if you only require custom naming for the vSocket resources, I am sure this can be added as part of a future update.
     
    In reference to the availability zones it seems the newest update emitted the use of these I will enquire why this may have happened and look to add them back again.
     
    The custom or changes in the discs is a different requirement as currently what we deploy is the only supported and tested type.
    I am more than happy to raise an RFE on your behalf so that different disk types can be used for specific requirements, but this is likely to be something that will take some time before it is available. It requires time and development from all areas of Cato, unlike the other discussed areas can be updated in the Terraform module as it is already a supported feature or use case.
     
    There is also discussions on the single 2nic vSocket but I also do not have any timeline for this currently.
     
    Please let me know if I have missed anything or you have any further follow ups.

    Thanks Rob

    • RobertG's avatar
      RobertG
      Icon for Cato Employee rankCato Employee

      Hi Michael,

      I have updated the module which includes the following to better align with the other deployment methods. 

      1. Availability zones.
      2. Custom naming option for Subnets, HA Identity, VM name and VM disks.
      3. Custom resource prefix.

      We are continuing to discuss the options for modular options for the 2nic deployments.

      Thanks Rob