aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap
Support HTTP/HTTPS health check protocols for Application Load Balancer Target Type on Network Load Balancers
- Dominant language
- No language data
- Stars
- 1.1k
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
### Name of the resource
AWS::ElasticLoadBalancingV2::TargetGroup
### Resource Name
_No response_
### Issue Description
https://docs.aws.amazon.com/elasticloadbalancing/latest/network/application-load-balancer-target.html
In the Console with the 'new experience' turned on, when creating a Network Load Balancer with an Application Load Balancer as a target, it is possible to set the health check to HTTP or HTTPS. However, when using CDK or Cloudformation, an error is reported that the health check protocol cannot be changed for a target group with the TCP protocol.
```
You cannot change the health check protocol for a target group with the TCP protocol (Service: AmazonElasticLoadBalancing; Status Code: 400; Error Code: InvalidConfigurationRequest; Request ID: 1-1-1-1-1; Proxy: null)
```
### Expected Behavior
health check can use HTTP/HTTPS and configure a path.
### Observed Behavior
error: You cannot change the health check protocol for a target group with the TCP protocol (Service: AmazonElasticLoadBalancing; Status Code: 400; Error Code: InvalidConfigurationRequest; Request ID: 1-1-1-1-1; Proxy: null)
### Test Cases
CDK typescript example:
```typescript
// ... snip ...
const nlbTarget = new elbv2targets.AlbTarget(lb, 443)
const nlbTargetGroup = new elbv2.NetworkTargetGroup(this,'nlbTargetGroup', {
vpc,
targetType: elbv2.TargetType.ALB,
port: 443,
healthCheck: {
enabled: true,
port: '443',
path: '/health',
protocol: elbv2.Protocol.HTTPS
}
})
nlbTargetGroup.addTarget(nlbTarget)
nlb.addListener('nlbListenerHttps', {
port: 443,
defaultTargetGroups:[nlbTargetGroup]
})
// ...snip...
```
`cdk synth` works fine to create the cloudformation template, and then it fails when applied/deployed.
### Other Details
_No response_
Contributor guide
Research direction
The issue identifies AWS::ElasticLoadBalancingV2::TargetGroup and provides a CDK TypeScript reproduction; start by reviewing the linked AWS documentation and reproducing the cdk synth/deploy behavior. Done means an ALB-target Network Target Group can deploy with HTTP or HTTPS health checks and a configured /health path without the reported error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100