How to refer to azure nsg in packer build


I am trying to create a RHEL image in azure by using packer build, where i need to open some specific rules (udp connection on 52311 port). Currently my packer build is only referring to a existing V-net. While running the build it is creating a temporaty NIC which has a temporary azure NSG. Kindly suggest if there is any way where i can alter the packer setting to attach a specific NSG to the VM that packer is building.

Thank you.