Open s256 opened 1 year ago
is there a way to make it do the right thing with whichever combination of vault and profile a user is currently using, rather than requiring manual configuration? i'm not opposed to a combined "aws" segment, similar to the way we group multiple ruby, python, or node version managers into one segment.
Haven't looked into that as I'm not using aws-vault. I could only assume the intended behaviour. Like: if the vault env var is present, than the profile should not be shown. If not, show the content of the profile env var?
To be honest I'm not using either AWS option, so I'd defer what's appropriate to people who do :)
@bobthecow I merged the two functions, kept both options. But AWS Vault will take precedence, as users of aws-vault
will get the profile info by the $AWS_VAULT
env var. So only if that env is not set, we use $AWS_PROFILE
.
I did stick with the new option theme_display_aws_profile
as for me, a non-aws-vault user, I would not expect to find the setting I was looking for in the original option.
Hi bob. just wanted to follow up here :) let me know if something is missing.
@s256 Sorry about the delay!
I'm thinking we collapse the two options into single theme_display_aws_profile
(and treat theme_display_aws_vault_profile
as a synonym for backwards compatibility).
It looks like aws-vault has switched over to AWS_CREDENTIAL_EXPIRATION
instead of AWS_SESSION_EXPIRATION
, which comes from aws-cli maybe? Does the way you use aws profile also need to change? See #350 / #351
(i'm happy to make whatever changes are needed, i just want to confirm what works for you!)
In addition to the AWS_VAULT profile, it's also handy to see the currently active AWS Profile. It's not mutually exclusive. But not everyone uses
aws-vault
but e.g. granted.dev andassume
. Which only set's the profile and does not useaws-vault
. A dedicated setting can ensure that these two don't clash and are disabled by default