in lib/transitvpn-stack.ts [186:216]
constructor(scope: core.Construct, id: string, props: TransitVpnEnrollmentAccountProps) {
super(scope, id);
new ec2.CfnClientVpnAuthorizationRule(this, `Authorizations`, {
clientVpnEndpointId: props.TransitVpn.ClientVpnEndpoint.ref,
targetNetworkCidr: props.AccountToEnrollVpcCidr,
accessGroupId: core.Token.asString(props.TransitVpn.vpnAdGroupSid),
description: `Allows Transit VPN users access to ${props.AccountDescription} VPC`
});
new ec2.CfnClientVpnRoute(this, `VpnRoutes0`, {
clientVpnEndpointId: props.TransitVpn.ClientVpnEndpoint.ref,
destinationCidrBlock: props.AccountToEnrollVpcCidr,
targetVpcSubnetId: core.Fn.select(0,props.TransitVpn.PrivateSubnets)
});
new ec2.CfnClientVpnRoute(this, `VpnRoutes1`, {
clientVpnEndpointId: props.TransitVpn.ClientVpnEndpoint.ref,
destinationCidrBlock: props.AccountToEnrollVpcCidr,
targetVpcSubnetId: core.Fn.select(1,props.TransitVpn.PrivateSubnets)
});
new TransitRoute(this,`TransitGatewayRoute`, {
orgId: props.OrgId,
targetVpcTransitSecretsArn: props.targetVpcTransitSecretsArn,
transitVPCRouteTableSecretsArn: props.transitVPCRouteTableSecretsArn,
targetVPCCidrRangeSecretsArn: props.targetVPCCidrRangeSecretsArn,
});
}