Override -var-file with -var in terraform plan script

I have a script that is running terraform plan with some form of

-var “foobar=value” \

I want my “foobar=value” to override the value in common.json and I thought that is what would happen based on ordering. I have have had success with this using “packer build” and I thought terraform was the same. Is there a way to make this work?

Hi @jkprudhomme,

Indeed, later arguments on the command line should override the effects of earlier arguments. If that doesn’t match what you’re seeing, it’d help if you could share some additional context so we might try to figure out what’s going on in your case, and why it isn’t working as intended.