aws: set AWS_EB_PROFILE for the EB CLI (#7388)
Added AWS_EB_PROFILE environment variable to the AWS Plugin. The EB CLI uses this
variable instead of the primary AWS_PROFILE variable to keep track of what profile
it is using.
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-configuration.html
Diff
1diff --git a/plugins/aws/README.md b/plugins/aws/README.md
2index 57ab1e5ac750179571357b47130eded3a138f6fe..45e6de937002e4d184a88c0788590fb8118b1523 100644
3--- a/plugins/aws/README.md
4+++ b/plugins/aws/README.md
5@@ -12,6 +12,7 @@ plugins=(... aws)
6 ## Plugin commands
7 8 * `asp [<profile>]`: Sets `$AWS_PROFILE` and `$AWS_DEFAULT_PROFILE` (legacy) to `<profile>`.
9+ It also sets `$AWS_EB_PROFILE` to `<profile>` for the Elastic Beanstalk CLI.
10 Run `asp` without arguments to clear the profile.
1112 * `agp`: Gets the current value of `$AWS_PROFILE`.
13diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh
14index 2fb3518125f4dd540c4654c5c28b24e549dbc79a..944557e14ae02db0bf43cb4c39a68f12b9f90233 100644
15--- a/plugins/aws/aws.plugin.zsh
16+++ b/plugins/aws/aws.plugin.zsh
17@@ -7,6 +7,7 @@ function agp {
18 function asp {
19 export AWS_DEFAULT_PROFILE=$1
20 export AWS_PROFILE=$1
21+ export AWS_EB_PROFILE=$1
2223 if [[ -z "$1" ]]; then
24 echo AWS profile cleared.