How to pass variables file in packer

I am wondering how can i pass the variables file in packer when building a custom linux image in azure,
I can easily build and create VMs using packer, i am thinking if i have to pass variables in other file then what is the best practice,

for ex i use terraform for my deployment, and teraform.tfvars contains the all the necessary stuff like app id and secret, and once you apply… boom,

is there any way i can use in similar way?

i integrated VSCODE with Terminal includes zsh,

any suggestions ?