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

tflint crashes when used with --deep #113

Closed
sarasonparas opened this issue Jun 2, 2017 · 2 comments
Closed

tflint crashes when used with --deep #113

sarasonparas opened this issue Jun 2, 2017 · 2 comments
Labels

Comments

@sarasonparas
Copy link

V.0.3.5 on MacOS Sierra, installed via brew.

Log output:

Panic: interface conversion: interface {} is *evaluator.Evaluator, not string
-> 0: main.main.func1: /main.go(17)
-> 1: runtime.call32: /asm_amd64.s(514)
-> 2: runtime.gopanic: /panic.go(489)
-> 3: runtime.panicdottype: /iface.go(172)
-> 4: github.com/wata727/tflint/vendor/github.com/hashicorp/hil.(*evalOutput).Eval: /eval.go(399)
-> 5: github.com/wata727/tflint/vendor/github.com/hashicorp/hil.(*evalVisitor).visit: /eval.go(207)
-> 6: github.com/wata727/tflint/vendor/github.com/hashicorp/hil.(*evalVisitor).(github.com/wata727/tflint/vendor/github.com/hashicorp/hil.visit)-fm: /eval.go(167)
-> 7: github.com/wata727/tflint/vendor/github.com/hashicorp/hil/ast.(*Output).Accept: /output.go(23)
-> 8: github.com/wata727/tflint/vendor/github.com/hashicorp/hil.(*evalVisitor).Visit: /eval.go(167)
-> 9: github.com/wata727/tflint/vendor/github.com/hashicorp/hil.internalEval: /eval.go(145)
-> 10: github.com/wata727/tflint/vendor/github.com/hashicorp/hil.Eval: /eval.go(52)
-> 11: github.com/wata727/tflint/evaluator.(*Evaluator).Eval: /evaluator.go(65)
-> 12: github.com/wata727/tflint/detector.(*Detector).evalToString: /detector.go(222)
-> 13: github.com/wata727/tflint/detector.(*AwsInstanceInvalidAMIDetector).Detect: /aws_instance_invalid_ami.go(47)
-> 14: runtime.call64: /asm_amd64.s(515)
-> 15: reflect.Value.call: /value.go(434)
-> 16: reflect.Value.Call: /value.go(302)
-> 17: github.com/wata727/tflint/detector.(*Detector).detect: /detector.go(216)
-> 18: github.com/wata727/tflint/detector.(*Detector).Detect: /detector.go(170)
-> 19: main.(*CLI).Run: /cli.go(116)
-> 20: main.main: /main.go(30)
-> 21: runtime.main: /proc.go(185)
-> 22: runtime.goexit: /asm_amd64.s(2197)

TFLint crached... :(

////////////
It crashes on this minimalistic terraform file:

module "saras_ec2" {
ami = "${module.first_ima.id}"
name = "saras_ec2"
instance_type = "t2.nano"
subnet_id = "${module.first_private_subnet.id}"
source = "./modules/ec2"
security_groups = "${module.first_sg.id}"
}
////////////
It works fine without the --deep option, and provides this output for the same file:

./modules/ec2/main.tf
NOTICE:35 "iam_instance_profile" is not specified. If you want to change it, you need to recreate instance. (Only less than Terraform 0.8.8)

Result: 1 issues (0 errors , 0 warnings , 1 notices)

@wata727
Copy link
Member

wata727 commented Jun 5, 2017

@sarasonparas Thanks for your bug report :)
I've fixed this issue and released new version. Please try it.

@sarasonparas
Copy link
Author

@wata727 Thanks for the quick fix, it works very well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants