-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create binaries for region and profile switching
- Loading branch information
1 parent
d1b1777
commit 3c63345
Showing
4 changed files
with
52 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
aws-fusion config-switch profile | ||
|
||
selected_profile="$(cat ~/.aws/fusion/profile)" | ||
|
||
# Unset region as switching profile | ||
unset AWS_REGION | ||
|
||
if [ -z "$selected_profile" ] | ||
then | ||
# Unset profile for default profile | ||
unset AWS_PROFILE | ||
else | ||
export AWS_PROFILE="$selected_profile" | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
aws-fusion config-switch region | ||
|
||
selected_region="$(cat ~/.aws/fusion/region)" | ||
|
||
if [ -z "$selected_region" ] | ||
then | ||
# Unset region as it is same one mentioned in the current profile | ||
unset AWS_REGION | ||
else | ||
export AWS_REGION="$selected_region" | ||
fi |
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