Code Monkey home page Code Monkey logo

tflint-bundle's People

Contributors

dependabot[bot] avatar srjennings avatar wata727 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tflint-bundle's Issues

tflint fails to find modules

running on gitlab it appears tflint has trouble finding some modules, inconsistently. I have checked gitlab cache and also tried changing from latest image to last. Not sure what more I can do to help figure out what is going on. Other tf steps in the same pipeline do not complain about modules not being loaded.

Issue has started in the last few weeks or so.

latest tflint-bundle causes errors with the AWS plugin

Description

Hi There,
I hope you are doing well, I have noticed a slight issue with a recent commit in tflint-bundle

tflint started erroring with exit 2 after the commit.
I have set our image version from latest back to v0.39.3.2 and it is working as expected.

Details

# Local command
tflint --enable-plugin=aws
# From Docker
docker run -it --rm --init --volume /<OBFUSCATED>:/workdir --workdir /workdir --entrypoint /bin/sh ghcr.io/terraform-linters/tflint-bundle:latest -ec $'tflint --enable-plugin=aws\n'

Error Log

09:45:33 [DEBUG] [email protected]/grpc_stdio.go:139: stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
09:45:33 [INFO]  [email protected]/client.go:646: plugin process exited: path=/<OBFUSCATED>/.tflint.d/plugins/github.com/terraform-linters/tflint-ruleset-aws/0.17.0/tflint-ruleset-aws pid=37964
09:45:33 [DEBUG] [email protected]/client.go:461: plugin exited
09:45:33 [DEBUG] [email protected]/grpc_stdio.go:139: stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
09:45:33 [INFO]  [email protected]/client.go:646: plugin process exited: path=/usr/local/bin/tflint pid=37965
09:45:33 [DEBUG] [email protected]/client.go:461: plugin exited

v0.39.0.0: Failed to check ruleset; file not found

Today all of our Terraform pipelines started failing on tflint (v0.39.0.0):

I was able to reproduce this locally by running the following:

❯ docker run --rm -v $(pwd):/data -t ghcr.io/terraform-linters/tflint-bundle

Unable to find image 'ghcr.io/terraform-linters/tflint-bundle:latest' locally
latest: Pulling from terraform-linters/tflint-bundle
530afca65e2e: Already exists 
a70a19e69755: Pull complete 
8f9b3e47c202: Pull complete 
82a17f85f628: Pull complete 
3f6d410d8bd8: Pull complete 
Digest: sha256:e32e4adae6f0d37e942d12523b785f46bd2f20d3ddb44ef193d180908903dfac
Status: Downloaded newer image for ghcr.io/terraform-linters/tflint-bundle:latest
Failed to check ruleset; file not found

The previous version (v0.38.1.0) works fine:

❯ docker run --rm -v $(pwd):/data -t ghcr.io/terraform-linters/tflint-bundle:v0.38.1.0
Unable to find image 'ghcr.io/terraform-linters/tflint-bundle:v0.38.1.0' locally
v0.38.1.0: Pulling from terraform-linters/tflint-bundle
2408cc74d12b: Already exists 
f0290673f905: Pull complete 
7b95f59d4b4e: Pull complete 
9b4aa5dc042c: Pull complete 
1b85d805286a: Pull complete 
Digest: sha256:8aa1d7939bcf70ad76c577a8fb9fc4bd21b75ecc195807f613c5b0bb7bbbec7b
Status: Downloaded newer image for ghcr.io/terraform-linters/tflint-bundle:v0.38.1.0
Failed to check ruleset; no valid credential sources for tflint-ruleset-aws found.

Please see https://github.com/terraform-linters/tflint-ruleset-aws/blob/master/docs/deep_checking.md
for more information about providing credentials.

Error: NoCredentialProviders: no valid providers in chain
caused by: EnvAccessKeyNotFound: failed to find credentials in the environment.
SharedCredsLoad: failed to load profile, .
EC2RoleRequestError: no EC2 instance role found
caused by: RequestError: send request failed
caused by: Get "http://169.254.169.254/latest/meta-data/iam/security-credentials/": dial tcp 169.254.169.254:80: connect: no route to host

(the error is expected as I did not authenticate against AWS)

Create multi-arch image

Currently the image manifest is only linux/amd64.

If possible, could it be both linux/amd64 + linux/arm64?

Failed to parse CLI arguments; Failed to load `sh`: File not found

Hi,
thanks a lot for your work on the tflint image!

I am running the image on the latest version of gitlab-runner and do get:

Executing "step_script" stage of the job script
00:01
Using docker image sha256:7bb16013e6077cb34a49d4f93b07f0eff81301f094e3a21231ea64856d01c860 for ghcr.io/terraform-linters/tflint-bundle:v0.41.0.1 with digest ghcr.io/terraform-linters/tflint-bundle@sha256:c1a9ab620e8d1473ee564a7b971a6fa02b7bc7a7d9842123c6fd0aac6548fe[18]...
Failed to parse CLI arguments; Failed to load `sh`: File not found

The logs of the container are empty.

This is how the gitlab pipeline stage looks like:

lint-modules:
  stage: tflint
  image: ghcr.io/terraform-linters/tflint-bundle:v0.41.0.1
  script:
    - tflint --init
    - tflint modules/xyz

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.