regions.ts 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. export type CloudProvider = 'FLY' | 'AWS' | 'AWS_K8S' | 'AWS_NIMBUS'
  2. export type Region = Partial<typeof AWS_REGIONS> | Partial<typeof FLY_REGIONS>
  3. export const AWS_REGIONS = {
  4. WEST_US: {
  5. code: 'us-west-1',
  6. displayName: 'West US (North California)',
  7. location: [37.774929, -122.419418],
  8. },
  9. WEST_US_2: {
  10. code: 'us-west-2',
  11. displayName: 'West US (Oregon)',
  12. location: [45.51, -122.67],
  13. },
  14. EAST_US: {
  15. code: 'us-east-1',
  16. displayName: 'East US (North Virginia)',
  17. location: [37.926868, -78.024902],
  18. },
  19. EAST_US_2: { code: 'us-east-2', displayName: 'East US (Ohio)', location: [39.9612, -82.9988] },
  20. CENTRAL_CANADA: {
  21. code: 'ca-central-1',
  22. displayName: 'Canada (Central)',
  23. location: [56.130367, -106.346771],
  24. },
  25. WEST_EU: { code: 'eu-west-1', displayName: 'West EU (Ireland)', location: [53.3498, -6.2603] },
  26. WEST_EU_2: {
  27. code: 'eu-west-2',
  28. displayName: 'West Europe (London)',
  29. location: [51.507351, -0.127758],
  30. },
  31. WEST_EU_3: { code: 'eu-west-3', displayName: 'West EU (Paris)', location: [2.352222, 48.856613] },
  32. CENTRAL_EU: {
  33. code: 'eu-central-1',
  34. displayName: 'Central EU (Frankfurt)',
  35. location: [50.110924, 8.682127],
  36. },
  37. CENTRAL_EU_2: {
  38. code: 'eu-central-2',
  39. displayName: 'Central Europe (Zurich)',
  40. location: [47.3744489, 8.5410422],
  41. },
  42. NORTH_EU: {
  43. code: 'eu-north-1',
  44. displayName: 'North EU (Stockholm)',
  45. location: [59.3251172, 18.0710935],
  46. },
  47. SOUTH_ASIA: {
  48. code: 'ap-south-1',
  49. displayName: 'South Asia (Mumbai)',
  50. location: [18.9733536, 72.8281049],
  51. },
  52. SOUTHEAST_ASIA: {
  53. code: 'ap-southeast-1',
  54. displayName: 'Southeast Asia (Singapore)',
  55. location: [1.357107, 103.8194992],
  56. },
  57. NORTHEAST_ASIA: {
  58. code: 'ap-northeast-1',
  59. displayName: 'Northeast Asia (Tokyo)',
  60. location: [35.6895, 139.6917],
  61. },
  62. NORTHEAST_ASIA_2: {
  63. code: 'ap-northeast-2',
  64. displayName: 'Northeast Asia (Seoul)',
  65. location: [37.5665, 126.978],
  66. },
  67. OCEANIA: {
  68. code: 'ap-southeast-2',
  69. displayName: 'Oceania (Sydney)',
  70. location: [-33.8688, 151.2093],
  71. },
  72. SOUTH_AMERICA: {
  73. code: 'sa-east-1',
  74. displayName: 'South America (São Paulo)',
  75. location: [-1.2043218, -47.1583944],
  76. },
  77. } as const
  78. export type AWS_REGIONS_KEYS = keyof typeof AWS_REGIONS
  79. export const FLY_REGIONS = {
  80. SOUTHEAST_ASIA: { code: 'sin', displayName: 'Singapore', location: [1.3521, 103.8198] },
  81. } as const
  82. export const SMART_REGION_TO_EXACT_REGION_MAP = new Map([
  83. ['Americas', 'East US (North Virginia)'],
  84. ['Europe', 'Central EU (Frankfurt)'],
  85. ['APAC', 'Southeast Asia (Singapore)'],
  86. ])