[ecs-patterns]: Allow configure health check while construct ApplicationMultipleTargetGroupsEc2Service and ApplicationTargetProps
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the feature
I'm creating an ecs service with multiple target groups using ecs_pattern module.
```
alb_props = ecs_patterns.ApplicationLoadBalancerProps(
name="custom-alb-name",
domain_name="*.example.com",
domain_zone=route53.HostedZone.from_hosted_zone_attributes(
self, "HostedZone",
hosted_zone_id="xxxxxx",
zone_name="example.com"
),
listeners=[
listener_1, listener2
],
public_load_balancer=False
)
target_props_1 = ecs_patterns.ApplicationTargetProps(
container_port=8001,
protocol=ecs.Protocol.TCP,
listener=listener_1.name
)
ecs_service = ecs_patterns.ApplicationMultipleTargetGroupsEc2Service(
self, "ECS-ID",
service_name="service-name",
cluster=cluster-name-ref,
task_definition=task_definition,
load_balancers=[alb_props],
target_groups=[target_props_1, target_prop_2],
cpu=1024,
memory_reservation_mib=2048,
desired_count=1
)
```
The current one, I cannot configure health check for `target_group_1` because the `ApplicationTargetProps` do not allow health check config.
I want the `ApplicationTargetProps` allow config health check also
### Use Case
Because I want to config health check for target groups with custom path and code rather than the default one to ensure create resource successfully
### Proposed Solution
_No response_
### Other Information
_No response_
### Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### CDK version used
2.54.0
### Environment details (OS name and version, etc.)
Window
Contributor guide
Research direction
Start with the ApplicationTargetProps entry point and trace how ApplicationMultipleTargetGroupsEc2Service creates each target group from the supplied target_props values. Check how health-check settings are represented in the underlying target group API and follow the existing construct property flow. Done means callers can configure a custom health-check path and response code for each target group.
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