File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/deployments/cdk/src/deployments/firewall/cluster Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,7 @@ async function createCustomerGateways(props: {
108108
109109 const firewallCgwName = firewallConfig [ 'fw-cgw-name' ] ;
110110 const firewallCgwAsn = firewallConfig [ 'fw-cgw-asn' ] ;
111+ const firewallCgwRouting = firewallConfig [ 'fw-cgw-routing' ] . toLowerCase ( ) ;
111112
112113 const addTagsDependencies = [ ] ;
113114 const addTagsToResources : AddTagsToResource [ ] = [ ] ;
@@ -127,13 +128,14 @@ async function createCustomerGateways(props: {
127128 customerGateway = new ec2 . CfnCustomerGateway ( scope , `${ prefix } _cgw` , {
128129 type : 'ipsec.1' ,
129130 ipAddress : port . eipIpAddress ,
130- bgpAsn : firewallCgwAsn ,
131+ bgpAsn : firewallCgwRouting === 'dynamic' ? firewallCgwAsn : 65000 ,
131132 } ) ;
132133
133134 vpnConnection = new ec2 . CfnVPNConnection ( scope , `${ prefix } _vpn` , {
134135 type : 'ipsec.1' ,
135136 transitGatewayId : transitGateway . tgwId ,
136137 customerGatewayId : customerGateway . ref ,
138+ staticRoutesOnly : firewallCgwRouting === 'static' ? true : false ,
137139 } ) ;
138140
139141 const options = new VpnTunnelOptions ( scope , `VpnTunnelOptions${ index } ` , {
You can’t perform that action at this time.
0 commit comments