AWS::ElasticLoadBalancingV2::TargetGroup-ProtocolVersion can create resources via API, but not via CloudFormation.
ElasticLoadBalancingV2 CreateTargetGroup now supports the ProtocolVersion parameter for gRPC or HTTP2. CloudFormation needs support for this as well.
In Create, it should include the ProtocolVersion, like the console.
When will this be available?
I have created a custom resource to do this in the meantime; if anyone is interested i'm happy to share it.
I have created a custom resource to do this in the meantime; if anyone is interested i'm happy to share it.
If you wouldn't mind please Dennis. Thanks
@dennisroche I would be very happy to see that too. I tried to create my own but it looks like the API doesn't allow to modify the Protocol Version on an existing TargetGroup at all.
I would be very happy to see that too. I tried to create my own but it looks like the API doesn't allow to modify the Protocol Version on an existing TargetGroup at all.
Update requires Replacement, i.e. ProtocolVersion can only set on creation.
I have created a minimal example of HTTP2 Target Group custom resource https://gist.github.com/dennisroche/287915ca6a0874157d71b0903ec3999b
Luckily it turned out - with the help of the AWS Support - that it's only a documentation issue. You can use the ProtocolVersion in the CloudFormation template. For example this worked for me:
---
AWSTemplateFormatVersion: 2010-09-09
Resources:
MyALBTargetGroup:
Type: 'AWS::ElasticLoadBalancingV2::TargetGroup'
Properties:
HealthCheckIntervalSeconds: 30
HealthCheckPath: /AWS.ALB/healthcheck
HealthCheckPort: '8443'
HealthCheckProtocol: HTTP
ProtocolVersion: HTTP2
HealthCheckTimeoutSeconds: 5
HealthyThresholdCount: 10
Matcher:
HttpCode: 200-299
Port: 8443
Protocol: HTTP
UnhealthyThresholdCount: 2
VpcId: vpc-XXX
Most helpful comment
When will this be available?