Azure ARM packer builder ALWAYS configures a public IP on packer VM and does not use provided values

Even after providing values for the following variables in the Azure packer template
“virtual_network_name”
“virtual_network_subnet_name”
“virtual_network_resource_group_name”,
Packer does not use these values and instead dynamically creates a resourcegroup, vnet and subnet for the packer VM. This results in assignment of a public IP on packer VMs which is undesirable. I am using packer version 1.5.3. This seems like a bug. Any ideas ?

Hello there,
Assuming the private_virtual_network_with_public_ip is not set here, this sounds like a bug; please try with Packer’s latest version and open a new issue if the problem persists, we have a few Azure people committing to Packer every now and then, we should be able to help you more there. :slight_smile:

private_virtual_network_with_public_ip is NOT set.

Tried latest packer version 1.6.4. The problem persists.

Hello, rahulsen! I have the same issue, I saw in the Packer’s repo, that you have already created the same issue and it was solved, but I’m still facing the same issue. I specified all required parameters:
“build_resource_group_name”: “my_resource_group”,
“virtual_network_name” : “my_vn_name”,
“virtual_network_resource_group_name”: “my_resource_group”,
“virtual_network_subnet_name”: “SubnetName”

But I have an issue: Timeout waiting for SSH.
I’ve already downloaded the latest Packer 1.6.5 version, but still no luck.

Please advise if you have a working solution for it.
Thanks!

1 Like