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

Blocks of type "moved" not supported #1182

Closed
NishikaDeSilva opened this issue Mar 7, 2022 · 4 comments · Fixed by #1211
Closed

Blocks of type "moved" not supported #1182

NishikaDeSilva opened this issue Mar 7, 2022 · 4 comments · Fixed by #1211

Comments

@NishikaDeSilva
Copy link

Description

We get the following issue, when running Terrascan using the latest image accurics/terrascan:latest.

Unsupported block type; Blocks of type "moved" are not expected here

code segment:

moved {
  from = "some-attribute"
  to   = "another-attribute"
}

What I Did

$ /go/bin/terrascan scan --non-recursive -d platform -i terraform

2022-03-07T10:25:08.773Z	error	cli/run.go:135	scan run failed{error 26 0  1 error occurred:
	* failed to load terraform config dir '/xxx/yyy'. error from terraform:
/xxx/yyy/main.tf:1,1-6: Unsupported block type; Blocks of type "moved" are not expected here.
}
@AndreasMWalter
Copy link

Hiya just a question, should this issue be fixed @patilpankaj212 @Rchanger, still experiencing it in 1.14.0:

2022-04-07T13:32:54.440Z	warn	commons/load-dir.go:293	failed to build unified config. errors:
/mnt/runner-workdir/builds/pQ8m-TPT/4/REPO/.terraform/modules/infoblox/2_infoblox_vm.tf:16,1-6: Unsupported block type; Blocks of type "moved" are not expected here.
/mnt/runner-workdir/builds/pQ8m-TPT/4/REPO/.terraform/modules/infoblox/2_infoblox_vm.tf:20,1-6: Unsupported block type; Blocks of type "moved" are not expected here.
2022-04-07T13:32:54.451Z	error	cli/run.go:134	scan run failed{error 26 0  1 error occurred:
	* failed to build terraform allResourcesConfig
}

@patilpankaj212
Copy link
Contributor

Hello @AndreasMWalter, can you please let us know what was the command that you ran?

@AndreasMWalter
Copy link

AndreasMWalter commented Apr 19, 2022

Hello @AndreasMWalter, can you please let us know what was the command that you ran?

Running command: terrascan init; terrascan scan --skip-rules AC_AZURE_0389 -i terraform --use-terraform-cache --non-recursive --show-passed --output junit-xml -d .
image

@patilpankaj212
Copy link
Contributor

Hello @AndreasMWalter, apologies for the delayed response. Looks like we missed a case while skipping the terraform 1.x diagnostic errors. Can you please open a ticket explaining this scenario?
JFYI, we have not added support for terraform 1.x, but we are ignoring the 1.x specific errors and proceeding with static analysis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants