question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

terraform.tfvars An argument named "xxx" is not expected here.

See original GitHub issue

I am having the following problem/false postive reported by the vscode-terraform extension for all variables defined in terraform.tfvars files:

An argument named "XXX" is not expected here.

image

Is there a setting I can set in settings.json to prevent the extension from checking for this in all terraform.tfvars files? Is there a way to know what rule/check of the vscode-terraform extension is triggering this?

My vscode settings for the terraform extension are as follow:

    "terraform.path": "/usr/local/bin/terraform",
    "terraform.codelens.enabled": true,
    "terraform.format": {
        "ignoreExtensionsOnSave": [
            ".tfsmurf"
        ]
    },
    "terraform.languageServer": {
        "enabled": true,
        "args": []
    },
    "terraform.indexing": {
        "enabled": false,
        "liveIndexing": false,
        "delay": 500,
        "exclude": [
            ".terraform/**/*",
            "**/.terraform/**/*"
        ]
    },
    "[terraform]": {
        "editor.formatOnSave": true,
    },
    "terraform.telemetry.enabled": false,
}

Thanks.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:28
  • Comments:24 (1 by maintainers)

github_iconTop GitHub Comments

23reactions
oswalyacommented, Oct 10, 2019

I have the same behaviour and was also not able to figure out what is causing this. Any help appreciated!

12reactions
AaronNBrockcommented, Feb 11, 2020

I understand this this problem is related to the language server, however would it be possible to get a work around of having the language server disabled just for files of type *.tfvars?

(admittedly I don’t have a good understanding of language servers, so maybe this question doesn’t make sense)

Read more comments on GitHub >

github_iconTop Results From Across the Web

An argument named "xxx" is not expected here. Terraform ...
I have the variables.tf on the root module with the values. ... │ An argument named "name" is not expected here. ... │...
Read more >
Trying to use modules, getting Error: Unsupported argument ...
An argument named "nr_account_id" is not expected here ... terraform/terraform.tfvars nr_account_id = xxx nr_api_key = "NRAK-xxx" ...
Read more >
An argument named "" is not expected here. : r/Terraform
An argument named "" is not expected here. Hi,. I have the following code in terraform basically, invoke a module and pass arguments:....
Read more >
unsupported argument in module when running terraform plan ...
An argument named "XXX" is not expected here. Did you mean to define a block of type "XXX"? Generally means the = (equals...
Read more >
hashicorp-terraform/Lobby - Gitter
... but it says "An argument named 'configuration_info' is not expected here. ... Any Set-Item WSMan:\localhost\Client\TrustedHosts -Value 'X.X.X.X' -Force ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found