class GatewaySecurityGroupDecorator {

    public void extendGatewaySecurityGroupWithDefaultGatewayCidrs(Stack stack, Tunnel tunnel) {
        Set<InstanceGroup> gateways = filterForGateways(stack);
        Set<String> defaultGatewayCidrs = filterEmptyCidrs();
        LOGGER.debug("Extending security group for gateways: [{}] DefaultGatewayCidrs: [{}] Tunnel: [{}]",
                gateways.stream().map(InstanceGroup::getGroupName).collect(Collectors.joining(", ")), defaultGatewayCidrs, tunnel);
        if (!defaultGatewayCidrs.isEmpty() && !tunnel.useCcm()) {
            extendGatewaysSecurityGroupsWithRules(stack, gateways, defaultGatewayCidrs);
        }
    }

}