From 604bf6bcf4a682b90df11e1327d139a7406dfe74 Mon Sep 17 00:00:00 2001 From: Luis Morales Date: Thu, 20 Jun 2024 11:11:52 +0200 Subject: [PATCH] Make removal policy explicit --- infrastructure/kinesis-load-testing-with-locust.ts | 2 ++ .../__snapshots__/kinesis-load-testing-with-locust.test.ts.snap | 2 ++ 2 files changed, 4 insertions(+) diff --git a/infrastructure/kinesis-load-testing-with-locust.ts b/infrastructure/kinesis-load-testing-with-locust.ts index 855be78..aedc19f 100644 --- a/infrastructure/kinesis-load-testing-with-locust.ts +++ b/infrastructure/kinesis-load-testing-with-locust.ts @@ -71,6 +71,8 @@ export class KinesisLoadTestingWithLocustStack extends cdk.Stack { const demoStream = new kinesis.Stream(this, "DemoStream", { streamName: "DemoStream", streamMode: kinesis.StreamMode.ON_DEMAND, + + removalPolicy: cdk.RemovalPolicy.DESTROY, // Remove to clean up the environment }); const locustLoadTestDirectory = new Asset(this, "LocustLoadTestDirectory", { diff --git a/test/__snapshots__/kinesis-load-testing-with-locust.test.ts.snap b/test/__snapshots__/kinesis-load-testing-with-locust.test.ts.snap index 927522b..68d9066 100644 --- a/test/__snapshots__/kinesis-load-testing-with-locust.test.ts.snap +++ b/test/__snapshots__/kinesis-load-testing-with-locust.test.ts.snap @@ -56,6 +56,7 @@ Object { }, "Resources": Object { "DemoStream7DBE9115": Object { + "DeletionPolicy": "Delete", "Properties": Object { "Name": "DemoStream", "RetentionPeriodHours": 24, @@ -76,6 +77,7 @@ Object { }, }, "Type": "AWS::Kinesis::Stream", + "UpdateReplacePolicy": "Delete", }, "LoadtestingVPC470E256F": Object { "Properties": Object {