Skip to content

Commit

Permalink
feat(aws): allow setting targetType when creating a target group (#2397)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaslin committed Feb 27, 2018
1 parent 88b2345 commit 11e9cba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public static class TargetGroup {
private ProtocolEnum protocol;
private Integer port;
private Attributes attributes; // TODO: Support target group attributes
private String targetType = "instance";

private ProtocolEnum healthCheckProtocol;
private String healthCheckPath;
Expand Down Expand Up @@ -77,6 +78,10 @@ public void setAttributes(Attributes attributes) {
this.attributes = attributes;
}

public String getTargetType() { return targetType; }

public void setTargetType(String targetType) { this.targetType = targetType; }

public ProtocolEnum getHealthCheckProtocol() {
return healthCheckProtocol;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ class LoadBalancerV2UpsertHandler {
.withHealthyThresholdCount(targetGroup.healthyThreshold)
.withUnhealthyThresholdCount(targetGroup.unhealthyThreshold)
.withMatcher(new Matcher().withHttpCode(targetGroup.healthCheckMatcher))
.withTargetType(targetGroup.targetType)
)
task.updateStatus BASE_PHASE, "Target group created in ${loadBalancerName} (${targetGroup.name}:${targetGroup.port}:${targetGroup.protocol})."
createdTargetGroup = createTargetGroupResult.getTargetGroups().get(0)
Expand Down

0 comments on commit 11e9cba

Please sign in to comment.