code: func CIDRNetwork(min, max int) schema.SchemaValidateFunc {
  	return func(i interface{}, k string) (s []string, es []error) {
  		v, ok := i.(string)
  		if !ok {
  			es = append(es, fmt.Errorf("expected type of %s to be string", k))
  			return
  		}
  
  		_, ipnet, err := net.ParseCIDR(v)
  		if err != nil {
  			es = append(es, fmt.Errorf(
  				"expected %s to contain a valid CIDR, got: %s with err: %s", k, v, err))
  			return
  		}
  
  		if ipnet == nil || v != ipnet.String() {
  			es = append(es, fmt.Errorf(
  				"expected %s to contain a valid network CIDR, expected %s, got %s",
  				k, ipnet, v))
  		}
  
  		sigbits, _ := ipnet.Mask.Size()
  		if sigbits < min || sigbits > max {
  			es = append(es, fmt.Errorf(
  				"expected %q to contain a network CIDR with between %d and %d significant bits, got: %d",
  				k, min, max, sigbits))
  		}
  
  		return
  	}
  }
docs: // CIDRNetwork returns a SchemaValidateFunc which tests if the provided value
  // is of type string, is in valid CIDR network notation, and has significant bits between min and max (inclusive)