Skip to main content

Target Group

Manages an ELB Target Group.

A target group can be attached directly to an AutoScaling Group or an AutoScaling Group created by an EKS Node Group.

Example

exports.createResources = () => [
{
type: "TargetGroup",
group: "ElasticLoadBalancingV2",
properties: ({}) => ({
Name: "target-group-rest",
Protocol: "HTTP",
Port: 30020,
HealthCheckProtocol: "HTTP",
HealthCheckPort: "traffic-port",
HealthCheckEnabled: true,
HealthCheckIntervalSeconds: 30,
HealthCheckTimeoutSeconds: 5,
HealthyThresholdCount: 5,
HealthCheckPath: "/api/v1/version",
Matcher: {
HttpCode: "200",
},
TargetType: "instance",
ProtocolVersion: "HTTP1",
}),
dependencies: () => ({
vpc: "VPC",
}),
},
];

Properties

The list of properties are the parameter of CreateTargetGroupCommandInput

Source Code

Dependencies

Used By

List

gc l -t TargetGroup
Listing resources on 1 provider: aws
✓ aws
✓ Initialising
✓ Listing 2/2
┌─────────────────────────────────────────────────────────────────────────────┐
│ 2 ElasticLoadBalancingV2::TargetGroup from aws │
├─────────────────────────────────────────────────────────────────────────────┤
│ name: target-group-rest │
│ managedByUs: Yes │
│ live: │
│ TargetGroupArn: arn:aws:elasticloadbalancing:us-east-1:840541460064:targ… │
│ TargetGroupName: target-group-rest │
│ Protocol: HTTP │
│ Port: 30020 │
│ VpcId: vpc-055bc1b8bdcbd18ac │
│ HealthCheckProtocol: HTTP │
│ HealthCheckPort: traffic-port │
│ HealthCheckEnabled: true │
│ HealthCheckIntervalSeconds: 30 │
│ HealthCheckTimeoutSeconds: 5 │
│ HealthyThresholdCount: 5 │
│ UnhealthyThresholdCount: 2 │
│ HealthCheckPath: / │
│ Matcher: │
│ HttpCode: 200 │
│ LoadBalancerArns: │
│ - "arn:aws:elasticloadbalancing:us-east-1:840541460064:loadbalancer/ap… │
│ TargetType: instance │
│ ProtocolVersion: HTTP1 │
│ Tags: │
│ - Key: gc-created-by-provider │
│ Value: aws │
│ - Key: gc-managed-by │
│ Value: grucloud │
│ - Key: gc-project-name │
│ Value: @grucloud/example-aws-elbv2-loadbalancer │
│ - Key: gc-stage │
│ Value: dev │
│ - Key: Name │
│ Value: target-group-rest │
│ │
├─────────────────────────────────────────────────────────────────────────────┤
│ name: target-group-web │
│ managedByUs: Yes │
│ live: │
│ TargetGroupArn: arn:aws:elasticloadbalancing:us-east-1:840541460064:targ… │
│ TargetGroupName: target-group-web │
│ Protocol: HTTP │
│ Port: 30010 │
│ VpcId: vpc-055bc1b8bdcbd18ac │
│ HealthCheckProtocol: HTTP │
│ HealthCheckPort: traffic-port │
│ HealthCheckEnabled: true │
│ HealthCheckIntervalSeconds: 30 │
│ HealthCheckTimeoutSeconds: 5 │
│ HealthyThresholdCount: 5 │
│ UnhealthyThresholdCount: 2 │
│ HealthCheckPath: / │
│ Matcher: │
│ HttpCode: 200 │
│ LoadBalancerArns: │
│ - "arn:aws:elasticloadbalancing:us-east-1:840541460064:loadbalancer/ap… │
│ TargetType: instance │
│ ProtocolVersion: HTTP1 │
│ Tags: │
│ - Key: gc-created-by-provider │
│ Value: aws │
│ - Key: gc-managed-by │
│ Value: grucloud │
│ - Key: gc-project-name │
│ Value: @grucloud/example-aws-elbv2-loadbalancer │
│ - Key: gc-stage │
│ Value: dev │
│ - Key: Name │
│ Value: target-group-web │
│ │
└─────────────────────────────────────────────────────────────────────────────┘


List Summary:
Provider: aws
┌────────────────────────────────────────────────────────────────────────────┐
│ aws │
├────────────────────┬───────────────────────────────────────────────────────┤
│ ElasticLoadBalancingV2::TargetGroup │ target-group-rest │
│ │ target-group-web │
└────────────────────┴───────────────────────────────────────────────────────┘
2 resources, 1 type, 1 provider
Command "gc l -t TargetGroup" executed in 4s