in lib/security/ci-security-groups.ts [19:38]
constructor(stack: Stack, vpc: Vpc, useSsl: boolean) {
this.externalAccessSG = new SecurityGroup(stack, 'ExternalAccessSG', {
vpc,
description: 'External access to Jenkins',
});
this.mainNodeSG = new SecurityGroup(stack, 'MainNodeSG', {
vpc,
description: 'Main node of Jenkins',
});
const accessPort = useSsl ? 443 : 80;
this.mainNodeSG.addIngressRule(this.externalAccessSG, Port.tcp(accessPort));
this.agentNodeSG = new SecurityGroup(stack, 'AgentNodeSG', {
vpc,
description: 'Agent Node of Jenkins',
});
this.agentNodeSG.addIngressRule(this.mainNodeSG, Port.tcp(22), 'Main node SSH Access into agent nodes');
}