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