Skip to content

Commit 0df6358

Browse files
committed
Fix more cfn_nag issues
1 parent 54fc793 commit 0df6358

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

Diff for: source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.deployPublicApiExistingAlb.expected.json

+10-1
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,6 @@
667667
"Value": "false"
668668
}
669669
],
670-
"Name": "find-this-name",
671670
"Scheme": "internal",
672671
"SecurityGroups": [
673672
{
@@ -689,6 +688,16 @@
689688
}
690689
],
691690
"Type": "application"
691+
},
692+
"Metadata": {
693+
"cfn_nag": {
694+
"rules_to_suppress": [
695+
{
696+
"id": "W52",
697+
"reason": "Test ALB only."
698+
}
699+
]
700+
}
692701
}
693702
},
694703
"testalbSecurityGroup0C84CDF9": {

Diff for: source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.deployWithoutLogging.expected.json

+10
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@
4545
}
4646
],
4747
"Type": "application"
48+
},
49+
"Metadata": {
50+
"cfn_nag": {
51+
"rules_to_suppress": [
52+
{
53+
"id": "W52",
54+
"reason": "This test is explicitly to test the no logging case."
55+
}
56+
]
57+
}
4858
}
4959
},
5060
"testroute53albtestroute53albalbSecurityGroupC3716E02": {

Diff for: source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.deployWithoutLogging.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import { App, Stack, Aws } from "@aws-cdk/core";
1616
import { Route53ToAlb, Route53ToAlbProps } from "../lib";
1717
import { generateIntegStackName } from '@aws-solutions-constructs/core';
18+
import * as defaults from '@aws-solutions-constructs/core';
1819

1920
// Setup
2021
const app = new App();
@@ -32,7 +33,9 @@ const props: Route53ToAlbProps = {
3233
logAccessLogs: false,
3334
};
3435

35-
new Route53ToAlb(stack, 'test-route53-alb', props);
36+
const testConstruct = new Route53ToAlb(stack, 'test-route53-alb', props);
37+
38+
defaults.addCfnSuppressRules(testConstruct.loadBalancer, [{ id: 'W52', reason: 'This test is explicitly to test the no logging case.'}]);
3639

3740
// Synth
3841
app.synth();

0 commit comments

Comments
 (0)