How to define network interface in Packer with Azure deployment

Would like to force Packer to use a pre-defined NIC (Network interface) created in Azure.
What is the correct attribute to use

Seeing the following errors…

  • An argument named “network_interface” is not expected here.
  • An argument named “network_interfaces” is not expected here.

** The pre-defined NIC was attached to public IP address and hoping that Packer can use the pre-defined NIC that will already be associated the public IP address **

Packer template looked like the following…

source “azure-arm” “example_build” {

*****

network_interface = “xxxxxx” # which was pre-created in Azure that was associated with
public-ip-address

*****



}