aws::load-balancer-target-group

Example

aws::load-balancer-target-group target-group-example
    name: "test-target-group"
    port: "80"
    protocol: "HTTP"
    target-type: "instance"
    vpc: $(aws::vpc vpc)
    enabled: "true"

    health-check
        interval: "90"
        path: "/"
        port: "traffic-port"
        protocol: "HTTP"
        timeout: "30"
        healthy-threshold: "2"
        matcher: "200"
        unhealthy-threshold: "2"
    end

    target
        id: $(aws::instance instance-us-east-2a).id
        port: "80"
    end

    target
        id: $(aws::instance instance-us-east-2b).id
        port: "443"
    end

    tags: {
            Name: "alb-example-target-group"
        }
end

Attributes

Attribute Description
health-check subresource

The health check associated with the target group. Required for use with instance and ip target types.

interval
The approximate amount of time between health checks of a target.
path
The ping path destination on targets for health checks.
port
The port used when an alb performs health checks on targets. Required when used with instance and ip target types.
protocol
The port used when an alb performs health checks on targets.
timeout
The amount of time, in seconds, an unresponsive target means a failed health check.
healthy-threshold
Health check successes required for an unhealthy target to be considered healthy.
matcher
HTTP code that signals a successful response from a target.
unhealthy-threshold
Health check failures required by an unhealthy target to be considered unhealthy.
port Port on which traffic is received by targets. Required for use instance and ip target types.
protocol Protocol used to route traffic to targets. Required for use with instance and ip target types.
tags map List of tags associated with the target group.
name The name of the target group. (Required)
target-type The type of the target. Will default to instance. Valid values are instance, ip or lambda.
vpc The vpc where the target group resides. Required for use with instance and ip target types.
tarhealth map Helper method that maps Health State to instances in that state.

Outputs

Attribute Description
arn The arn of the target group.