code: func resourceVSphereComputeClusterVMAntiAffinityRuleObjects(
  	d *schema.ResourceData,
  	meta interface{},
  ) (*object.ClusterComputeResource, int32, error) {
  	if d.Id() != "" {
  		return resourceVSphereComputeClusterVMAntiAffinityRuleObjectsFromID(d, meta)
  	}
  	return resourceVSphereComputeClusterVMAntiAffinityRuleObjectsFromAttributes(d, meta)
  }
docs: // resourceVSphereComputeClusterVMAntiAffinityRuleObjects handles the fetching of the
  // cluster and rule key depending on what attributes are available:
  // * If the resource ID is available, the data is derived from the ID.
  // * If not, only the cluster is retrieved from compute_cluster_id. -1 is
  // returned for the key.