Skip to content

Commit

Permalink
feat: instance type support for lb
Browse files Browse the repository at this point in the history
  • Loading branch information
roleyfoley authored and ml019 committed Nov 3, 2023
1 parent 46f616a commit de835de
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions aws/components/lb/setup.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -260,14 +260,27 @@

[#case EC2_COMPONENT_TYPE]
[#list linkTargetResources["Zones"] as zone, resources ]
[#if getExistingReference(resources["ec2ENI"].Id, IP_ADDRESS_ATTRIBUTE_TYPE)?has_content ]
[#local staticTargets +=
getTargetGroupTarget(
"ip",
getExistingReference(resources["ec2ENI"].Id, IP_ADDRESS_ATTRIBUTE_TYPE),
port.Port,
false
)]
[#if solution.TargetType == "ip" ]
[#if getExistingReference(resources["ec2ENI"].Id, IP_ADDRESS_ATTRIBUTE_TYPE)?has_content ]
[#local staticTargets +=
getTargetGroupTarget(
"ip",
getExistingReference(resources["ec2ENI"].Id, IP_ADDRESS_ATTRIBUTE_TYPE),
port.Port,
false
)]
[/#if]

[#elseif solution.TargetType == "instance" ]
[#if getExistingReference(resources["ec2Instance"].Id)?has_content ]
[#local staticTargets +=
getTargetGroupTarget(
"instance",
getExistingReference(resources["ec2Instance"].Id),
port.Port,
false
)]
[/#if]
[/#if]
[/#list]
[#break]
Expand Down

0 comments on commit de835de

Please sign in to comment.