code: func ValidateInstanceVersion(v string) error {
  	if ValidateInstanceID(v, AnyHash) == nil ||
  		ValidatePackageRef(v) == nil ||
  		ValidateInstanceTag(v) == nil {
  		return nil
  	}
  	return fmt.Errorf("bad version (not an instance ID, a ref or a tag): %q", v)
  }
docs: // ValidateInstanceVersion return error if a string can't be used as version.
  //
  // A version can be specified as:
  //  1) Instance ID (hash, e.g "1234deadbeef2234...").
  //  2) Package ref (e.g. "latest").
  //  3) Instance tag (e.g. "git_revision:abcdef...").