Skip to content

Commit c2a6043

Browse files
committed
redeploy stacks for cfn nag suppress
1 parent bf49345 commit c2a6043

File tree

3 files changed

+23
-12
lines changed

3 files changed

+23
-12
lines changed

Diff for: source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3-and-kinesisanalytics/test/integ.customLoggingBucket.ts

+1-10
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,13 @@ import { App, Stack, RemovalPolicy } from "@aws-cdk/core";
1616
import { BucketEncryption } from "@aws-cdk/aws-s3";
1717
import { KinesisFirehoseToAnalyticsAndS3 } from "../lib";
1818
import { generateIntegStackName } from '@aws-solutions-constructs/core';
19-
import * as s3 from "@aws-cdk/aws-s3";
20-
import * as defaults from '@aws-solutions-constructs/core';
2119

2220
const app = new App();
2321

2422
// Empty arguments
2523
const stack = new Stack(app, generateIntegStackName(__filename));
2624

27-
const construct = new KinesisFirehoseToAnalyticsAndS3(stack, 'test-kinesisfirehose-analytics-s3', {
25+
new KinesisFirehoseToAnalyticsAndS3(stack, 'test-kinesisfirehose-analytics-s3', {
2826
kinesisAnalyticsProps: {
2927
inputs: [{
3028
inputSchema: {
@@ -64,11 +62,4 @@ const construct = new KinesisFirehoseToAnalyticsAndS3(stack, 'test-kinesisfireho
6462
}
6563
});
6664

67-
const s3Bucket = construct.s3Bucket as s3.Bucket;
68-
69-
defaults.addCfnSuppressRules(s3Bucket, [
70-
{ id: 'W35',
71-
reason: 'This S3 bucket is created for unit/ integration testing purposes only.' },
72-
]);
73-
7465
app.synth();

Diff for: source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3-and-kinesisanalytics/test/integ.noLoggingBucket.expected.json

+11-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,17 @@
3636
}
3737
},
3838
"UpdateReplacePolicy": "Delete",
39-
"DeletionPolicy": "Delete"
39+
"DeletionPolicy": "Delete",
40+
"Metadata": {
41+
"cfn_nag": {
42+
"rules_to_suppress": [
43+
{
44+
"id": "W35",
45+
"reason": "This S3 bucket is created for unit/ integration testing purposes only."
46+
}
47+
]
48+
}
49+
}
4050
},
4151
"testkinesisfirehoseanalyticss3KinesisFirehoseToS3S3BucketPolicy55E9C081": {
4252
"Type": "AWS::S3::BucketPolicy",

Diff for: source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3-and-kinesisanalytics/test/integ.noLoggingBucket.ts

+11-1
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@
1515
import { App, Stack, RemovalPolicy } from "@aws-cdk/core";
1616
import { KinesisFirehoseToAnalyticsAndS3 } from "../lib";
1717
import { generateIntegStackName } from '@aws-solutions-constructs/core';
18+
import * as s3 from "@aws-cdk/aws-s3";
19+
import * as defaults from '@aws-solutions-constructs/core';
1820

1921
const app = new App();
2022

2123
// Empty arguments
2224
const stack = new Stack(app, generateIntegStackName(__filename));
2325

24-
new KinesisFirehoseToAnalyticsAndS3(stack, 'test-kinesisfirehose-analytics-s3', {
26+
const construct = new KinesisFirehoseToAnalyticsAndS3(stack, 'test-kinesisfirehose-analytics-s3', {
2527
kinesisAnalyticsProps: {
2628
inputs: [{
2729
inputSchema: {
@@ -55,4 +57,12 @@ new KinesisFirehoseToAnalyticsAndS3(stack, 'test-kinesisfirehose-analytics-s3',
5557
},
5658
logS3AccessLogs: false
5759
});
60+
61+
const s3Bucket = construct.s3Bucket as s3.Bucket;
62+
63+
defaults.addCfnSuppressRules(s3Bucket, [
64+
{ id: 'W35',
65+
reason: 'This S3 bucket is created for unit/ integration testing purposes only.' },
66+
]);
67+
5868
app.synth();

0 commit comments

Comments
 (0)