Closed ruzickap closed 1 year ago
It's because of secured env variables :/
Probably tflint fetches aws plugin from github.com ,and as we hide GITHUB_TOKEN he doesn't like it...
I'll make a fix to allow variables just for one linter !
@ruzickap once the PR will be merged & the beta generated, you'll be able to define
TERRAFORM_TFLINT_UNSECURED_ENV_VARIABLES:
- GITHUB_TOKEN
That way , GITHUB_TOKEN will be hidden in env for all linters, except tflint :)
Thanks. It is working fine with the beta :-)
Wouldn't it make sense to add note to the docs/descriptors/terraform_tflint.md that it is recommended to use TERRAFORM_TFLINT_UNSECURED_ENV_VARIABLES: GITHUB_TOKEN
to make tflint
working in "GitHub Actions"?
It may not be clear for the end users, that you need this "by default" otherwise tflint
may not work...
I know that TERRAFORM_TFLINT_UNSECURED_ENV_VARIABLES
is properly documented, but when enduser got the "tflint Bad credentials error" it may not be clear that the GITHUB_TOKEN needs to be added there.
@ruzickap indeed :) Wanna make a PR on the terraform descriptor file, or I'll do it later ? :)
Let me create the PR :-)
Describe the bug
It looks like
tflint
doesn't work in megalinter 7.0.x. Details: https://github.com/ruzickap/k8s-tf-eks-gitops/actions/runs/5114199496/jobs/9194202870Megalinter 6.x.x works fine with
tflint
: https://github.com/ruzickap/k8s-tf-eks-gitops/actions/runs/5112503034/jobs/9190611249Thanks for checking it...