code: func (s *SyncState) SetResourceMeta(addr addrs.AbsResource, eachMode EachMode, provider addrs.AbsProviderConfig) {
  	s.lock.Lock()
  	defer s.lock.Unlock()
  
  	ms := s.state.EnsureModule(addr.Module)
  	ms.SetResourceMeta(addr.Resource, eachMode, provider)
  }
docs: // SetResourceMeta updates the resource-level metadata for the resource at
  // the given address, creating the containing module state and resource state
  // as a side-effect if not already present.