code: func (m *Module) ResourceByAddr(addr addrs.Resource) *Resource {
  	key := addr.String()
  	switch addr.Mode {
  	case addrs.ManagedResourceMode:
  		return m.ManagedResources[key]
  	case addrs.DataResourceMode:
  		return m.DataResources[key]
  	default:
  		return nil
  	}
  }
docs: // ResourceByAddr returns the configuration for the resource with the given
  // address, or nil if there is no such resource.