-
Notifications
You must be signed in to change notification settings - Fork 1
/
surreal.ts
33 lines (25 loc) · 949 Bytes
/
surreal.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import {DirectusConfig, Source} from "../util/types";
import * as postgresql from "@pulumi/postgresql";
import {createPostgresHelm} from "./components/postgres/chart/Postgres";
import {Namespace} from "@pulumi/kubernetes/core/v1";
import {RandomPassword} from "@pulumi/random";
export function createSurreal(by: Source, namespace: Namespace, dbRootPassword: RandomPassword, appDbPassword: RandomPassword) {
switch (by) {
case "manual":
throw Error("Not Implemented")
case "gke":
console.log("Not Implemented")
throw Error("Not Implemented")
case "azure":
console.log("Not Implemented")
throw Error("Not Implemented")
case "helm":
return createPostgresHelm(namespace,dbRootPassword, appDbPassword)
case "aws":
console.log("Not Implemented")
throw Error("Not Implemented")
}
}
export function createDatabase(name: string) {
const myDb = new postgresql.Database(name);
}