File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -3,15 +3,17 @@ locals {
3
3
(var. base_key ) = var.configuration[var.base_key]
4
4
}
5
5
6
+ base_config = local. base [var . base_key ]
7
+
6
8
overlays = {
7
9
# include all envs but the base_key in overlays
8
10
for env_key , env in var . configuration :
9
11
env_key = > {
10
- # loop through all config keys in base_key environment
12
+ # loop through all config keys in base_key environment and current env
11
13
# if current env has that key, use the value from current env
12
14
# if not, use the value from the base_key environment
13
- for key , value in var . configuration [ var . base_key ] :
14
- key = > lookup (env, key, null ) != null ? env[key] : value
15
+ for key in setunion ( keys (env), keys (local . base_config )) :
16
+ key = > lookup (env, key, null ) != null ? env[key] : local.base_config[key]
15
17
}
16
18
if env_key != var . base_key
17
19
}
You can’t perform that action at this time.
0 commit comments