Skip to content

[FEATURE] Add ability to filter accounts for repo/$PWD #283

@KennyS-Cox

Description

@KennyS-Cox

Feature Request 🚀

Ability to have a file in repo/directory that alks can use to filter accounts for alks sessions open --filter-file or something similar.

example file: <repo>/.alks

[AccountNames]
awsgdmowner
awsgdmownernp

Describe Your Feature Request

Similar to #185, I have a bunch of accounts and roles. Would be nice to be able to filter accounts to the repo I am currently using so when I run alks sessions open --filter-file or something similar, it only shows the accounts that repo will use. Should read the file in $PWD if exists and filter accordingly.

Example before:

➜  ~ alks sessions open
ALKS v3.21.1
? Please select an ALKS account/role (Use arrow keys)
  ************/ALKSAdmin - awsdesignatedcr :: Admin 
  ************/ALKSAdmin - awsdesignatedcrnp :: Admin 
  ************/ALKSAdmin - awsdesignateddescription :: Admin 
  ************/ALKSAdmin - awsdesignateddescriptionnp :: Admin 
  ************/ALKSAdmin - awsgdmowner :: Admin 
  ************/ALKSSsmUser - awsgdmowner :: SsmUser 
❯ ************/ALKSAdmin - awsgdmownernp :: Admin 
  ************/ALKSAdmin - awslifecycledecorators :: Admin 
  ************/ALKSAdmin - awslifecycledecoratorsnp :: Admin 
  ************/ALKSAdmin - awsscs :: Admin 
  ************/ALKSAdmin - awsscsnp :: Admin 
  ************/ALKSAdmin - awssiren :: Admin 
  ************/ALKSReadOnly - awssiren :: ReadOnly 
  ************/ALKSAdmin - awssirennp :: Admin 
  ************/ALKSAdmin - awswholesaleinvfound :: Admin 

Example after:

➜  ~ alks sessions open --filter-file
ALKS v3.21.1
? Please select an ALKS account/role (Use arrow keys)
  ************/ALKSAdmin - awsgdmowner :: Admin 
  ************/ALKSSsmUser - awsgdmowner :: SsmUser 
❯ ************/ALKSAdmin - awsgdmownernp :: Admin 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions