terrascan icon indicating copy to clipboard operation
terrascan copied to clipboard

Missing support for Terraform import blocks

Open HorizonNet opened this issue 1 year ago • 5 comments

Description

Terraform 1.5 introduced the import block. Using this kind of block leads to the following error in Terrascan

/github/workspace/imports.tf:1,1-7: Unsupported block type; Blocks of type "import" are not expected here.

Expectation would be that Terrascan does not throw an error and handles the import block as part of Terraform.

What I Did

Add an import block like the following

import {
  to = aws_instance.example
  id = "i-abcd1234"
}

Run Terrascan or the terrascan-action. It leads to the error mentioned above.

HorizonNet avatar Jul 24 '23 14:07 HorizonNet

Experience same issue

stefenAMZ avatar Aug 18 '23 17:08 stefenAMZ

+1

cgreen-q-wow avatar Dec 03 '23 23:12 cgreen-q-wow

Experiencing the same issue

cwsaunders avatar Feb 26 '24 15:02 cwsaunders

+1

jplanckeel-ep avatar May 02 '24 09:05 jplanckeel-ep

+1

shanrong6 avatar Jun 18 '24 22:06 shanrong6