Git Product home page Git Product logo

Comments (1)

americk0 avatar americk0 commented on July 23, 2024

Hey @SWolfeCAI, pardon the delay in responding. I like the idea of this and I've been thinking about adding something like this for a while, but I don't have any solid details on when this could get added.

We've had some work planned on our backlog for a while to refactor the logic for how the CLI manages its settings and that will likely create an opportunity to reengineer this process and come up with a better solution that potentially allows for overrides of settings in subfolders with files similar to what you've described so it is on our radar.

In the meantime, although this isn't an implementation of your feature suggestion I believe I have a solution that might help you accomplish the same goal today. The AWS CLI (and many AWS-related tooling including terraform) can use a file called ~/.aws/credentials where you can specify various profiles and credentials for those profiles, but the really neat thing is that you can establish a profile that uses a credential process such that whenever the profile is used, the AWS CLI will execute the specified command to generate credentials for that profile on-the-fly, and the ALKS CLI can be used today to perform this action. I believe it would look something like this:

# ~/.aws/credentials

[profile awsmyaccount]
credential_process = /usr/local/bin/alks sessions open -a 012345678910 -r Admin -o aws

and then in your terraform file you could specify this profile on the aws provider block like this:

provider "aws" {
  region = ...
  profile = "awsmyaccount"
}

With this configuration your terraform should be able to automatically detect that profile and execute that ALKS CLI command to generate credentials for your account at the moment they're needed without the need for any .alksrc file. I would still like to eventually implement some kind of rc file for ALKS since there are potentially several other use cases for it so I will leave this feature request open for now but I hope this solution helps you in the meantime

from alks-cli.

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.