vsphere/resource_vsphere_datastore_cluster_vm_anti_affinity_rule.go
func resourceVSphereDatastoreClusterVMAntiAffinityRuleFetchObjects(
	meta interface{},
	podID string,
	key int32,
) (*object.StoragePod, int32, error) {
	client, err := resourceVSphereDatastoreClusterVMAntiAffinityRuleClient(meta)
	if err != nil {
		return nil, 0, err
	}

	pod, err := storagepod.FromID(client, podID)
	if err != nil {
		return nil, 0, fmt.Errorf("cannot locate datastore cluster: %s", err)
	}

	return pod, key, nil
}
func resourceVSphereDatastoreClusterVMAntiAffinityRuleFetchObjects(
	meta interface{},
	podID string,
	key int32,
) (*object.StoragePod, int32, error) {
	client, err := resourceVSphereDatastoreClusterVMAntiAffinityRuleClient(meta)
	if err != nil {
		return nil, 0, err
	}

	pod, err := storagepod.FromID(client, podID)
	if err != nil {
		return nil, 0, fmt.Errorf("cannot locate datastore cluster: %s", err)
	}

	return pod, key, nil
}
// resourceVSphereDatastoreClusterVMAntiAffinityRuleFetchObjects fetches the
// "objects" for a cluster rule. This is currently just the cluster object as
// the rule key a static value and a pass-through - this is to keep its
// workflow consistent with other cluster-dependent resources that derive from
// ArrayUpdateSpec that have managed object as keys, such as VM and host
// overrides.