func resourceVSphereComputeClusterApplyCustomAttributes(
	d *schema.ResourceData,
	meta interface{},
	cluster *object.ClusterComputeResource,
) error {
	client := meta.(*VSphereClient).vimClient
	// Verify a proper vCenter before proceeding if custom attributes are defined
	attrsProcessor, err := customattribute.GetDiffProcessorIfAttributesDefined(client, d)
	if err != nil {
		return err
	}

	if attrsProcessor == nil {
		log.Printf("[DEBUG] %s: Custom attributes unsupported on this connection, skipping", resourceVSphereComputeClusterIDString(d))
		return nil
	}

	log.Printf("[DEBUG] %s: Applying any pending custom attributes", resourceVSphereComputeClusterIDString(d))
	return attrsProcessor.ProcessDiff(cluster)
}
func resourceVSphereComputeClusterApplyCustomAttributes(
	d *schema.ResourceData,
	meta interface{},
	cluster *object.ClusterComputeResource,
) error {
	client := meta.(*VSphereClient).vimClient
	
	attrsProcessor, err := customattribute.GetDiffProcessorIfAttributesDefined(client, d)
	if err != nil {
		return err
	}

	if attrsProcessor == nil {
		log.Printf("[DEBUG] %s: Custom attributes unsupported on this connection, skipping", resourceVSphereComputeClusterIDString(d))
		return nil
	}

	log.Printf("[DEBUG] %s: Applying any pending custom attributes", resourceVSphereComputeClusterIDString(d))
	return attrsProcessor.ProcessDiff(cluster)
}
func resourceVSphereComputeClusterApplyCustomAttributes ( d * schema . ResourceData , meta interface { } , cluster * object . ClusterComputeResource , ) error { client := meta . ( * VSphereClient ) . vimClient // Verify a proper vCenter before proceeding if custom attributes are defined attrsProcessor , err := customattribute . GetDiffProcessorIfAttributesDefined ( client , d ) if err != nil { return err } if attrsProcessor == nil { log . Printf ( " " , resourceVSphereComputeClusterIDString ( d ) ) return nil } log . Printf ( " " , resourceVSphereComputeClusterIDString ( d ) ) return attrsProcessor . ProcessDiff ( cluster ) }
// resourceVSphereComputeClusterApplyCustomAttributes processes the custom
// attributes step for both create and update for vsphere_compute_cluster.
resourceVSphereComputeClusterApplyCustomAttributes processes the custom attributes step for both create and update for vsphere_compute_cluster .