Giter Club home page Giter Club logo

Comments (2)

slavaaaaaaaaaa avatar slavaaaaaaaaaa commented on September 13, 2024 1

TFLint supports only shared credentials (/.aws/credentials) , not configuration file (/.aws/config).
The region can only be written in configuration file, so you need to specify it separately.

Ahhhhh, that all makes absolute sense.

For the record, I actually found a better way to deal with all this: In Jenkinsfile I have the following wrapping for all tflint usage:

withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'aws-jenkins', usernameVariable: 'AWS_ACCESS_KEY_ID', passwordVariable: 'AWS_SECRET_ACCESS_KEY']]) { }

In the credentials plugin, I put in the access key as username and secret key as the password. Works great! I also set the region as an environment variable, and when it's different the project has a .tflint.hcl in its directory that overrides it.

I still see some use from specifying the location of the credentials file, but this works well enough.

Again, thanks for your work!

from tflint.

wata727 avatar wata727 commented on September 13, 2024

Thanks for your feedback :)

it's an option to create another, tflint-specific, secret Jenkins file with the credentials but that would be a duplication effort I'd prefer to avoid.

You're right. I'm just considering an implementation that interprets the Terraform provider section.
However, it need the big changes, so I have not started implementing yet.

is there any reason that the region isn't being parsed out of the credentials file as well?

TFLint supports only shared credentials (~/.aws/credentials) , not configuration file (~/.aws/config).
The region can only be written in configuration file, so you need to specify it separately.

from tflint.

Related Issues (20)

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.