code: func IfValue(key string, cond ValueConditionFunc, f schema.CustomizeDiffFunc) schema.CustomizeDiffFunc {
  	return func(d *schema.ResourceDiff, meta interface{}) error {
  		if cond(d.Get(key), meta) {
  			return f(d, meta)
  		}
  		return nil
  	}
  }
docs: // IfValue returns a CustomizeDiffFunc that calls the given condition
  // function with the new values of the given key and then calls the
  // given CustomizeDiffFunc only if the condition function returns true.