Last active
May 23, 2018 09:12
-
-
Save AstroTom/8ad3c69ecea3877fb72c35988be318f5 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
# | |
# sample property file | |
# illustrates more flexible way to define variables based on Environemnt | |
# | |
# Assume external variable $RNT_ENV | |
# | |
# current system | |
# only works for 3 environments | |
# addition of environmnt requires new code | |
# NOT recommended | |
case ENV in | |
PRD) | |
BUCKET=PRD_bucket | |
SNS-TOPIC=PRD_sns | |
DB=dbpg.PRD.app.wishtrip.com | |
;; | |
STG) | |
BUCKET=STG_bucket | |
SNS-TOPIC=STG_sns | |
DB=dbpg.STG.app.wishtrip.com | |
;; | |
DEV) | |
BUCKET=DEV_bucket | |
SNS-TOPIC=DEV_sns | |
DB=dbpg.DEV.app.wishtrip.com | |
;; | |
esac | |
# | |
# more flexible system | |
# works for any number of env | |
# Recommended method | |
# | |
BUCKET=${RNT_ENV}_bucket | |
SNS-TOPIC=${RNT_ENV}_sns | |
DB=dbpg.${RNT_ENV}.app.wishtrip.com | |
QNAME=${RNT_ENV}_name_q | |
DNS=host.${RNT_ENV}.app.wishtrip.com | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment