Skip to content

Commit

Permalink
Merge pull request #1981 from vrk-kpa/AV-1993_add_third_bypass_ip
Browse files Browse the repository at this point in the history
AV-1993: Add third and fourth bypass ip
  • Loading branch information
Zharktas authored Jun 15, 2023
2 parents f0f6875 + 0173856 commit 4c0cf5e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cdk/lib/load-balancer-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ export class LoadBalancerStack extends Stack {
const allowedIp2 = StringParameter.fromStringParameterName(this, 'allowedIp2',
`/${props.environment}/opendata/cdk/lb_allowed_ip_2`)

const allowedIp3 = StringParameter.fromStringParameterName(this, 'allowedIp3',
`/${props.environment}/opendata/cdk/lb_allowed_ip_3`)

const allowedIp4 = StringParameter.fromStringParameterName(this, 'allowedIp4',
`/${props.environment}/opendata/cdk/lb_allowed_ip_4`)

const secGroup = new aws_ec2.SecurityGroup(this, 'loadBalancerSecurityGroup', {
vpc: props.vpc,
})
Expand All @@ -33,6 +39,8 @@ export class LoadBalancerStack extends Stack {

secGroup.addIngressRule(Peer.ipv4(allowedIp1.stringValue), Port.tcp(443))
secGroup.addIngressRule(Peer.ipv4(allowedIp2.stringValue), Port.tcp(443))
secGroup.addIngressRule(Peer.ipv4(allowedIp3.stringValue), Port.tcp(443))
secGroup.addIngressRule(Peer.ipv4(allowedIp4.stringValue), Port.tcp(443))

const publicSubnetA = Fn.importValue('vpc-SubnetPublicA')
const publicSubnetB = Fn.importValue('vpc-SubnetPublicB')
Expand Down

0 comments on commit 4c0cf5e

Please sign in to comment.