Skip to content

Commit

Permalink
sst.aws.DEFAULT_ACCOUNT_ID
Browse files Browse the repository at this point in the history
  • Loading branch information
thdxr committed Mar 12, 2024
1 parent c0dd2ad commit e4d9735
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
5 changes: 2 additions & 3 deletions examples/cf-backend/sst.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ export default $config({
};
},
async run() {
// You do not have to set this, it's injected automatically
const account = process.env.CLOUDFLARE_DEFAULT_ACCOUNT_ID!;
$app;
const kv = new cloudflare.WorkersKvNamespace("MyKv", {
title: "MyKv",
accountId: account,
accountId: sst.cloudflare.DEFAULT_ACCOUNT_ID,
});
},
});
1 change: 1 addition & 0 deletions pkg/platform/src/components/cloudflare/account-id.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const DEFAULT_ACCOUNT_ID = process.env.CLOUDFLARE_DEFAULT_ACCOUNT_ID!;
1 change: 1 addition & 0 deletions pkg/platform/src/components/cloudflare/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ export * from "./bucket";
export * from "./kv";
export * from "./static-site";
export * from "./worker";
export * from "./account-id";

0 comments on commit e4d9735

Please sign in to comment.