code: func stripResourceModifiers(r *schema.Resource) *schema.Resource {
  	if r == nil {
  		return nil
  	}
  	// start with a shallow copy
  	newResource := new(schema.Resource)
  	*newResource = *r
  
  	newResource.CustomizeDiff = nil
  	newResource.Schema = map[string]*schema.Schema{}
  
  	for k, s := range r.Schema {
  		newResource.Schema[k] = stripSchema(s)
  	}
  
  	return newResource
  }
docs: // stripResourceModifiers takes a *schema.Resource and returns a deep copy with all
  // StateFuncs and CustomizeDiffs removed. This will be used during apply to
  // create a diff from a planned state where the diff modifications have already
  // been applied.