Can we create virtual machine in existing/specific vnet

Can we create virtula machine in existing/specific vnet

I know in the backend VM gets created while creating the images using packer
can we make sure to create that VM in existing virtual network?
if yes where exactly we need to supply below details in the packer HCL file? is it in the source section or provisoners section?

“virtual_network_name”: “packerpoc”,
“virtual_network_resource_group_name” : “packerpoc”,
“virtual_network_subnet_name” : “packerpoc”,