My company has strict policies around SSH to VMs running in Azure. I’m trying to use the AzureRM provisioner to create images, but I’m getting stuck when the SSH connection is attempted. I have added the VM to an existing subnet and vnet, which gives me the necessary connectivity to get electrons from where I’m running Packer to the VM that is being built, but firewall restrictions are blocking port 22.
Is it possible to attach an existing NIC to the VM, instead of using a new one, so I can essentially reuse the same IP address every time? This would allow my security team to open port 22 to a specific destination.