Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better user feedback for misformed tfvars files #269

Closed
robparrott opened this issue Sep 6, 2014 · 2 comments
Closed

Better user feedback for misformed tfvars files #269

robparrott opened this issue Sep 6, 2014 · 2 comments

Comments

@robparrott
Copy link

Currently, it appears that a misformed line in the tfvars file just results in a usage message for the terraform plan and terraform apply commands.

This is very confusing to the user, since there's no feedback on what the issue may be, in particular that the tfvars is problematic. and is compounded by the fact that your config file syntax look very close to other standards (i.e. INI for the tfvars files and a combination of JSON & YAML for the definition files) and so syntax "appears" correct.

For example, the AWS example with a line in the terraform.tfvars file that reads

key_name = "parrott-ec2"

works fine, but

key_name = parrott-ec2

prints out a usage message when terraform plan is run.

In addition, the quoting requirements for the variable literals are not the same when you set variables on the command line. So a string that works on the command line fails when copied into a TFVARS file.

At at minimum, an error in the tfvars parsing code should provide feedback that that file is malformed, if not the specific one that is in error.

@mitchellh
Copy link
Contributor

Agreed, this should be improved.

@mitchellh
Copy link
Contributor

Fixed!

@ghost ghost locked and limited conversation to collaborators May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants