-
Notifications
You must be signed in to change notification settings - Fork 19
/
sst.config.ts
45 lines (42 loc) · 1.08 KB
/
sst.config.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
34
35
36
37
38
39
40
41
42
43
44
45
import type { SSTConfig } from "sst"
import { Api } from "./stacks/Api";
import { Web } from "./stacks/Web";
import { Auth } from "./stacks/Auth";
import { Ml } from "./stacks/Ml";
import { Misc } from "./stacks/Misc";
import { Logs } from "./stacks/Logs";
import { Tags } from 'aws-cdk-lib';
import { SharedCreate, SharedImport, sharedStage } from './stacks/Shared'
export default {
config(input) {
return {
"name": "gnothi",
"region": "us-east-1",
// profile: "my-company-dev"
}
},
stacks(app) {
app.setDefaultFunctionProps({
runtime: "nodejs18.x",
architecture: "arm_64",
nodejs: {
format: "esm"
}
})
const stage = app.stage
Tags.of(app).add('app', 'gnothi')
Tags.of(app).add('stage', stage)
Tags.of(app).add('stageShared', sharedStage(stage))
if (stage.startsWith("shared")) {
app.stack(SharedCreate)
} else {
app.stack(SharedImport)
.stack(Logs)
.stack(Misc)
.stack(Auth)
.stack(Ml)
.stack(Api)
.stack(Web)
}
},
} satisfies SSTConfig