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

cli: Improved error for invalid -var "foo = bar" #30985

Merged
merged 1 commit into from May 30, 2022

Commits on May 3, 2022

  1. cli: Improved error for invalid -var "foo = bar"

    When specifying variable values on the command line, name-value pairs
    must be joined with an equals sign, without surrounding spaces.
    Previously Terraform would interpret "foo = bar" as assigning the value
    " bar" to the variable named "foo ". This is never valid, as variable
    names may not include whitespace.
    
    This commit looks for this specific error and returns a diagnostic with
    a suggestion for correcting it. We cannot simply trim whitespace,
    because it is valid to write "foo= bar" to assign the value " bar" to
    the variable "foo", as unlikely as it seems.
    alisdair committed May 3, 2022
    Copy the full SHA
    91d75ba View commit details
    Browse the repository at this point in the history