Skip to content

Commit ead0763

Browse files
committed
fix(edgeservices): use zone from lb_config prior to provider default
1 parent 1cd8d76 commit ead0763

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

internal/services/edgeservices/types.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,15 @@ func expandLBBackendConfig(zone scw.Zone, raw any) *edge_services.ScalewayLBBack
100100
}
101101

102102
innerMap := lbConfigList[0].(map[string]any)
103+
104+
configZone := zone
105+
if zoneStr, ok := innerMap["zone"]; ok && zoneStr != "" {
106+
configZone = scw.Zone(zoneStr.(string))
107+
}
108+
103109
lbConfig := &edge_services.ScalewayLB{
104110
ID: locality.ExpandID(innerMap["id"]),
105-
Zone: zone,
111+
Zone: configZone,
106112
FrontendID: locality.ExpandID(innerMap["frontend_id"]),
107113
IsSsl: types.ExpandBoolPtr(innerMap["is_ssl"]),
108114
DomainName: types.ExpandStringPtr(innerMap["domain_name"]),

0 commit comments

Comments
 (0)