You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
resp.Diagnostics.AddError("Validation Error", "node_info contains 2 nodes but enable_ha is not set to true. Either set enable_ha = true to enable HA mode, or configure only a single node in node_info when enable_ha is false")
resp.Diagnostics.AddError("Validation Error", "node_info must have exactly 2 nodes when enable_ha is true")
575
+
}
576
+
577
+
// Condition 3a: len(nodeInfo) > 2 with enable_ha false (or not set) is not allowed
578
+
ifnodeCount>2&&enableHaFalse {
579
+
resp.Diagnostics.AddError("Validation Error", "node_info cannot have more than 2 nodes when enable_ha is false")
580
+
}
581
+
582
+
// Condition 3b: len(nodeInfo) == 1 with enable_ha false (or not set) is not allowed
583
+
ifnodeCount==1&&enableHaFalse {
584
+
resp.Diagnostics.AddError("Validation Error", "node_info with a single node is not valid when enable_ha is false; provide exactly 2 nodes with enable_ha set to true, or omit node_info")
585
+
}
586
+
587
+
// Condition 3c: len(nodeInfo) == 1 with enable_ha true is not allowed
588
+
ifnodeCount==1&&enableHaTrue {
589
+
resp.Diagnostics.AddError("Validation Error", "node_info must have exactly 2 nodes when enable_ha is true; a single node_info entry is not valid")
0 commit comments