Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Disable apse 1 prod (#20892)

Joshen Lim8cc6855cb373
diff --git a/apps/studio/components/interfaces/ProjectCreation/ProjectCreation.utils.ts b/apps/studio/components/interfaces/ProjectCreation/ProjectCreation.utils.ts
index 35f51a1f92e..bb50ce2527c 100644
--- a/apps/studio/components/interfaces/ProjectCreation/ProjectCreation.utils.ts
+++ b/apps/studio/components/interfaces/ProjectCreation/ProjectCreation.utils.ts
@@ -4,7 +4,8 @@ import { pluckObjectFields } from 'lib/helpers'
export function getAvailableRegions(cloudProvider: CloudProvider): Region {
if (cloudProvider === 'AWS') {
return process.env.NEXT_PUBLIC_ENVIRONMENT === 'staging'
- ? pluckObjectFields(AWS_REGIONS, ['SOUTHEAST_ASIA'])
+ ? // [Joshen] TEMP FIX, CHANGE BACK TO APSE1
+ pluckObjectFields(AWS_REGIONS, ['NORTHEAST_ASIA'])
: AWS_REGIONS
} else if (cloudProvider === 'FLY') {
return FLY_REGIONS
diff --git a/apps/studio/components/interfaces/ProjectCreation/RegionSelector.tsx b/apps/studio/components/interfaces/ProjectCreation/RegionSelector.tsx
index dc0e81b0deb..b5a1d05cf31 100644
--- a/apps/studio/components/interfaces/ProjectCreation/RegionSelector.tsx
+++ b/apps/studio/components/interfaces/ProjectCreation/RegionSelector.tsx
@@ -31,7 +31,8 @@ export const RegionSelector = ({
useEffect(() => {
// only pick a region if one hasn't already been selected
if (isSuccess && region && !selectedRegion) {
- onSelectRegion(region)
+ // [Joshen] TEMP FIX, CHANGE BACK TO APSE1
+ if (region !== 'Singapore') onSelectRegion(region)
} else if (isError && !selectedRegion) {
// if an error happened, and the user haven't selected a region, just select the default one for him
onSelectRegion(PROVIDERS[cloudProvider].default_region)
diff --git a/apps/studio/lib/constants/infrastructure.ts b/apps/studio/lib/constants/infrastructure.ts
index ba8fe0f49dd..86338742253 100644
--- a/apps/studio/lib/constants/infrastructure.ts
+++ b/apps/studio/lib/constants/infrastructure.ts
@@ -1,4 +1,5 @@
import { components } from 'data/api'
+import { IS_PLATFORM } from '.'
export type CloudProvider = 'FLY' | 'AWS'
export type Region = typeof AWS_REGIONS | typeof FLY_REGIONS
@@ -16,7 +17,8 @@ export const AWS_REGIONS = {
// 'North EU': 'North EU',
CENTRAL_EU: 'Central EU (Frankfurt)',
SOUTH_ASIA: 'South Asia (Mumbai)',
- SOUTHEAST_ASIA: 'Southeast Asia (Singapore)',
+ // [Joshen] Temp block apse1 for prod
+ // SOUTHEAST_ASIA: 'Southeast Asia (Singapore)'
NORTHEAST_ASIA: 'Northeast Asia (Tokyo)',
NORTHEAST_ASIA_2: 'Northeast Asia (Seoul)',
OCEANIA: 'Oceania (Sydney)',
@@ -30,8 +32,9 @@ export const FLY_REGIONS = {
SOUTHEAST_ASIA: 'Singapore',
} as const
+// [Joshen] TEMP FIX, CHANGE BACK TO APSE1
export const AWS_REGIONS_DEFAULT =
- process.env.NEXT_PUBLIC_ENVIRONMENT !== 'prod' ? AWS_REGIONS.SOUTHEAST_ASIA : AWS_REGIONS.WEST_US
+ process.env.NEXT_PUBLIC_ENVIRONMENT !== 'prod' ? AWS_REGIONS.NORTHEAST_ASIA : AWS_REGIONS.WEST_US
// TO DO, change default to US region for prod
const FLY_REGIONS_DEFAULT = FLY_REGIONS.SOUTHEAST_ASIA