Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

chore(s3): Add bucket deletion policies (#1267)

Evan Hutnike44f1dd2cada
diff --git a/infra/stacks/document-storage/index.ts b/infra/stacks/document-storage/index.ts
index 177a73cb3a..3e3aa92934 100644
--- a/infra/stacks/document-storage/index.ts
+++ b/infra/stacks/document-storage/index.ts
@@ -31,6 +31,13 @@ const documentStorageBucket = createBucket({
expiredObjectDeleteMarker: true,
},
},
+ {
+ id: `noncurrent-version-cleanup-${stack}`,
+ enabled: true,
+ noncurrentVersionExpiration: {
+ days: 30,
+ },
+ },
],
exposeHeaders: ['Content-Length', 'Content-Range'],
});
diff --git a/infra/stacks/static-file-service/static-file-service.ts b/infra/stacks/static-file-service/static-file-service.ts
index 39a5be30a5..03b959792a 100644
--- a/infra/stacks/static-file-service/static-file-service.ts
+++ b/infra/stacks/static-file-service/static-file-service.ts
@@ -118,6 +118,17 @@ export class StaticFileService extends pulumi.ComponentResource {
enabled: true,
mfaDelete: false,
},
+ lifecycleRules: [
+ {
+ enabled: true,
+ noncurrentVersionExpiration: {
+ days: 7,
+ },
+ expiration: {
+ expiredObjectDeleteMarker: true,
+ },
+ },
+ ],
corsRules: [
{
allowedHeaders: ['*'],