Skip to content

Conversation

jschoewe
Copy link
Contributor

After upgrading to Terraform 12, I was getting the following error when running plan/apply:

Error: Argument or block definition required

  on /tmp/tmpcSY9YL line 1:
   1: <input variables dict>

An argument or block definition is required here.

After more testing I found that Terraform 12 no longer accepts variable definition files without an extension. This change fixes that problem and has no effect on Terraform versions < 12.

https://www.terraform.io/docs/configuration/variables.html#variable-definitions-tfvars-files

Steps to reproduce this problem:

  1. Upgrade to Terraform 12 (still in Beta)
    https://www.terraform.io/upgrade-guides/0-12.html
  2. Save a json object in a file with no extension
  3. Run terraform plan with that var-file as an input

@beelit94 beelit94 merged commit c46560e into beelit94:develop May 31, 2019
@beelit94
Copy link
Owner

nice work, thank you @jschoewe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants