We have an Elastic Load Balancer (ELB) defined in our stack.json file:
"ElasticLoadBalancer": {
"Type": "AWS::ElasticLoadBalancing::LoadBalancer",
"Properties": {
"CrossZone": "false",
"SecurityGroups": [ { "Ref": "ElbSecurityGroup" } ],
"Listeners": [
{
"LoadBalancerPort": "80",
"InstancePort": "8080",
"Protocol": "http"
}
],
"Instances": [ { "Ref": "EC2Instance"} ],
"Subnets": [ { "Ref": "SubnetId"} ]
}
}
and the EC2 instance running Jenkins is also in a public subnet.
We need to make the ELB privately accessible within our company network only, as ELB is generally used as a public facing resource. How do we do that?