@@ -98,7 +98,7 @@ export COMPOSE_PROJECT_NAME="SQL-scripts"
98
98
# export TF_VAR_cloudflare_api_key="$CLOUDFLARE_API_KEY" # must be a key, not a token using the link above
99
99
100
100
# ============================================================================ #
101
- # P y t h o n , A W S , G C P , T e r r a f o r m
101
+ # Load External Envrc Files If Present
102
102
# ============================================================================ #
103
103
104
104
# XXX: safer to bring all these external .envrc inline if you're worried about changes
@@ -124,8 +124,15 @@ load_if_exists(){
124
124
fi
125
125
}
126
126
127
+ # don't do this it may lead to an infinite loop if 'make link' symlinking ~/.envrc to this repo's .envrc
128
+ # (which I do to keep Python virtual automatically loaded at all times because recent pip on Python refuses
129
+ # to install to system Python)
127
130
# load_if_exists ~/.envrc
128
131
132
+ # ============================================================================ #
133
+ # P y t h o n
134
+ # ============================================================================ #
135
+
129
136
# .envrc-aws \
130
137
# .envrc-gcp \
131
138
# .envrc-terraform \
@@ -136,14 +143,26 @@ for envrc in \
136
143
load_if_exists " $envrc "
137
144
done
138
145
146
+ # ============================================================================ #
147
+ # A W S
148
+ # ============================================================================ #
149
+
139
150
if [[ " $PWD " =~ /aws/ ]]; then
140
151
load_if_exists .envrc-aws
141
152
fi
142
153
154
+ # ============================================================================ #
155
+ # G C P
156
+ # ============================================================================ #
157
+
143
158
if [[ " $PWD " =~ /gcp/ ]]; then
144
159
load_if_exists .envrc-gcp
145
160
fi
146
161
162
+ # ============================================================================ #
163
+ # T e r r a f o r m
164
+ # ============================================================================ #
165
+
147
166
if [[ " $PWD " =~ /(terra(form)? | tf)(/| $) ]]; then
148
167
load_if_exists .envrc-terraform
149
168
fi
0 commit comments