forked from mattbolt/sstpoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sst.config.ts
31 lines (29 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
import {SSTConfig} from "sst";
import {NextjsSite} from "sst/constructs";
import {Vpc, SubnetType, SecurityGroup} from "aws-cdk-lib/aws-ec2";
export default {
config(_input) {
return {
name: "sstpoc",
region: "ap-southeast-2",
};
},
stacks(app) {
app.stack(function Site({stack}) {
const vpc = Vpc.fromLookup(stack, "Vpc", {
vpcName: 'SstPocCdk-Vpc',
});
const site = new NextjsSite(stack, "site", {
cdk: {
server: {
vpc,
securityGroups: [SecurityGroup.fromLookupByName(stack, "LambdaSecurityGroup", "SstPocCdk-LambdaSecurityGroup", vpc)],
}
}
});
stack.addOutputs({
SiteUrl: site.url,
});
});
},
} satisfies SSTConfig;