Last active
May 20, 2020 14:46
-
-
Save kingnebby/662966ed2eef28d415e1bf1dceeedf34 to your computer and use it in GitHub Desktop.
env-az function
This file contains hidden or 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
env-az() { | |
# Display the current entry | |
echo -n "az subscription env ($AZ_SUB_ENV): " | |
# Read the user input into a new local var | |
read az_sub_env; | |
# If the user input was NOT empty then.. | |
if [ ! -z "$az_sub_env" ]; then; | |
# Save the value as the new env var | |
export AZ_SUB_ENV=$az_sub_env; | |
fi; | |
# Do again for the other env var | |
echo -n "az aks instance env ($AZ_AKS_ENV): " | |
read az_aks_env; | |
if [ ! -z "$az_aks_env" ]; then; | |
export AZ_AKS_ENV=$az_aks_env; | |
fi; | |
# Call our previously defined function that will | |
# use these values to setup our cli env | |
env-az-setup; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment