-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsst.config.ts
33 lines (31 loc) · 918 Bytes
/
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
import { SSTConfig } from "sst";
import { FrontendStack } from "./stacks/FrontendStack";
import { DBStack } from "./stacks/DBStack";
import { ApiStack } from "./stacks/ApiStack";
import { ImageBuilderForCodeCatalyst } from "./stacks/devops/ImageBuilderForCodeCatalyst";
import { OIDCForGitHubCI } from "./stacks/devops/OIDCForGitHubCI";
export default {
config(_input) {
return {
name: "codecatalyst-sst-app",
region: "us-east-1",
};
},
stacks(app) {
// Remove all resources when non-prod stages are removed
if (app.stage !== "prod") {
app.setDefaultRemovalPolicy("destroy");
}
if (app.stage == 'devops-coca') {
app.stack(ImageBuilderForCodeCatalyst)
}
else if (app.stage == 'devops-gh') {
app.stack(OIDCForGitHubCI)
}
else {
app.stack(DBStack)
.stack(ApiStack)
.stack(FrontendStack);
}
}
} satisfies SSTConfig;