code: func resourceVSphereComputeClusterFlattenData(
  	d *schema.ResourceData,
  	meta interface{},
  	cluster *object.ClusterComputeResource,
  ) error {
  	log.Printf("[DEBUG] %s: Saving cluster attributes", resourceVSphereComputeClusterIDString(d))
  	client, err := resourceVSphereComputeClusterClient(meta)
  	if err != nil {
  		return err
  	}
  
  	// Get the version of the vSphere connection to help determine what
  	// attributes we need to set
  	version := viapi.ParseVersionFromClient(client)
  
  	props, err := clustercomputeresource.Properties(cluster)
  	if err != nil {
  		return err
  	}
  
  	// Save the root resource pool ID so that it can be passed on to other
  	// resources without having to resort to the data source.
  	if err := d.Set("resource_pool_id", props.ResourcePool.Value); err != nil {
  		return err
  	}
  
  	return flattenClusterConfigSpecEx(d, props.ConfigurationEx.(*types.ClusterConfigInfoEx), version)
  }
docs: // resourceVSphereComputeClusterFlattenData saves the configuration attributes
  // from a ClusterComputeResource into the supplied ResourceData. It also saves
  // the root resource pool for the cluster in resource_pool_id.
  //
  // Note that other functions handle other non-configuration related items, such
  // as path, name, tags, and custom attributes.