Created
February 8, 2021 20:20
-
-
Save carrfane/58c2b6bba7b059d5900ec1309c8469b2 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
# Getting the environment variables | |
values=$(/opt/elasticbeanstalk/bin/get-config environment) | |
# Parsing the json and exporting them as environment variables | |
for env in $(echo $values | jq -r "to_entries|map(\"\(.key)=\(.value|tostring)\")|.[]" ); do | |
export $env | |
done | |
# Command to run this file | |
# . load_env.sh (or) source load_env.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment