stelligent / config-lint

Command line tool to validate configuration files
https://stelligent.github.io/config-lint/#/
MIT License
198 stars 39 forks source link

Support moved block syntax from Terraform 1.1 #224

Open theirix opened 2 years ago

theirix commented 2 years ago

Terraform 1.1 introduces a new syntax element - moved block. Currently config-lint cannot parse files with this block.

Input file:

variable "vpc_id" {
  type = string
}

moved {
    from = "x"
    to = "y"
}

Error:

[
  {
    "AssertionMessage": "x.tf:5,1-6: Unsupported block type; Blocks of type \"moved\" are not expected here.",
    "Category": "load",
    "CreatedAt": "2022-01-26T07:57:21Z",
    "Filename": "x.tf",
    "LineNumber": 0,
    "ResourceID": "x.tf",
    "ResourceType": "file",
    "RuleID": "FILE_LOAD",
    "RuleMessage": "Unable to load file",
    "Status": "FAILURE"
  }
]

Config-lint version: 1.1.0