code: func (m *ModuleState) View(id string) *ModuleState {
  	if m == nil {
  		return m
  	}
  
  	r := m.deepcopy()
  	for k, _ := range r.Resources {
  		if id == k || strings.HasPrefix(k, id+".") {
  			continue
  		}
  
  		delete(r.Resources, k)
  	}
  
  	return r
  }
docs: // View returns a view with the given resource prefix.