code: func (s *SyncState) RemoveResource(addr addrs.AbsResource) {
  	s.lock.Lock()
  	defer s.lock.Unlock()
  
  	ms := s.state.EnsureModule(addr.Module)
  	ms.RemoveResource(addr.Resource)
  	s.maybePruneModule(addr.Module)
  }
docs: // RemoveResource removes the entire state for the given resource, taking with
  // it any instances associated with the resource. This should generally be
  // called only for resource objects whose instances have all been destroyed,
  // but that is not enforced by this method. (Use RemoveResourceIfEmpty instead
  // to safely check first.)