Skip to content

Commit

Permalink
better location for forceDestroy in tf-aws
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaiBer committed Oct 31, 2024
1 parent 4edfd41 commit bb0e71e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/@winglang/sdk/src/target-tf-aws/bucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export function createEncryptedBucket(

const bucket = new S3Bucket(scope, name, {
bucketPrefix,
forceDestroy: !!isTestEnvironment,
forceDestroy: !!isTestEnvironment || forceDestroy,
});

if (isPublic) {
Expand Down Expand Up @@ -278,9 +278,5 @@ export function createEncryptedBucket(
});
}

if (forceDestroy) {
bucket.forceDestroy = true;
}

return bucket;
}

0 comments on commit bb0e71e

Please sign in to comment.