Skip to content

Commit

Permalink
fix: comment out the allowOutBound error condition to fix the duplica…
Browse files Browse the repository at this point in the history
…te error message for issue aws#9565
  • Loading branch information
bora-7 committed Oct 12, 2022
1 parent ce94768 commit aeeb124
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/@aws-cdk/aws-ec2/lib/security-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -535,14 +535,15 @@ export class SecurityGroup extends SecurityGroupBase {
const isIpv6 = peer.toEgressRuleConfig().hasOwnProperty('cidrIpv6');

if (!isIpv6 && this.allowAllOutbound) {
// commented out lines 539 to 545 to fix issue #9565
// // In the case of "allowAllOutbound", we don't add any more rules. There
// // is only one rule which allows all traffic and that subsumes any other
// // rule.
// commented out lines 540 to 546 to fix issue #9565

// In the case of "allowAllOutbound", we don't add any more rules. There
// is only one rule which allows all traffic and that subsumes any other
// rule.
// if (!remoteRule) { // Warn only if addEgressRule() was explicitely called
// Annotations.of(this).addWarning('Ignoring Egress rule since \'allowAllOutbound\' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup');
// }
// return;
return;
} else if (!isIpv6 && !this.allowAllOutbound) {
// Otherwise, if the bogus rule exists we can now remove it because the
// presence of any other rule will get rid of EC2's implicit "all
Expand Down

0 comments on commit aeeb124

Please sign in to comment.