From 2953fc281562009ea5965e057b826b5fe5cd392c Mon Sep 17 00:00:00 2001 From: Brendan Allan Date: Wed, 15 Oct 2025 15:01:38 +0800 Subject: [PATCH 1/6] configure sst for git branches --- infra/sst.config.ts | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/infra/sst.config.ts b/infra/sst.config.ts index ddf7800fac..5c62009283 100644 --- a/infra/sst.config.ts +++ b/infra/sst.config.ts @@ -93,7 +93,9 @@ export default $config({ aud, url, provider: - $app.stage === "production" || $app.stage === "staging" + $app.stage === "production" || + $app.stage === "staging" || + $app.stage.startsWith("git-branch-") ? aws.iam.getOpenIdConnectProviderOutput({ url: `https://${url}` }) : new aws.iam.OpenIdConnectProvider( "VercelAWSOIDC", @@ -119,7 +121,7 @@ export default $config({ }, StringLike: { [`${oidc.url}:sub`]: [ - `owner:${VERCEL_TEAM_SLUG}:project:*:environment:${$app.stage}`, + `owner:${VERCEL_TEAM_SLUG}:project:*:environment:${$app.stage.startsWith("git-branch-") ? "preview" : $app.stage}`, ], }, }, @@ -188,7 +190,16 @@ export default $config({ ? ["env_CFbtmnpsI11e4o8X5UD8MZzxELQi"] : undefined, targets: - $app.stage === "staging" ? undefined : ["preview", "production"], + $app.stage === "production" + ? ["production"] + : $app.stage === "staging" + ? ["development", "preview"] + : $app.stage.startsWith("git-branch-") + ? ["preview"] + : undefined, + gitBranch: $app.stage.startsWith("git-branch-") + ? new sst.Secret("GIT_BRANCH_NAME").value + : undefined, }); }); } From df186ca9d78dd0fcd53f7900cacb3a3ebd393e52 Mon Sep 17 00:00:00 2001 From: EC2 Default User Date: Wed, 15 Oct 2025 08:20:25 +0000 Subject: [PATCH 2/6] prefer aws role --- infra/sst-env.d.ts | 53 +++------------ infra/sst.config.ts | 114 +++++++++++++++++--------------- packages/web-backend/src/Aws.ts | 11 +-- 3 files changed, 74 insertions(+), 104 deletions(-) diff --git a/infra/sst-env.d.ts b/infra/sst-env.d.ts index 676bd17b83..5dd77fe2fa 100644 --- a/infra/sst-env.d.ts +++ b/infra/sst-env.d.ts @@ -4,51 +4,14 @@ /* deno-fmt-ignore-file */ declare module "sst" { - export interface Resource { - AuroraDB: { - clusterArn: string; - database: string; - host: string; - password: string; - port: number; - reader: string; - secretArn: string; - type: "sst.aws.Aurora"; - username: string; - }; - CAP_AWS_ACCESS_KEY: { - type: "sst.sst.Secret"; - value: string; - }; - CAP_AWS_SECRET_KEY: { - type: "sst.sst.Secret"; - value: string; - }; - DATABASE_URL_MYSQL: { - type: "sst.sst.Secret"; - value: string; - }; - GITHUB_PAT: { - type: "sst.sst.Secret"; - value: string; - }; - MyApi: { - type: "sst.aws.ApiGatewayV2"; - url: string; - }; - Runner: { - service: string; - type: "sst.aws.Service"; - }; - ShardManager: { - service: string; - type: "sst.aws.Service"; - }; - Vpc: { - type: "sst.aws.Vpc"; - }; - } + export interface Resource { + "DATABASE_URL_MYSQL": { + "type": "sst.sst.Secret" + "value": string + } + } } /// -import "sst"; +import "sst" +export {} \ No newline at end of file diff --git a/infra/sst.config.ts b/infra/sst.config.ts index 5c62009283..6c8a422f09 100644 --- a/infra/sst.config.ts +++ b/infra/sst.config.ts @@ -6,6 +6,7 @@ const GITHUB_ORG = "CapSoftware"; const GITHUB_REPO = "Cap"; const GITHUB_APP_ID = "1196731"; +const VERCEL_PROJECT_NAME = "cap-web"; const VERCEL_TEAM_SLUG = "mc-ilroy"; const VERCEL_TEAM_ID = "team_vbZRU7UW78rpKKIj4c9PfFAC"; @@ -13,6 +14,13 @@ const CLOUDFLARE_ACCOUNT_ID = "3de2dd633194481d80f68f55257bdbaa"; const AXIOM_API_TOKEN = "xaat-c0704be6-e942-4935-b068-3b491d7cc00f"; const AXIOM_DATASET = "cap-otel"; +const parsedStage = () => { + if($app.stage === "staging") return { variant: "staging" } as const + if($app.stage === "production") return { variant: "production" } as const + if($app.stage.startsWith("git-branch-")) return { variant: "git-branch", branch: $app.stage.slice("git-branch-".length) } as const + throw new Error("Unsupported stage") +} + export default $config({ app(input) { return { @@ -37,11 +45,12 @@ export default $config({ }; }, async run() { + const stage = parsedStage(); const WEB_URLS: Record = { production: "https://cap.so", staging: "https://staging.cap.so", }; - const webUrl = WEB_URLS[$app.stage]; + const webUrl = WEB_URLS[stage.variant] ?? `https://${VERCEL_PROJECT_NAME}-git-${stage.branch}-${VERCEL_TEAM_SLUG}.vercel.app`; const secrets = Secrets(); // const planetscale = Planetscale(); @@ -58,10 +67,10 @@ export default $config({ { key: "DATABASE_URL", value: secrets.DATABASE_URL_MYSQL.value }, ]; - // new aws.s3.BucketAccelerateConfigurationV2("RecordingsBucketAcceleration", { - // bucket: recordingsBucket.id, - // status: "Enabled", - // }); + new aws.s3.BucketAccelerateConfigurationV2("RecordingsBucketAcceleration", { + bucket: recordingsBucket.id, + status: "Enabled", + }); const cloudfrontDistribution = $app.stage === "production" @@ -70,7 +79,7 @@ export default $config({ const vercelUser = new aws.iam.User("VercelUser", { forceDestroy: false }); - const vercelProject = vercel.getProjectOutput({ name: "cap-web" }); + const vercelProject = vercel.getProjectOutput({ name: VERCEL_PROJECT_NAME }); if (webUrl) vercelVariables.push( @@ -165,44 +174,42 @@ export default $config({ ? await WorkflowCluster(recordingsBucket, secrets) : null; - if ($app.stage === "staging" || $app.stage === "production") { - [ - ...vercelVariables, - workflowCluster && { - key: "WORKFLOWS_RPC_URL", - value: workflowCluster.api.url, - }, - workflowCluster && { - key: "WORKFLOWS_RPC_SECRET", - value: secrets.WORKFLOWS_RPC_SECRET.result, - }, - { key: "VERCEL_AWS_ROLE_ARN", value: vercelAwsAccessRole.arn }, - ] - .filter(Boolean) - .forEach((_v) => { - const v = _v as NonNullable; - - new vercel.ProjectEnvironmentVariable(`VercelEnv${v.key}`, { - ...v, - projectId: vercelProject.id, - customEnvironmentIds: - $app.stage === "staging" - ? ["env_CFbtmnpsI11e4o8X5UD8MZzxELQi"] - : undefined, - targets: - $app.stage === "production" - ? ["production"] - : $app.stage === "staging" - ? ["development", "preview"] - : $app.stage.startsWith("git-branch-") - ? ["preview"] - : undefined, - gitBranch: $app.stage.startsWith("git-branch-") - ? new sst.Secret("GIT_BRANCH_NAME").value + [ + ...vercelVariables, + workflowCluster && { + key: "WORKFLOWS_RPC_URL", + value: workflowCluster.api.url, + }, + workflowCluster && { + key: "WORKFLOWS_RPC_SECRET", + value: secrets.WORKFLOWS_RPC_SECRET.result, + }, + { key: "VERCEL_AWS_ROLE_ARN", value: vercelAwsAccessRole.arn }, + ] + .filter(Boolean) + .forEach((_v) => { + const v = _v as NonNullable; + + new vercel.ProjectEnvironmentVariable(`VercelEnv${v.key}`, { + ...v, + projectId: vercelProject.id, + customEnvironmentIds: + stage.variant === "staging" + ? ["env_CFbtmnpsI11e4o8X5UD8MZzxELQi"] : undefined, - }); + targets: + stage.variant === "production" + ? ["production"] + : stage.variant === "staging" + ? ["development", "preview"] + : stage.variant === "git-branch" + ? ["preview"] + : undefined, + gitBranch: stage.variant === "git-branch" + ? stage.branch + : undefined, }); - } + }); // DiscordBot(); }, @@ -211,9 +218,7 @@ export default $config({ function Secrets() { return { DATABASE_URL_MYSQL: new sst.Secret("DATABASE_URL_MYSQL"), - CAP_AWS_ACCESS_KEY: new sst.Secret("CAP_AWS_ACCESS_KEY"), - CAP_AWS_SECRET_KEY: new sst.Secret("CAP_AWS_SECRET_KEY"), - GITHUB_PAT: new sst.Secret("GITHUB_PAT"), + GITHUB_PAT: $app.stage === "staging" ? new sst.Secret("GITHUB_PAT") : undefined, WORKFLOWS_RPC_SECRET: new random.RandomString("WORKFLOWS_RPC_SECRET", { length: 48, }), @@ -323,15 +328,16 @@ async function WorkflowCluster(bucket: aws.s3.BucketV2, secrets: Secrets) { "GHCRCredentialsSecret", ); - new aws.secretsmanager.SecretVersion("GHCRCredentialsSecretVersion", { - secretId: ghcrCredentialsSecret.id, - secretString: secrets.GITHUB_PAT.value.apply((password) => - JSON.stringify({ - username: "brendonovich", - password, - }), - ), - }); + if(secrets.GITHUB_PAT) + new aws.secretsmanager.SecretVersion("GHCRCredentialsSecretVersion", { + secretId: ghcrCredentialsSecret.id, + secretString: secrets.GITHUB_PAT.value.apply((password) => + JSON.stringify({ + username: "brendonovich", + password, + }), + ), + }); const ghcrCredentialsTransform = { taskRole(args) { diff --git a/packages/web-backend/src/Aws.ts b/packages/web-backend/src/Aws.ts index 3fc945840e..852189255a 100644 --- a/packages/web-backend/src/Aws.ts +++ b/packages/web-backend/src/Aws.ts @@ -22,14 +22,15 @@ export class AwsCredentials extends Effect.Service()( Config.string("VERCEL_AWS_ROLE_ARN"), ); - if (Option.isSome(accessKeys)) { + if (Option.isSome(vercelAwsRole)) { + yield* Effect.log("Using VERCEL_AWS_ROLE_ARN"); + credentials = awsCredentialsProvider({ roleArn: vercelAwsRole.value }); + } else if (Option.isSome(accessKeys)) { const [accessKeyId, secretAccessKey] = accessKeys.value; yield* Effect.log("Using CAP_AWS_ACCESS_KEY and CAP_AWS_SECRET_KEY"); credentials = { accessKeyId, secretAccessKey }; - } else if (Option.isSome(vercelAwsRole)) { - yield* Effect.log("Using VERCEL_AWS_ROLE_ARN"); - credentials = awsCredentialsProvider({ roleArn: vercelAwsRole.value }); - } else if (process.env.NODE_ENV === "development") { + } + if (process.env.NODE_ENV === "development") { yield* Effect.log("Using AWS_DEFAULT_PROFILE"); credentials = fromSSO({ profile: process.env.AWS_DEFAULT_PROFILE }); } else { From 0f194b370a411cf8e51dbbd5baa768a51bfcf94c Mon Sep 17 00:00:00 2001 From: EC2 Default User Date: Wed, 15 Oct 2025 08:27:58 +0000 Subject: [PATCH 3/6] fix else if --- packages/web-backend/src/Aws.ts | 40 +++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/packages/web-backend/src/Aws.ts b/packages/web-backend/src/Aws.ts index 852189255a..fb524aee7b 100644 --- a/packages/web-backend/src/Aws.ts +++ b/packages/web-backend/src/Aws.ts @@ -10,8 +10,6 @@ export class AwsCredentials extends Effect.Service()( "AwsCredentials", { effect: Effect.gen(function* () { - let credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider; - const accessKeys = yield* Config.option( Config.all([ Config.string("CAP_AWS_ACCESS_KEY"), @@ -22,21 +20,29 @@ export class AwsCredentials extends Effect.Service()( Config.string("VERCEL_AWS_ROLE_ARN"), ); - if (Option.isSome(vercelAwsRole)) { - yield* Effect.log("Using VERCEL_AWS_ROLE_ARN"); - credentials = awsCredentialsProvider({ roleArn: vercelAwsRole.value }); - } else if (Option.isSome(accessKeys)) { - const [accessKeyId, secretAccessKey] = accessKeys.value; - yield* Effect.log("Using CAP_AWS_ACCESS_KEY and CAP_AWS_SECRET_KEY"); - credentials = { accessKeyId, secretAccessKey }; - } - if (process.env.NODE_ENV === "development") { - yield* Effect.log("Using AWS_DEFAULT_PROFILE"); - credentials = fromSSO({ profile: process.env.AWS_DEFAULT_PROFILE }); - } else { - yield* Effect.log("Falling back to ECS metadata"); - credentials = fromContainerMetadata(); - } + const credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider = + yield* Effect.gen(function* () { + if (Option.isSome(vercelAwsRole)) { + yield* Effect.log("Using VERCEL_AWS_ROLE_ARN"); + return awsCredentialsProvider({ roleArn: vercelAwsRole.value }); + } + + if (Option.isSome(accessKeys)) { + const [accessKeyId, secretAccessKey] = accessKeys.value; + yield* Effect.log( + "Using CAP_AWS_ACCESS_KEY and CAP_AWS_SECRET_KEY", + ); + return { accessKeyId, secretAccessKey }; + } + + if (process.env.NODE_ENV === "development") { + yield* Effect.log("Using AWS_DEFAULT_PROFILE"); + return fromSSO({ profile: process.env.AWS_DEFAULT_PROFILE }); + } + + yield* Effect.log("Falling back to ECS metadata"); + return fromContainerMetadata(); + }); return { credentials }; }), From 449ce14f426d5233e27200b959944f39fa4592c2 Mon Sep 17 00:00:00 2001 From: EC2 Default User Date: Wed, 15 Oct 2025 09:38:35 +0000 Subject: [PATCH 4/6] everything running on staging yay --- infra/sst-env.d.ts | 30 +++++++++++++++ infra/sst.config.ts | 90 +++++++++++++++++++++++++++++++-------------- 2 files changed, 92 insertions(+), 28 deletions(-) diff --git a/infra/sst-env.d.ts b/infra/sst-env.d.ts index 5dd77fe2fa..21996f4bbc 100644 --- a/infra/sst-env.d.ts +++ b/infra/sst-env.d.ts @@ -5,10 +5,40 @@ declare module "sst" { export interface Resource { + "AuroraDB": { + "clusterArn": string + "database": string + "host": string + "password": string + "port": number + "reader": string + "secretArn": string + "type": "sst.aws.Aurora" + "username": string + } "DATABASE_URL_MYSQL": { "type": "sst.sst.Secret" "value": string } + "GITHUB_PAT": { + "type": "sst.sst.Secret" + "value": string + } + "MyApi": { + "type": "sst.aws.ApiGatewayV2" + "url": string + } + "Runner": { + "service": string + "type": "sst.aws.Service" + } + "ShardManager": { + "service": string + "type": "sst.aws.Service" + } + "Vpc": { + "type": "sst.aws.Vpc" + } } } /// diff --git a/infra/sst.config.ts b/infra/sst.config.ts index 6c8a422f09..735acddcc6 100644 --- a/infra/sst.config.ts +++ b/infra/sst.config.ts @@ -15,11 +15,15 @@ const AXIOM_API_TOKEN = "xaat-c0704be6-e942-4935-b068-3b491d7cc00f"; const AXIOM_DATASET = "cap-otel"; const parsedStage = () => { - if($app.stage === "staging") return { variant: "staging" } as const - if($app.stage === "production") return { variant: "production" } as const - if($app.stage.startsWith("git-branch-")) return { variant: "git-branch", branch: $app.stage.slice("git-branch-".length) } as const - throw new Error("Unsupported stage") -} + if ($app.stage === "staging") return { variant: "staging" } as const; + if ($app.stage === "production") return { variant: "production" } as const; + if ($app.stage.startsWith("git-branch-")) + return { + variant: "git-branch", + branch: $app.stage.slice("git-branch-".length), + } as const; + throw new Error("Unsupported stage"); +}; export default $config({ app(input) { @@ -50,7 +54,9 @@ export default $config({ production: "https://cap.so", staging: "https://staging.cap.so", }; - const webUrl = WEB_URLS[stage.variant] ?? `https://${VERCEL_PROJECT_NAME}-git-${stage.branch}-${VERCEL_TEAM_SLUG}.vercel.app`; + const webUrl = + WEB_URLS[stage.variant] ?? + `https://${VERCEL_PROJECT_NAME}-git-${stage.branch}-${VERCEL_TEAM_SLUG}.vercel.app`; const secrets = Secrets(); // const planetscale = Planetscale(); @@ -60,6 +66,26 @@ export default $config({ { retainOnDelete: true }, ); + new aws.s3.BucketCorsConfigurationV2("RecordingsBucketCors", { + bucket: recordingsBucket.bucket, + corsRules: [ + { + allowedHeaders: ["*"], + allowedMethods: ["GET", "POST"], + allowedOrigins: + stage.variant === "production" + ? [ + "https://cap.so", + "https://cap.link", + "https://v.cap.so", + "https://dyk2p776s2gx5.cloudfront.net", + ] + : ["http://localhost:*", "https://*.vercel.app", webUrl], + exposeHeaders: [], + }, + ], + }); + const vercelVariables = [ { key: "NEXT_PUBLIC_AXIOM_TOKEN", value: AXIOM_API_TOKEN }, { key: "NEXT_PUBLIC_AXIOM_DATASET", value: AXIOM_DATASET }, @@ -79,7 +105,9 @@ export default $config({ const vercelUser = new aws.iam.User("VercelUser", { forceDestroy: false }); - const vercelProject = vercel.getProjectOutput({ name: VERCEL_PROJECT_NAME }); + const vercelProject = vercel.getProjectOutput({ + name: VERCEL_PROJECT_NAME, + }); if (webUrl) vercelVariables.push( @@ -190,25 +218,30 @@ export default $config({ .forEach((_v) => { const v = _v as NonNullable; - new vercel.ProjectEnvironmentVariable(`VercelEnv${v.key}`, { - ...v, - projectId: vercelProject.id, - customEnvironmentIds: - stage.variant === "staging" - ? ["env_CFbtmnpsI11e4o8X5UD8MZzxELQi"] - : undefined, - targets: - stage.variant === "production" - ? ["production"] - : stage.variant === "staging" - ? ["development", "preview"] - : stage.variant === "git-branch" - ? ["preview"] - : undefined, - gitBranch: stage.variant === "git-branch" - ? stage.branch - : undefined, - }); + new vercel.ProjectEnvironmentVariable( + `VercelEnv${v.key}`, + { + ...v, + projectId: vercelProject.id, + customEnvironmentIds: + stage.variant === "staging" + ? ["env_CFbtmnpsI11e4o8X5UD8MZzxELQi"] + : undefined, + targets: + stage.variant === "production" + ? ["production"] + : stage.variant === "staging" + ? ["development", "preview"] + : stage.variant === "git-branch" + ? ["preview"] + : undefined, + gitBranch: + stage.variant === "git-branch" ? stage.branch : undefined, + comment: + "This var is being managed by SST, do not edit or delete it via the Vercel dashboard", + }, + { deleteBeforeReplace: true }, + ); }); // DiscordBot(); @@ -218,7 +251,8 @@ export default $config({ function Secrets() { return { DATABASE_URL_MYSQL: new sst.Secret("DATABASE_URL_MYSQL"), - GITHUB_PAT: $app.stage === "staging" ? new sst.Secret("GITHUB_PAT") : undefined, + GITHUB_PAT: + $app.stage === "staging" ? new sst.Secret("GITHUB_PAT") : undefined, WORKFLOWS_RPC_SECRET: new random.RandomString("WORKFLOWS_RPC_SECRET", { length: 48, }), @@ -328,7 +362,7 @@ async function WorkflowCluster(bucket: aws.s3.BucketV2, secrets: Secrets) { "GHCRCredentialsSecret", ); - if(secrets.GITHUB_PAT) + if (secrets.GITHUB_PAT) new aws.secretsmanager.SecretVersion("GHCRCredentialsSecretVersion", { secretId: ghcrCredentialsSecret.id, secretString: secrets.GITHUB_PAT.value.apply((password) => From d60acc7e3f02d6694429b27d891378e146503daa Mon Sep 17 00:00:00 2001 From: Brendan Allan Date: Wed, 15 Oct 2025 17:44:09 +0800 Subject: [PATCH 5/6] cleanup stage management --- infra/sst.config.ts | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/infra/sst.config.ts b/infra/sst.config.ts index 735acddcc6..6747adb5ca 100644 --- a/infra/sst.config.ts +++ b/infra/sst.config.ts @@ -99,7 +99,7 @@ export default $config({ }); const cloudfrontDistribution = - $app.stage === "production" + stage.variant === "production" ? aws.cloudfront.getDistributionOutput({ id: "E36XSZEM0VIIYB" }) : null; @@ -129,16 +129,9 @@ export default $config({ return { aud, url, - provider: - $app.stage === "production" || - $app.stage === "staging" || - $app.stage.startsWith("git-branch-") - ? aws.iam.getOpenIdConnectProviderOutput({ url: `https://${url}` }) - : new aws.iam.OpenIdConnectProvider( - "VercelAWSOIDC", - { url: `https://${url}`, clientIdLists: [aud] }, - { retainOnDelete: true }, - ), + provider: aws.iam.getOpenIdConnectProviderOutput({ + url: `https://${url}`, + }), }; })(); @@ -158,7 +151,7 @@ export default $config({ }, StringLike: { [`${oidc.url}:sub`]: [ - `owner:${VERCEL_TEAM_SLUG}:project:*:environment:${$app.stage.startsWith("git-branch-") ? "preview" : $app.stage}`, + `owner:${VERCEL_TEAM_SLUG}:project:*:environment:${stage.variant === "git-branch" ? "preview" : stage.variant}`, ], }, }, @@ -198,7 +191,7 @@ export default $config({ }); const workflowCluster = - $app.stage === "staging" + stage.variant === "staging" ? await WorkflowCluster(recordingsBucket, secrets) : null; From 95c04a8641cdd7c243ccd586e24a2b68e4521833 Mon Sep 17 00:00:00 2001 From: Brendan Allan Date: Wed, 15 Oct 2025 17:45:06 +0800 Subject: [PATCH 6/6] formatting --- .../(window-chrome)/settings/general.tsx | 2 +- infra/sst-env.d.ts | 75 +++++++++---------- 2 files changed, 38 insertions(+), 39 deletions(-) diff --git a/apps/desktop/src/routes/(window-chrome)/settings/general.tsx b/apps/desktop/src/routes/(window-chrome)/settings/general.tsx index 7c9c1d77ca..39a3dd055c 100644 --- a/apps/desktop/src/routes/(window-chrome)/settings/general.tsx +++ b/apps/desktop/src/routes/(window-chrome)/settings/general.tsx @@ -14,7 +14,7 @@ import { createMemo, createResource, For, - ParentProps, + type ParentProps, Show, } from "solid-js"; import { createStore, reconcile } from "solid-js/store"; diff --git a/infra/sst-env.d.ts b/infra/sst-env.d.ts index 21996f4bbc..2388d146b6 100644 --- a/infra/sst-env.d.ts +++ b/infra/sst-env.d.ts @@ -4,44 +4,43 @@ /* deno-fmt-ignore-file */ declare module "sst" { - export interface Resource { - "AuroraDB": { - "clusterArn": string - "database": string - "host": string - "password": string - "port": number - "reader": string - "secretArn": string - "type": "sst.aws.Aurora" - "username": string - } - "DATABASE_URL_MYSQL": { - "type": "sst.sst.Secret" - "value": string - } - "GITHUB_PAT": { - "type": "sst.sst.Secret" - "value": string - } - "MyApi": { - "type": "sst.aws.ApiGatewayV2" - "url": string - } - "Runner": { - "service": string - "type": "sst.aws.Service" - } - "ShardManager": { - "service": string - "type": "sst.aws.Service" - } - "Vpc": { - "type": "sst.aws.Vpc" - } - } + export interface Resource { + AuroraDB: { + clusterArn: string; + database: string; + host: string; + password: string; + port: number; + reader: string; + secretArn: string; + type: "sst.aws.Aurora"; + username: string; + }; + DATABASE_URL_MYSQL: { + type: "sst.sst.Secret"; + value: string; + }; + GITHUB_PAT: { + type: "sst.sst.Secret"; + value: string; + }; + MyApi: { + type: "sst.aws.ApiGatewayV2"; + url: string; + }; + Runner: { + service: string; + type: "sst.aws.Service"; + }; + ShardManager: { + service: string; + type: "sst.aws.Service"; + }; + Vpc: { + type: "sst.aws.Vpc"; + }; + } } /// -import "sst" -export {} \ No newline at end of file +import "sst";