code: func (ms *Module) ForgetResourceInstanceDeposed(addr addrs.ResourceInstance, key DeposedKey) {
  	rs := ms.Resource(addr.Resource)
  	if rs == nil {
  		return
  	}
  	is := rs.Instance(addr.Key)
  	if is == nil {
  		return
  	}
  	delete(is.Deposed, key)
  
  	if !is.HasObjects() {
  		// If we have no objects at all then we'll clean up.
  		delete(rs.Instances, addr.Key)
  	}
  	if rs.EachMode == NoEach && len(rs.Instances) == 0 {
  		// Also clean up if we only expect to have one instance anyway
  		// and there are none. We leave the resource behind if an each mode
  		// is active because an empty list or map of instances is a valid state.
  		delete(ms.Resources, addr.Resource.String())
  	}
  }
docs: // ForgetResourceInstanceDeposed removes the record of the deposed object with
  // the given address and key, if present. If not present, this is a no-op.