Skip to content

Commit 12a4243

Browse files
committed
chore: wip
1 parent d408c74 commit 12a4243

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

.stacks/core/cloud/src/cloud.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -351,9 +351,8 @@ export class StacksCloud extends Stack {
351351
if (config.cloud.cdn?.enableLogging) {
352352
logBucket = new s3.Bucket(this, 'LogBucket', {
353353
bucketName: `${this.appName}-logs-${appEnv}-${timestamp}`,
354-
removalPolicy: RemovalPolicy.RETAIN, // removed via buddy cloud:cleanup because oddly the files in the bucket don't get auto-deleted
355-
// removalPolicy: RemovalPolicy.DESTROY,
356-
// autoDeleteObjects: true,
354+
removalPolicy: RemovalPolicy.DESTROY,
355+
autoDeleteObjects: true,
357356
blockPublicAccess: new s3.BlockPublicAccess({
358357
blockPublicAcls: false,
359358
ignorePublicAcls: true,
@@ -370,7 +369,7 @@ export class StacksCloud extends Stack {
370369
// Daily 35 day retention
371370
const vault = new backup.BackupVault(this, 'BackupVault', {
372371
backupVaultName: `${this.appName}-${appEnv}-daily-backup-vault-${timestamp}`,
373-
// encryptionKey: this.storage?.encryptionKey,
372+
encryptionKey: this.storage?.emailBucket?.encryptionKey,
374373
})
375374
const plan = backup.BackupPlan.daily35DayRetention(this, 'BackupPlan', vault)
376375

@@ -757,6 +756,7 @@ export class StacksCloud extends Stack {
757756
})
758757

759758
const ruleName = 'Inbound'
759+
// const receiptRule = new ses.CfnReceiptRule(this, 'SESReceiptRule', {
760760
new ses.CfnReceiptRule(this, 'SESReceiptRule', {
761761
ruleSetName: ruleSet.ref,
762762
rule: {
@@ -766,7 +766,7 @@ export class StacksCloud extends Stack {
766766
{
767767
s3Action: {
768768
bucketName: this.storage.emailBucket.bucketName,
769-
// kmsKeyArn: this.storage.emailBucket.encryptionKey?.keyArn,
769+
kmsKeyArn: this.storage.emailBucket.encryptionKey?.keyArn,
770770
objectKeyPrefix: 'tmp/email_in',
771771
},
772772
},
@@ -804,10 +804,10 @@ export class StacksCloud extends Stack {
804804
'kms:Decrypt',
805805
'kms:GenerateDataKey',
806806
],
807-
resources: ['*'],
807+
resources: [this.storage.emailBucket.encryptionKey?.keyArn || '*'],
808808
conditions: {
809809
StringEquals: {
810-
'aws:SourceAccount': this.account,
810+
'aws:SourceAccount': Stack.of(this).account,
811811
},
812812
ArnLike: {
813813
'aws:SourceArn': `arn:aws:ses:${this.region}:${Stack.of(this).account}:receipt-rule-set/${ruleSetName}:receipt-rule/${ruleName}`,
@@ -1195,7 +1195,7 @@ export class StacksCloud extends Stack {
11951195
versioned: true,
11961196
removalPolicy: RemovalPolicy.DESTROY,
11971197
autoDeleteObjects: true,
1198-
encryption: s3.BucketEncryption.S3_MANAGED,
1198+
encryption: s3.BucketEncryption.KMS_MANAGED,
11991199
enforceSSL: true,
12001200
publicReadAccess: false,
12011201
blockPublicAccess: {
@@ -1223,7 +1223,7 @@ export class StacksCloud extends Stack {
12231223
versioned: true,
12241224
removalPolicy: RemovalPolicy.DESTROY,
12251225
autoDeleteObjects: true,
1226-
// encryption: s3.BucketEncryption.S3_MANAGED,
1226+
encryption: s3.BucketEncryption.KMS_MANAGED,
12271227
lifecycleRules: [
12281228
{
12291229
id: '24h',

.stacks/ide/dictionary.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ tsup
241241
typecheck
242242
typesense
243243
unconfig
244+
undeploys
244245
unhead
245246
unimport
246247
unocss

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ buddy deploy # select a specific deployment (follow CLI prompts)
231231
# buddy deploy:functions # deploys functions to AWS (or other configured provider)
232232
# buddy deploy:views # deploys views to AWS (or other configured provider)
233233
# buddy deploy:all # deploys all your code
234+
buddy undeploy # be careful: "undeploys" removes/deletes your deployed resources
234235

235236
buddy cloud:cleanup # removes cloud setup
236237
buddy cloud:remove # removes cloud setup

bun.lockb

13.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)