Skip to content

Commit

Permalink
- Prettier fix
Browse files Browse the repository at this point in the history
  • Loading branch information
apmclean committed Mar 22, 2024
1 parent 6abd7b9 commit 98ef5bf
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions lib/config/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ export class ConfigParser {
...this.allVpnNames(),
...this.allProviderNames(),
...this.allDxGwNames(),
...this.allTgwPeerNames()
...this.allTgwPeerNames(),
];
}

Expand Down Expand Up @@ -732,25 +732,25 @@ export class ConfigParser {
const configStanza = this.configRaw.tgwPeers[tgwPeerName];
if (!configStanza.existingTgwId.startsWith("tgw-")) {
throw new Error(
`TgwPeer: ${tgwPeerName}: Existing Transit Gateway 'existingTgwId' must begin with tgw-`,
`TgwPeer: ${tgwPeerName}: Existing Transit Gateway 'existingTgwId' must begin with tgw-`,
);
}
if (
!configStanza.existingTgwPeerTransitGatewayAttachId.startsWith(
"tgw-attach-",
)
!configStanza.existingTgwPeerTransitGatewayAttachId.startsWith(
"tgw-attach-",
)
) {
throw new Error(
`TgwPeer: ${tgwPeerName}: Transit Gateway Attachment Value 'existingTgwPeerTransitGatewayAttachId' must begin with tgw-attach-`,
`TgwPeer: ${tgwPeerName}: Transit Gateway Attachment Value 'existingTgwPeerTransitGatewayAttachId' must begin with tgw-attach-`,
);
}
if (
!configStanza.existingTgwPeerTransitGatewayRouteTableId.startsWith(
"tgw-rtb-",
)
!configStanza.existingTgwPeerTransitGatewayRouteTableId.startsWith(
"tgw-rtb-",
)
) {
throw new Error(
`TgwPeer: ${tgwPeerName}: Transit Gateway Route Table Value 'existingTgwPeerTransitGatewayRouteTableId' must begin with tgw-rtb-`,
`TgwPeer: ${tgwPeerName}: Transit Gateway Route Table Value 'existingTgwPeerTransitGatewayRouteTableId' must begin with tgw-rtb-`,
);
}
}
Expand Down Expand Up @@ -854,8 +854,6 @@ export class ConfigParser {
});
}



// Where present, inspectedBy routes a valid
// 1) Dynamic route with inspectedBy where routesTo is a VPN is not supported
// 2) Dynamic routes where routeTo is a Transit Gateway Peer are not supported:
Expand All @@ -871,11 +869,10 @@ export class ConfigParser {
routeTypes.forEach((routeType) => {
if (configStanza[routeType]) {
for (const route of configStanza[routeType]) {

if (routeType == "dynamicRoutes") {
if (this.tgwPeerNameExists(route.routesTo)) {
throw new Error(
`A Transit Gateway Peer as the 'routesTo' using Dynamic Routing is not supported. Implement via Static or Default Route instead.`,
`A Transit Gateway Peer as the 'routesTo' using Dynamic Routing is not supported. Implement via Static or Default Route instead.`,
);
}
}
Expand Down

0 comments on commit 98ef5bf

Please sign in to comment.