This repository has been archived by the owner on Feb 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Export ARN of the assumed role, too.
Some of our users have asked to have `yak` expose what account or environment is currently active. We've introduced an environment variable `AWS_METADATA_USER_ARN`, from which you or your script will be able to deduce which Amazon account is active, and what role you have. * aws/aws.go (EnvironmentVariables): Change parameter to be the entire sts.AssumeRoleWithSAMLOutput object, instead of just the sts.Credentials object. This gives us access to the assumed role user, too. * cmd/shim.go (shimCmd): Update aws.EnvironmentVariables call site. * format/format.go (outputFormatters): Update aws.EnvironmentVariables call site. * aws/aws_test.go (TestEnvironmentVariables): Update environment variable test to include assumed role ARN. * format/format_test.go (TestDefaultEnvCredentials): Update formatter test to include assumed role ARN. Closes #86. Co-authored-by: Michael V. <michael.vigilante@redbubble.com>
- Loading branch information
1 parent
b9db14b
commit 71ce58c
Showing
5 changed files
with
31 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters