Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Would like to see a more-customizable profile name pattern #1

Open
mjreed-wbd opened this issue Sep 30, 2020 · 1 comment
Open

Would like to see a more-customizable profile name pattern #1

mjreed-wbd opened this issue Sep 30, 2020 · 1 comment

Comments

@mjreed-wbd
Copy link
Collaborator

While we can provide a custom name for each credential profile, the options for applying a general pattern to them are limited to "role" or "acc-role". It would be nice to have a more general formatting method. For our particular use case, we're looking for backward compatibility with our previous SAML key generation tool, which used the pattern "acc:role" with a colon instead of the hyphen.

Expected Behavior

Should be able to tell gimme-aws-creds to generate AWS credential profiles named "account-name:role-name".

Current Behavior

Unless I specify each profile name individually, "account-name:role-name" is not an option.

Possible Solution

As a quick fix for our use case, accepting 'acc:role' as a near-synonym for 'acc-role' but using the alternate delimiter would be useful. Perhaps it could be generalized to accept anything matching the regex 'acc(.)role' and use the supplied delimiter, but an even more general solution would be to accept some sort of template string, perhaps printf-style with %a for the account and %r for the role.

Context

We have users with dozens to hundreds of roles each, using Terraform code that was written to use hard-coded AWS profile names. Not having to provide a custom name for each profile when assuming it would be very helpful.

Your Environment

  • App Version used: 2.3.4 with version .1 of the WarnerMedia-local changes
  • Operating System and version: MacOS Mojave 10.4.6
@sarath
Copy link

sarath commented Jul 28, 2021

Love the idea of printf style for creditprofile. especially when we have 50+ roles to manage..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants