code: func (c *Change) Encode(ty cty.Type) (*ChangeSrc, error) {
  	beforeDV, err := NewDynamicValue(c.Before, ty)
  	if err != nil {
  		return nil, err
  	}
  	afterDV, err := NewDynamicValue(c.After, ty)
  	if err != nil {
  		return nil, err
  	}
  
  	return &ChangeSrc{
  		Action: c.Action,
  		Before: beforeDV,
  		After:  afterDV,
  	}, nil
  }
docs: // Encode produces a variant of the reciever that has its change values
  // serialized so it can be written to a plan file. Pass the type constraint
  // that the values are expected to conform to; to properly decode the values
  // later an identical type constraint must be provided at that time.
  //
  // Where a Change is embedded in some other struct, it's generally better
  // to call the corresponding Encode method of that struct rather than working
  // directly with its embedded Change.