code: func (ms *Module) SetResourceMeta(addr addrs.Resource, eachMode EachMode, provider addrs.AbsProviderConfig) {
  	rs := ms.Resource(addr)
  	if rs == nil {
  		rs = &Resource{
  			Addr:      addr,
  			Instances: map[addrs.InstanceKey]*ResourceInstance{},
  		}
  		ms.Resources[addr.String()] = rs
  	}
  
  	rs.EachMode = eachMode
  	rs.ProviderConfig = provider
  }
docs: // SetResourceMeta updates the resource-level metadata for the resource
  // with the given address, creating the resource state for it if it doesn't
  // already exist.