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 The health check associated with the target group. Required for use with instance and ip target types. (Optional)
port Port on which traffic is received by targets. Required for use instance and ip target types. (Optional)
protocol Protocol used to route traffic to targets. Valid values are HTTP and HTTPS for ALBs and TCP and TLS for NLBs. Required for use with instance and ip target types. (Optional)
tags List of tags associated with the target group. (Optional)
name The name of the target group. (Required)
target-type The type of the target. Valid values are instance, ip, and lambda. Will default to instance. (Optional)
vpc The vpc where the target group resides. Required for use with instance and ip target types. (Optional)

Outputs

Attribute Description
arn The arn of the target group.