We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a2e7cca commit 0796f2fCopy full SHA for 0796f2f
pkg/types/clusterconfig/cluster_config.go
@@ -663,7 +663,7 @@ var CoreConfigStructFieldValidations = []*cr.StructFieldValidation{
663
{
664
StructField: "VPCCIDR",
665
StringPtrValidation: &cr.StringPtrValidation{
666
- Validator: validateCIDR,
+ Validator: validateVPCCIDR,
667
},
668
669
}
@@ -1470,6 +1470,15 @@ func (ng *NodeGroup) FillEmptySpotFields(region string) {
1470
1471
1472
func validateCIDR(cidr string) (string, error) {
1473
+ _, _, err := net.ParseCIDR(cidr)
1474
+ if err != nil {
1475
+ return "", errors.WithStack(err)
1476
+ }
1477
+
1478
+ return cidr, nil
1479
+}
1480
1481
+func validateVPCCIDR(cidr string) (string, error) {
1482
_, network, err := net.ParseCIDR(cidr)
1483
if err != nil {
1484
return "", errors.WithStack(err)
0 commit comments