Skip to content

Commit

Permalink
fix: typo in gateway and router components
Browse files Browse the repository at this point in the history
  • Loading branch information
roleyfoley committed Jun 5, 2020
1 parent c57be61 commit 5dcb62a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 20 deletions.
26 changes: 13 additions & 13 deletions aws/components/gateway/setup.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@
[#if !legacyIGW ]
[#local IGWId = gwResources["internetGateway"].Id ]
[#local IGWName = gwResources["internetGateway"].Name ]
[#local IGWAttachementId = gwResources["internetGatewayAttachement"].Id ]
[#local IGWAttachmentId = gwResources["internetGatewayAttachment"].Id ]

[#if deploymentSubsetRequired(NETWORK_GATEWAY_COMPONENT_TYPE, true)]
[@createIGW
id=IGWId
name=IGWName
/]
[@createIGWAttachment
id=IGWAttachementId
id=IGWAttachmentId
vpcId=vpcId
igwId=IGWId
/]
Expand All @@ -119,13 +119,13 @@
[#local localRouter = true]
[#local routerFound = false]

[#local attachementSubnets = [] ]
[#local attachmentSubnets = [] ]
[#list networkResources["subnets"][gwCore.Tier.Id] as zone,resources]
[#local attachementSubnets += [ resources["subnet"].Id ] ]
[#local attachmentSubnets += [ resources["subnet"].Id ] ]
[/#list]

[#local transitGatewayAttachementId = gwResources["transitGatewayAttachement"].Id ]
[#local transitGatewayAttachementName = gwResources["transitGatewayAttachement"].Name ]
[#local transitGatewayAttachmentId = gwResources["transitGatewayAttachment"].Id ]
[#local transitGatewayAttachmentName = gwResources["transitGatewayAttachment"].Name ]
[#local transitGatewayRoutePropogationId = gwResources["routePropogation"].Id ]
[#local routeTableAssociationId = gwResources["routeAssociation"].Id ]
[#break]
Expand Down Expand Up @@ -258,17 +258,17 @@

[#if deploymentSubsetRequired(NETWORK_GATEWAY_COMPONENT_TYPE, true)]
[@createTransitGatewayAttachment
id=transitGatewayAttachementId
name=transitGatewayAttachementName
id=transitGatewayAttachmentId
name=transitGatewayAttachmentName
transitGateway=transitGateway
subnets=getReferences(attachementSubnets)
subnets=getReferences(attachmentSubnets)
vpc=getReference(vpcId)
/]

[#if localRouter ]
[@createTransitGatewayRouteTableAssociation
id=routeTableAssociationId
transitGatewayAttachment=getReference(transitGatewayAttachementId)
transitGatewayAttachment=getReference(transitGatewayAttachmentId)
transitGatewayRouteTable=transitGatewayRouteTable
/]

Expand All @@ -282,7 +282,7 @@
[@createTransitGatewayRoute
id=vpcRouteId
transitGatewayRouteTable=transitGatewayRouteTable
transitGatewayAttachment=getReference(transitGatewayAttachementId)
transitGatewayAttachment=getReference(transitGatewayAttachmentId)
destinationCidr=souceCidr
/]
[/#list]
Expand Down Expand Up @@ -445,7 +445,7 @@
destinationType="gateway"
destinationAttribute=getReference(IGWId)
destinationCidr=cidr
dependencies=IGWAttachementId
dependencies=IGWAttachmentId
/]
[/#list]
[#else]
Expand All @@ -466,7 +466,7 @@
destinationType="transit"
destinationAttribute=transitGateway
destinationCidr=cidr
dependencies=transitGatewayAttachementId
dependencies=transitGatewayAttachmentId
/]
[/#list]
[/#if]
Expand Down
10 changes: 5 additions & 5 deletions aws/components/gateway/state.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"Name" : core.FullName,
"Type" : AWS_VPC_IGW_RESOURCE_TYPE
},
"internetGatewayAttachement" : {
"internetGatewayAttachment" : {
"Id" : formatId(AWS_VPC_IGW_ATTACHMENT_TYPE, core.Id),
"Type" : AWS_VPC_IGW_ATTACHMENT_TYPE
}
Expand All @@ -76,14 +76,14 @@

[#case "router" ]

[#local transitGatewayAttachementId = formatResourceId(
[#local transitGatewayAttachmentId = formatResourceId(
AWS_TRANSITGATEWAY_ATTACHMENT_RESOURCE_TYPE,
core.Id
)]

[#local resources += {
"transitGatewayAttachement" : {
"Id" : transitGatewayAttachementId,
"transitGatewayAttachment" : {
"Id" : transitGatewayAttachmentId,
"Name" : core.FullName,
"Type" : AWS_TRANSITGATEWAY_ATTACHMENT_RESOURCE_TYPE
},
Expand All @@ -105,7 +105,7 @@
}]

[#local attributes += {
"TRANSIT_GATEWAY_ATTACHMENT" : getExistingReference(transitGatewayAttachementId)
"TRANSIT_GATEWAY_ATTACHMENT" : getExistingReference(transitGatewayAttachmentId)
}]
[#break]

Expand Down
3 changes: 1 addition & 2 deletions aws/components/router/setup.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,11 @@

[#local transitGatewayAttachment = (linkTargetAttributes["TRANSIT_GATEWAY_ATTACHMENT"])!""]

[@debug message="Attachement" context=linkTargetAttributes enabled=true /]
[#if ! transitGatewayAttachment?has_content ]
[#if deploymentSubsetRequired(NETWORK_ROUTER_COMPONENT_TYPE, true)]
[@fatal
message="Could not find transit Gateway Attachment Id"
detail="Add setting TRANSIT_GATEWAY_ATTACHMENT as the transit gateawy attachement for the route"
detail="Add setting TRANSIT_GATEWAY_ATTACHMENT as the transit gateawy attachment for the route"
enabled=false
/]
[/#if]
Expand Down

0 comments on commit 5dcb62a

Please sign in to comment.