code: func resourceVSphereComputeClusterVMGroupFindEntry(
  	cluster *object.ClusterComputeResource,
  	name string,
  ) (*types.ClusterVmGroup, error) {
  	props, err := clustercomputeresource.Properties(cluster)
  	if err != nil {
  		return nil, fmt.Errorf("error fetching cluster properties: %s", err)
  	}
  
  	for _, info := range props.ConfigurationEx.(*types.ClusterConfigInfoEx).Group {
  		if info.GetClusterGroupInfo().Name == name {
  			if vmInfo, ok := info.(*types.ClusterVmGroup); ok {
  				log.Printf("[DEBUG] Found VM group %q in cluster %q", name, cluster.Name())
  				return vmInfo, nil
  			}
  			return nil, fmt.Errorf("unique group name %q in cluster %q is not a VM group", name, cluster.Name())
  		}
  	}
  
  	log.Printf("[DEBUG] No VM group name %q found in cluster %q", name, cluster.Name())
  	return nil, nil
  }
docs: // resourceVSphereComputeClusterVMGroupFindEntry attempts to locate an existing
  // VM group config in a cluster's configuration. It's used by the resource's
  // read functionality and tests. nil is returned if the entry cannot be found.