config-lint icon indicating copy to clipboard operation
config-lint copied to clipboard

Support moved block syntax from Terraform 1.1

Open theirix opened this issue 2 years ago • 0 comments

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

theirix avatar Jan 26 '22 07:01 theirix