File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,6 @@ locals {
1111 base_component = try (local. config [" components" ][var . component_type ][var . component ][" component" ], " " )
1212
1313 final_component = coalesce (local. base_component , var. component )
14- backend_type = local. config [" components" ][var . component_type ][local . final_component ][" backend_type" ]
15- backend = local. config [" components" ][var . component_type ][local . final_component ][" backend" ]
14+ backend_type = try ( local. config [" components" ][var . component_type ][local . final_component ][" backend_type" ], " " )
15+ backend = try ( local. config [" components" ][var . component_type ][local . final_component ][" backend" ], " " )
1616}
Original file line number Diff line number Diff line change @@ -37,5 +37,6 @@ locals {
3737 bypass = [{ outputs = var.defaults }]
3838 }
3939
40- outputs = local. remote_states [var . bypass ? " bypass" : local . backend_type ][0 ]. outputs
40+ remote_state_backend_key = var. bypass ? " bypass" : local. backend_type
41+ outputs = try (length (local. remote_state_backend_key ), 0 ) > 0 ? local. remote_states [local . remote_state_backend_key ][0 ]. outputs : {}
4142}
You can’t perform that action at this time.
0 commit comments