code: func marshalPlannedOutputs(changes *plans.Changes) (map[string]output, error) {
  	if changes.Outputs == nil {
  		// No changes - we're done here!
  		return nil, nil
  	}
  
  	ret := make(map[string]output)
  
  	for _, oc := range changes.Outputs {
  		if oc.ChangeSrc.Action == plans.Delete {
  			continue
  		}
  
  		var after []byte
  		changeV, err := oc.Decode()
  		if err != nil {
  			return ret, err
  		}
  
  		if changeV.After != cty.NilVal {
  			if changeV.After.IsWhollyKnown() {
  				after, err = ctyjson.Marshal(changeV.After, changeV.After.Type())
  				if err != nil {
  					return ret, err
  				}
  			}
  		}
  
  		ret[oc.Addr.OutputValue.Name] = output{
  			Value:     json.RawMessage(after),
  			Sensitive: oc.Sensitive,
  		}
  	}
  
  	return ret, nil
  
  }
docs: // marshalPlannedOutputs takes a list of changes and returns a map of output
  // values