user3482804
user3482804

Reputation: 221

Terraform -var-file not working for file present in the same directory

I am trying to pass file name as command Line argument and following the examples i found on internet. following is the command i am using :

terraform plan -var-file=cert.tf

and get the following error:

invalid value "cert" for flag -var-file: Error reading cert: open cert: The system cannot find the file specified

Cert.tf is present in the same path where i am executing the command. Has anyone else experienced this ?

Upvotes: 1

Views: 1338

Answers (1)

mcheshier
mcheshier

Reputation: 745

Your variables file needs to have the .tfvars extension.

Upvotes: 2

Related Questions