Comments (10)
Hi @netflash, Thanks for your bug report.
This problem seems to be occurring in external packages. I have released v0.4.1, which updated the external packages to the latest version. Please try this.
not sure if I need to attach anything else to help debugging this
Please use --debug
options :)
from tflint.
Thanks, @wata727.
Still doesn't work (version updated)
$ make lint
TF_VAR_datadog_api_key="qwe" tflint --debug
DEBUG:/loader.go:120 [INFO] Load environment...
DEBUG:/loader.go:128 [ERROR] open .terraform/environment: no such file or directory
DEBUG:/loader.go:131 [INFO] Load tfstate...
DEBUG:/loader.go:135 [ERROR] stat terraform.tfstate: no such file or directory
DEBUG:/loader.go:141 [INFO] Remote state detected
DEBUG:/loader.go:161 [INFO] Load tfvars...
DEBUG:/loader.go:164 [INFO] Load `terraform.tfvars`
DEBUG:/loader.go:166 [ERROR] stat terraform.tfvars: no such file or directory
DEBUG:/loader.go:191 [INFO] Load HCL file: `aws.tf`
DEBUG:/loader.go:53 [INFO] Load HCL file: `aws.tf`
DEBUG:/loader.go:191 [INFO] Load HCL file: `datadog.tf`
DEBUG:/loader.go:53 [INFO] Load HCL file: `datadog.tf`
DEBUG:/loader.go:191 [INFO] Load HCL file: `global.tf`
DEBUG:/loader.go:53 [INFO] Load HCL file: `global.tf`
DEBUG:/loader.go:191 [INFO] Load HCL file: `remote.tf`
DEBUG:/loader.go:53 [INFO] Load HCL file: `remote.tf`
DEBUG:/loader.go:191 [INFO] Load HCL file: `variables.tf`
DEBUG:/loader.go:53 [INFO] Load HCL file: `variables.tf`
Panic: interface conversion: interface {} is int, 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(449)
-> 5: github.com/wata727/tflint/vendor/github.com/hashicorp/hil.(*evalVisitor).visit: /eval.go(215)
-> 6: github.com/wata727/tflint/vendor/github.com/hashicorp/hil.(*evalVisitor).(github.com/wata727/tflint/vendor/github.com/hashicorp/hil.visit)-fm: /eval.go(175)
-> 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(175)
-> 9: github.com/wata727/tflint/vendor/github.com/hashicorp/hil.internalEval: /eval.go(153)
-> 10: github.com/wata727/tflint/vendor/github.com/hashicorp/hil.Eval: /eval.go(52)
-> 11: github.com/wata727/tflint/evaluator.(*Evaluator).Eval: /evaluator.go(72)
-> 12: github.com/wata727/tflint/evaluator.(*Evaluator).evalModuleAttr: /module.go(44)
-> 13: github.com/wata727/tflint/evaluator.(*Evaluator).initModule: /module.go(24)
-> 14: github.com/wata727/tflint/evaluator.NewEvaluator: /evaluator.go(39)
-> 15: github.com/wata727/tflint/detector.NewDetector: /detector.go(89)
-> 16: main.(*CLI).Run: /cli.go(116)
-> 17: main.main: /main.go(30)
-> 18: runtime.main: /proc.go(185)
-> 19: runtime.goexit: /asm_amd64.s(2197)
TFLint crached... :(
Please attach an output log, describe the situation and version that occurred and post an issue to https://github.com/wata727/tflint/issues
make: *** [lint] Error 2
from tflint.
Umm... It seems to be occurring when evaluating the attributes of a module. But I don't know how to reproduce it.
If there is a module that uses interpolation syntax in the templates, can you show it?
from tflint.
@toddmichael hey mate, need some assistance here.
how can I share that module ?
from tflint.
@netflash, not sure which module, but I'm generally fine provided nothing sensitive (and there shouldn't be). Are we talking about just sharing for debugging purposes or do we need to open source the module and make public? Even there, this is something we're working toward so it's worth it to prioritize if it helps @wata727 help us.
from tflint.
I had the same issue, I narrowed it down to where I'd set a variable to "default = 1" and then was using it as "${var.name}" with quotes. That would explain the "is int not string" error message. As soon as I changed the default to be "1" rather than 1 it didn't crash
from tflint.
Oh... Thanks, @sidick. I noticed that I had made a very basic mistake.
I will fix this problem soon. please wait a moment.
from tflint.
@netflash @sidick I've fixed this bug and released v0.4.2. Please try again.
from tflint.
Problem sovled, thank you!
from tflint.
Yep, fixed here too, thanks
from tflint.
Related Issues (20)
- Add support for Github auth token via environment variable HOT 1
- tflint does not recognise `removed` blocks
- Allow plugins located on github.com and GHES to be installed at once as an authenticated request HOT 2
- String interpolation passed as a list HOT 1
- Sarif output should use the final schema version HOT 2
- The latest version don't use the last version of the tflint-ruleset-azurerm
- Terraform 1.8.x builtin functions break tflint syntax parsing HOT 2
- Support monorepo release versions for plugins HOT 1
- Clarify license notices HOT 2
- BUSL-1.1 licensed code found in tflint HOT 2
- Allow use of `--chdir` and `--recursive` together HOT 1
- Add source Attribute to Checkstyle Format HOT 1
- Add python3.12 lambda runtime HOT 1
- tflint does not recognise ".tf" files at the root of the folder HOT 1
- Error when var file includes undeclared variables HOT 7
- Add support for Terraform v1.9
- Add support for evaluating static module outputs
- tflint --recursive --call-module-type=all cannot find nested local modules
- Race condition on circular dependency check when using parallel workers HOT 3
- foo = "bar"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tflint.