Skip to content

Commit 7f39d53

Browse files
committed
Allowing for ProtocolVersion to be set on TargetGroup
1 parent 38ce3ba commit 7f39d53

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

ecs_composex/elbv2/elbv2_ecs.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,9 @@ def define_service_target_group(
524524
if not keyisset("protocol", target_definition)
525525
else target_definition["protocol"]
526526
)
527+
props["ProtocolVersion"] = set_else_none(
528+
"ProtocolVersion", target_definition, Ref(AWS_NO_VALUE)
529+
)
527530
props["TargetType"] = "ip"
528531
import_target_group_attributes(props, target_definition, resource)
529532
validate_props_and_service_definition(props, service)
@@ -667,6 +670,9 @@ def handle_target_groups_association(
667670
set_healthcheck_definition(props, _target_def, "HealthCheck")
668671
props["Port"] = _target_def["Port"]
669672
props["Protocol"] = _target_def["Protocol"]
673+
props["ProtocolVersion"] = set_else_none(
674+
"ProtocolVersion", _target_def, Ref(AWS_NO_VALUE)
675+
)
670676
props["TargetType"] = "ip"
671677
import_target_group_attributes(props, _target_def, load_balancer)
672678
_tgt_group = MergedTargetGroup(

ecs_composex/elbv2/x-elbv2.spec.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,10 @@
283283
},
284284
"TargetGroupAttributes": {
285285
"$ref": "#/definitions/TargetGroupAttributeDef"
286+
},
287+
"ProtocolVersion": {
288+
"type": "string",
289+
"description": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html#cfn-elasticloadbalancingv2-targetgroup-protocolversion"
286290
}
287291
}
288292
},

0 commit comments

Comments
 (0)