sst / ion

❍ — a new engine for SST
https://ion.sst.dev
MIT License
1.19k stars 148 forks source link

feat: expose VPC config in ssr-site, include permissions when building Next.js plan #266

Closed kane50613 closed 3 months ago

kane50613 commented 3 months ago

Allowing custom vpc configuration #261


To access the function args before this PR merged, use the transform function as below:

new sst.aws.Nextjs("App", {
  transform: {
    server(fn) {
      fn.vpc = {
        subnets: ["..."],
        securityGroups: ["..."],
      };

      fn.permissions = [
        // @ts-expect-error
        ...fn.permissions,
        {
          actions: ["..."],
          resources: ["..."],
        },
      ];
    },
  },
});
fwang commented 3 months ago

Thanks @kane50613!

In v0.0.324, u can set vpc like this — https://ion.sst.dev/docs/component/aws/nextjs/#vpc

Also fixed permissions

kane50613 commented 3 months ago

that's great news to hear!