code: func eachModeForInstanceKey(key addrs.InstanceKey) EachMode {
  	switch key.(type) {
  	case addrs.IntKey:
  		return EachList
  	case addrs.StringKey:
  		return EachMap
  	default:
  		if key == addrs.NoKey {
  			return NoEach
  		}
  		panic(fmt.Sprintf("don't know an each mode for instance key %#v", key))
  	}
  }
docs: //go:generate stringer -type EachMode