TargetGroup

Provides a Target Group resource for use with Load Balancer resources.

Note: aws.alb.TargetGroup is known as aws.lb.TargetGroup. The functionality is identical.

Example Usage

Instance Target Group

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var main = new Aws.Ec2.Vpc("main", new Aws.Ec2.VpcArgs
        {
            CidrBlock = "10.0.0.0/16",
        });
        var test = new Aws.LB.TargetGroup("test", new Aws.LB.TargetGroupArgs
        {
            Port = 80,
            Protocol = "HTTP",
            VpcId = main.Id,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2"
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/lb"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        main, err := ec2.NewVpc(ctx, "main", &ec2.VpcArgs{
            CidrBlock: pulumi.String("10.0.0.0/16"),
        })
        if err != nil {
            return err
        }
        _, err = lb.NewTargetGroup(ctx, "test", &lb.TargetGroupArgs{
            Port:     pulumi.Int(80),
            Protocol: pulumi.String("HTTP"),
            VpcId:    main.ID(),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

main = aws.ec2.Vpc("main", cidr_block="10.0.0.0/16")
test = aws.lb.TargetGroup("test",
    port=80,
    protocol="HTTP",
    vpc_id=main.id)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const main = new aws.ec2.Vpc("main", {
    cidrBlock: "10.0.0.0/16",
});
const test = new aws.lb.TargetGroup("test", {
    port: 80,
    protocol: "HTTP",
    vpcId: main.id,
});

IP Target Group

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var main = new Aws.Ec2.Vpc("main", new Aws.Ec2.VpcArgs
        {
            CidrBlock = "10.0.0.0/16",
        });
        var ip_example = new Aws.LB.TargetGroup("ip-example", new Aws.LB.TargetGroupArgs
        {
            Port = 80,
            Protocol = "HTTP",
            TargetType = "ip",
            VpcId = main.Id,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2"
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/lb"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        main, err := ec2.NewVpc(ctx, "main", &ec2.VpcArgs{
            CidrBlock: pulumi.String("10.0.0.0/16"),
        })
        if err != nil {
            return err
        }
        _, err = lb.NewTargetGroup(ctx, "ip_example", &lb.TargetGroupArgs{
            Port:       pulumi.Int(80),
            Protocol:   pulumi.String("HTTP"),
            TargetType: pulumi.String("ip"),
            VpcId:      main.ID(),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

main = aws.ec2.Vpc("main", cidr_block="10.0.0.0/16")
ip_example = aws.lb.TargetGroup("ip-example",
    port=80,
    protocol="HTTP",
    target_type="ip",
    vpc_id=main.id)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const main = new aws.ec2.Vpc("main", {
    cidrBlock: "10.0.0.0/16",
});
const ip_example = new aws.lb.TargetGroup("ip-example", {
    port: 80,
    protocol: "HTTP",
    targetType: "ip",
    vpcId: main.id,
});

Lambda Target Group

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var lambda_example = new Aws.LB.TargetGroup("lambda-example", new Aws.LB.TargetGroupArgs
        {
            TargetType = "lambda",
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/lb"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := lb.NewTargetGroup(ctx, "lambda_example", &lb.TargetGroupArgs{
            TargetType: pulumi.String("lambda"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

lambda_example = aws.lb.TargetGroup("lambda-example", target_type="lambda")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const lambda_example = new aws.lb.TargetGroup("lambda-example", {
    targetType: "lambda",
});

Deprecated: aws.applicationloadbalancing.TargetGroup has been deprecated in favor of aws.alb.TargetGroup

Create a TargetGroup Resource

def TargetGroup(resource_name, opts=None, deregistration_delay=None, health_check=None, lambda_multi_value_headers_enabled=None, load_balancing_algorithm_type=None, name=None, name_prefix=None, port=None, protocol=None, proxy_protocol_v2=None, slow_start=None, stickiness=None, tags=None, target_type=None, vpc_id=None, __props__=None);
func NewTargetGroup(ctx *Context, name string, args *TargetGroupArgs, opts ...ResourceOption) (*TargetGroup, error)
public TargetGroup(string name, TargetGroupArgs? args = null, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args TargetGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args TargetGroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args TargetGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

TargetGroup Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The TargetGroup resource accepts the following input properties:

DeregistrationDelay int

The amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds.

HealthCheck TargetGroupHealthCheckArgs

A Health Check block. Health Check blocks are documented below.

LambdaMultiValueHeadersEnabled bool

Boolean whether the request and response headers exchanged between the load balancer and the Lambda function include arrays of values or strings. Only applies when target_type is lambda.

LoadBalancingAlgorithmType string

Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is round_robin or least_outstanding_requests. The default is round_robin.

Name string

The name of the target group. If omitted, this provider will assign a random, unique name.

NamePrefix string

Creates a unique name beginning with the specified prefix. Conflicts with name. Cannot be longer than 6 characters.

Port int

The port on which targets receive traffic, unless overridden when registering a specific target. Required when target_type is instance or ip. Does not apply when target_type is lambda.

Protocol string

The protocol to use for routing traffic to the targets. Should be one of “TCP”, “TLS”, “UDP”, “TCP_UDP”, “HTTP” or “HTTPS”. Required when target_type is instance or ip. Does not apply when target_type is lambda.

ProxyProtocolV2 bool

Boolean to enable / disable support for proxy protocol v2 on Network Load Balancers. See doc for more information.

SlowStart int

The amount time for targets to warm up before the load balancer sends them a full share of requests. The range is 30-900 seconds or 0 to disable. The default value is 0 seconds.

Stickiness TargetGroupStickinessArgs

A Stickiness block. Stickiness blocks are documented below. stickiness is only valid if used with Load Balancers of type Application

Tags Dictionary<string, string>

A map of tags to assign to the resource.

TargetType string

The type of target that you must specify when registering targets with this target group. The possible values are instance (targets are specified by instance ID) or ip (targets are specified by IP address) or lambda (targets are specified by lambda arn). The default is instance. Note that you can’t specify targets for a target group using both instance IDs and IP addresses. If the target type is ip, specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can’t specify publicly routable IP addresses.

VpcId string

The identifier of the VPC in which to create the target group. Required when target_type is instance or ip. Does not apply when target_type is lambda.

DeregistrationDelay int

The amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds.

HealthCheck TargetGroupHealthCheck

A Health Check block. Health Check blocks are documented below.

LambdaMultiValueHeadersEnabled bool

Boolean whether the request and response headers exchanged between the load balancer and the Lambda function include arrays of values or strings. Only applies when target_type is lambda.

LoadBalancingAlgorithmType string

Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is round_robin or least_outstanding_requests. The default is round_robin.

Name string

The name of the target group. If omitted, this provider will assign a random, unique name.

NamePrefix string

Creates a unique name beginning with the specified prefix. Conflicts with name. Cannot be longer than 6 characters.

Port int

The port on which targets receive traffic, unless overridden when registering a specific target. Required when target_type is instance or ip. Does not apply when target_type is lambda.

Protocol string

The protocol to use for routing traffic to the targets. Should be one of “TCP”, “TLS”, “UDP”, “TCP_UDP”, “HTTP” or “HTTPS”. Required when target_type is instance or ip. Does not apply when target_type is lambda.

ProxyProtocolV2 bool

Boolean to enable / disable support for proxy protocol v2 on Network Load Balancers. See doc for more information.

SlowStart int

The amount time for targets to warm up before the load balancer sends them a full share of requests. The range is 30-900 seconds or 0 to disable. The default value is 0 seconds.

Stickiness TargetGroupStickiness

A Stickiness block. Stickiness blocks are documented below. stickiness is only valid if used with Load Balancers of type Application

Tags map[string]string

A map of tags to assign to the resource.

TargetType string

The type of target that you must specify when registering targets with this target group. The possible values are instance (targets are specified by instance ID) or ip (targets are specified by IP address) or lambda (targets are specified by lambda arn). The default is instance. Note that you can’t specify targets for a target group using both instance IDs and IP addresses. If the target type is ip, specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can’t specify publicly routable IP addresses.

VpcId string

The identifier of the VPC in which to create the target group. Required when target_type is instance or ip. Does not apply when target_type is lambda.

deregistrationDelay number

The amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds.

healthCheck TargetGroupHealthCheck

A Health Check block. Health Check blocks are documented below.

lambdaMultiValueHeadersEnabled boolean

Boolean whether the request and response headers exchanged between the load balancer and the Lambda function include arrays of values or strings. Only applies when target_type is lambda.

loadBalancingAlgorithmType string

Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is round_robin or least_outstanding_requests. The default is round_robin.

name string

The name of the target group. If omitted, this provider will assign a random, unique name.

namePrefix string

Creates a unique name beginning with the specified prefix. Conflicts with name. Cannot be longer than 6 characters.

port number

The port on which targets receive traffic, unless overridden when registering a specific target. Required when target_type is instance or ip. Does not apply when target_type is lambda.

protocol string

The protocol to use for routing traffic to the targets. Should be one of “TCP”, “TLS”, “UDP”, “TCP_UDP”, “HTTP” or “HTTPS”. Required when target_type is instance or ip. Does not apply when target_type is lambda.

proxyProtocolV2 boolean

Boolean to enable / disable support for proxy protocol v2 on Network Load Balancers. See doc for more information.

slowStart number

The amount time for targets to warm up before the load balancer sends them a full share of requests. The range is 30-900 seconds or 0 to disable. The default value is 0 seconds.

stickiness TargetGroupStickiness

A Stickiness block. Stickiness blocks are documented below. stickiness is only valid if used with Load Balancers of type Application

tags {[key: string]: string}

A map of tags to assign to the resource.

targetType string

The type of target that you must specify when registering targets with this target group. The possible values are instance (targets are specified by instance ID) or ip (targets are specified by IP address) or lambda (targets are specified by lambda arn). The default is instance. Note that you can’t specify targets for a target group using both instance IDs and IP addresses. If the target type is ip, specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can’t specify publicly routable IP addresses.

vpcId string

The identifier of the VPC in which to create the target group. Required when target_type is instance or ip. Does not apply when target_type is lambda.

deregistration_delay float

The amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds.

health_check Dict[TargetGroupHealthCheck]

A Health Check block. Health Check blocks are documented below.

lambda_multi_value_headers_enabled bool

Boolean whether the request and response headers exchanged between the load balancer and the Lambda function include arrays of values or strings. Only applies when target_type is lambda.

load_balancing_algorithm_type str

Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is round_robin or least_outstanding_requests. The default is round_robin.

name str

The name of the target group. If omitted, this provider will assign a random, unique name.

name_prefix str

Creates a unique name beginning with the specified prefix. Conflicts with name. Cannot be longer than 6 characters.

port float

The port on which targets receive traffic, unless overridden when registering a specific target. Required when target_type is instance or ip. Does not apply when target_type is lambda.

protocol str

The protocol to use for routing traffic to the targets. Should be one of “TCP”, “TLS”, “UDP”, “TCP_UDP”, “HTTP” or “HTTPS”. Required when target_type is instance or ip. Does not apply when target_type is lambda.

proxy_protocol_v2 bool

Boolean to enable / disable support for proxy protocol v2 on Network Load Balancers. See doc for more information.

slow_start float

The amount time for targets to warm up before the load balancer sends them a full share of requests. The range is 30-900 seconds or 0 to disable. The default value is 0 seconds.

stickiness Dict[TargetGroupStickiness]

A Stickiness block. Stickiness blocks are documented below. stickiness is only valid if used with Load Balancers of type Application

tags Dict[str, str]

A map of tags to assign to the resource.

target_type str

The type of target that you must specify when registering targets with this target group. The possible values are instance (targets are specified by instance ID) or ip (targets are specified by IP address) or lambda (targets are specified by lambda arn). The default is instance. Note that you can’t specify targets for a target group using both instance IDs and IP addresses. If the target type is ip, specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can’t specify publicly routable IP addresses.

vpc_id str

The identifier of the VPC in which to create the target group. Required when target_type is instance or ip. Does not apply when target_type is lambda.

Outputs

All input properties are implicitly available as output properties. Additionally, the TargetGroup resource produces the following output properties:

Arn string

The ARN of the Target Group (matches id)

ArnSuffix string

The ARN suffix for use with CloudWatch Metrics.

Id string
The provider-assigned unique ID for this managed resource.
Arn string

The ARN of the Target Group (matches id)

ArnSuffix string

The ARN suffix for use with CloudWatch Metrics.

Id string
The provider-assigned unique ID for this managed resource.
arn string

The ARN of the Target Group (matches id)

arnSuffix string

The ARN suffix for use with CloudWatch Metrics.

id string
The provider-assigned unique ID for this managed resource.
arn str

The ARN of the Target Group (matches id)

arn_suffix str

The ARN suffix for use with CloudWatch Metrics.

id str
The provider-assigned unique ID for this managed resource.

Look up an Existing TargetGroup Resource

Get an existing TargetGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: TargetGroupState, opts?: CustomResourceOptions): TargetGroup
static get(resource_name, id, opts=None, arn=None, arn_suffix=None, deregistration_delay=None, health_check=None, lambda_multi_value_headers_enabled=None, load_balancing_algorithm_type=None, name=None, name_prefix=None, port=None, protocol=None, proxy_protocol_v2=None, slow_start=None, stickiness=None, tags=None, target_type=None, vpc_id=None, __props__=None);
func GetTargetGroup(ctx *Context, name string, id IDInput, state *TargetGroupState, opts ...ResourceOption) (*TargetGroup, error)
public static TargetGroup Get(string name, Input<string> id, TargetGroupState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Arn string

The ARN of the Target Group (matches id)

ArnSuffix string

The ARN suffix for use with CloudWatch Metrics.

DeregistrationDelay int

The amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds.

HealthCheck TargetGroupHealthCheckArgs

A Health Check block. Health Check blocks are documented below.

LambdaMultiValueHeadersEnabled bool

Boolean whether the request and response headers exchanged between the load balancer and the Lambda function include arrays of values or strings. Only applies when target_type is lambda.

LoadBalancingAlgorithmType string

Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is round_robin or least_outstanding_requests. The default is round_robin.

Name string

The name of the target group. If omitted, this provider will assign a random, unique name.

NamePrefix string

Creates a unique name beginning with the specified prefix. Conflicts with name. Cannot be longer than 6 characters.

Port int

The port on which targets receive traffic, unless overridden when registering a specific target. Required when target_type is instance or ip. Does not apply when target_type is lambda.

Protocol string

The protocol to use for routing traffic to the targets. Should be one of “TCP”, “TLS”, “UDP”, “TCP_UDP”, “HTTP” or “HTTPS”. Required when target_type is instance or ip. Does not apply when target_type is lambda.

ProxyProtocolV2 bool

Boolean to enable / disable support for proxy protocol v2 on Network Load Balancers. See doc for more information.

SlowStart int

The amount time for targets to warm up before the load balancer sends them a full share of requests. The range is 30-900 seconds or 0 to disable. The default value is 0 seconds.

Stickiness TargetGroupStickinessArgs

A Stickiness block. Stickiness blocks are documented below. stickiness is only valid if used with Load Balancers of type Application

Tags Dictionary<string, string>

A map of tags to assign to the resource.

TargetType string

The type of target that you must specify when registering targets with this target group. The possible values are instance (targets are specified by instance ID) or ip (targets are specified by IP address) or lambda (targets are specified by lambda arn). The default is instance. Note that you can’t specify targets for a target group using both instance IDs and IP addresses. If the target type is ip, specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can’t specify publicly routable IP addresses.

VpcId string

The identifier of the VPC in which to create the target group. Required when target_type is instance or ip. Does not apply when target_type is lambda.

Arn string

The ARN of the Target Group (matches id)

ArnSuffix string

The ARN suffix for use with CloudWatch Metrics.

DeregistrationDelay int

The amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds.

HealthCheck TargetGroupHealthCheck

A Health Check block. Health Check blocks are documented below.

LambdaMultiValueHeadersEnabled bool

Boolean whether the request and response headers exchanged between the load balancer and the Lambda function include arrays of values or strings. Only applies when target_type is lambda.

LoadBalancingAlgorithmType string

Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is round_robin or least_outstanding_requests. The default is round_robin.

Name string

The name of the target group. If omitted, this provider will assign a random, unique name.

NamePrefix string

Creates a unique name beginning with the specified prefix. Conflicts with name. Cannot be longer than 6 characters.

Port int

The port on which targets receive traffic, unless overridden when registering a specific target. Required when target_type is instance or ip. Does not apply when target_type is lambda.

Protocol string

The protocol to use for routing traffic to the targets. Should be one of “TCP”, “TLS”, “UDP”, “TCP_UDP”, “HTTP” or “HTTPS”. Required when target_type is instance or ip. Does not apply when target_type is lambda.

ProxyProtocolV2 bool

Boolean to enable / disable support for proxy protocol v2 on Network Load Balancers. See doc for more information.

SlowStart int

The amount time for targets to warm up before the load balancer sends them a full share of requests. The range is 30-900 seconds or 0 to disable. The default value is 0 seconds.

Stickiness TargetGroupStickiness

A Stickiness block. Stickiness blocks are documented below. stickiness is only valid if used with Load Balancers of type Application

Tags map[string]string

A map of tags to assign to the resource.

TargetType string

The type of target that you must specify when registering targets with this target group. The possible values are instance (targets are specified by instance ID) or ip (targets are specified by IP address) or lambda (targets are specified by lambda arn). The default is instance. Note that you can’t specify targets for a target group using both instance IDs and IP addresses. If the target type is ip, specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can’t specify publicly routable IP addresses.

VpcId string

The identifier of the VPC in which to create the target group. Required when target_type is instance or ip. Does not apply when target_type is lambda.

arn string

The ARN of the Target Group (matches id)

arnSuffix string

The ARN suffix for use with CloudWatch Metrics.

deregistrationDelay number

The amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds.

healthCheck TargetGroupHealthCheck

A Health Check block. Health Check blocks are documented below.

lambdaMultiValueHeadersEnabled boolean

Boolean whether the request and response headers exchanged between the load balancer and the Lambda function include arrays of values or strings. Only applies when target_type is lambda.

loadBalancingAlgorithmType string

Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is round_robin or least_outstanding_requests. The default is round_robin.

name string

The name of the target group. If omitted, this provider will assign a random, unique name.

namePrefix string

Creates a unique name beginning with the specified prefix. Conflicts with name. Cannot be longer than 6 characters.

port number

The port on which targets receive traffic, unless overridden when registering a specific target. Required when target_type is instance or ip. Does not apply when target_type is lambda.

protocol string

The protocol to use for routing traffic to the targets. Should be one of “TCP”, “TLS”, “UDP”, “TCP_UDP”, “HTTP” or “HTTPS”. Required when target_type is instance or ip. Does not apply when target_type is lambda.

proxyProtocolV2 boolean

Boolean to enable / disable support for proxy protocol v2 on Network Load Balancers. See doc for more information.

slowStart number

The amount time for targets to warm up before the load balancer sends them a full share of requests. The range is 30-900 seconds or 0 to disable. The default value is 0 seconds.

stickiness TargetGroupStickiness

A Stickiness block. Stickiness blocks are documented below. stickiness is only valid if used with Load Balancers of type Application

tags {[key: string]: string}

A map of tags to assign to the resource.

targetType string

The type of target that you must specify when registering targets with this target group. The possible values are instance (targets are specified by instance ID) or ip (targets are specified by IP address) or lambda (targets are specified by lambda arn). The default is instance. Note that you can’t specify targets for a target group using both instance IDs and IP addresses. If the target type is ip, specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can’t specify publicly routable IP addresses.

vpcId string

The identifier of the VPC in which to create the target group. Required when target_type is instance or ip. Does not apply when target_type is lambda.

arn str

The ARN of the Target Group (matches id)

arn_suffix str

The ARN suffix for use with CloudWatch Metrics.

deregistration_delay float

The amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds.

health_check Dict[TargetGroupHealthCheck]

A Health Check block. Health Check blocks are documented below.

lambda_multi_value_headers_enabled bool

Boolean whether the request and response headers exchanged between the load balancer and the Lambda function include arrays of values or strings. Only applies when target_type is lambda.

load_balancing_algorithm_type str

Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is round_robin or least_outstanding_requests. The default is round_robin.

name str

The name of the target group. If omitted, this provider will assign a random, unique name.

name_prefix str

Creates a unique name beginning with the specified prefix. Conflicts with name. Cannot be longer than 6 characters.

port float

The port on which targets receive traffic, unless overridden when registering a specific target. Required when target_type is instance or ip. Does not apply when target_type is lambda.

protocol str

The protocol to use for routing traffic to the targets. Should be one of “TCP”, “TLS”, “UDP”, “TCP_UDP”, “HTTP” or “HTTPS”. Required when target_type is instance or ip. Does not apply when target_type is lambda.

proxy_protocol_v2 bool

Boolean to enable / disable support for proxy protocol v2 on Network Load Balancers. See doc for more information.

slow_start float

The amount time for targets to warm up before the load balancer sends them a full share of requests. The range is 30-900 seconds or 0 to disable. The default value is 0 seconds.

stickiness Dict[TargetGroupStickiness]

A Stickiness block. Stickiness blocks are documented below. stickiness is only valid if used with Load Balancers of type Application

tags Dict[str, str]

A map of tags to assign to the resource.

target_type str

The type of target that you must specify when registering targets with this target group. The possible values are instance (targets are specified by instance ID) or ip (targets are specified by IP address) or lambda (targets are specified by lambda arn). The default is instance. Note that you can’t specify targets for a target group using both instance IDs and IP addresses. If the target type is ip, specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can’t specify publicly routable IP addresses.

vpc_id str

The identifier of the VPC in which to create the target group. Required when target_type is instance or ip. Does not apply when target_type is lambda.

Supporting Types

TargetGroupHealthCheck

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Enabled bool

Boolean to enable / disable stickiness. Default is true

HealthyThreshold int

The number of consecutive health checks successes required before considering an unhealthy target healthy. Defaults to 3.

Interval int

The approximate amount of time, in seconds, between health checks of an individual target. Minimum value 5 seconds, Maximum value 300 seconds. For lambda target groups, it needs to be greater as the timeout of the underlying lambda. Default 30 seconds.

Matcher string

The HTTP codes to use when checking for a successful response from a target. You can specify multiple values (for example, “200,202”) or a range of values (for example, “200-299”). Applies to Application Load Balancers only (HTTP/HTTPS), not Network Load Balancers (TCP).

Path string

The destination for the health check request. Applies to Application Load Balancers only (HTTP/HTTPS), not Network Load Balancers (TCP).

Port string

The port on which targets receive traffic, unless overridden when registering a specific target. Required when target_type is instance or ip. Does not apply when target_type is lambda.

Protocol string

The protocol to use for routing traffic to the targets. Should be one of “TCP”, “TLS”, “UDP”, “TCP_UDP”, “HTTP” or “HTTPS”. Required when target_type is instance or ip. Does not apply when target_type is lambda.

Timeout int

The amount of time, in seconds, during which no response means a failed health check. For Application Load Balancers, the range is 2 to 120 seconds, and the default is 5 seconds for the instance target type and 30 seconds for the lambda target type. For Network Load Balancers, you cannot set a custom value, and the default is 10 seconds for TCP and HTTPS health checks and 6 seconds for HTTP health checks.

UnhealthyThreshold int

The number of consecutive health check failures required before considering the target unhealthy . For Network Load Balancers, this value must be the same as the healthy_threshold. Defaults to 3.

Enabled bool

Boolean to enable / disable stickiness. Default is true

HealthyThreshold int

The number of consecutive health checks successes required before considering an unhealthy target healthy. Defaults to 3.

Interval int

The approximate amount of time, in seconds, between health checks of an individual target. Minimum value 5 seconds, Maximum value 300 seconds. For lambda target groups, it needs to be greater as the timeout of the underlying lambda. Default 30 seconds.

Matcher string

The HTTP codes to use when checking for a successful response from a target. You can specify multiple values (for example, “200,202”) or a range of values (for example, “200-299”). Applies to Application Load Balancers only (HTTP/HTTPS), not Network Load Balancers (TCP).

Path string

The destination for the health check request. Applies to Application Load Balancers only (HTTP/HTTPS), not Network Load Balancers (TCP).

Port string

The port on which targets receive traffic, unless overridden when registering a specific target. Required when target_type is instance or ip. Does not apply when target_type is lambda.

Protocol string

The protocol to use for routing traffic to the targets. Should be one of “TCP”, “TLS”, “UDP”, “TCP_UDP”, “HTTP” or “HTTPS”. Required when target_type is instance or ip. Does not apply when target_type is lambda.

Timeout int

The amount of time, in seconds, during which no response means a failed health check. For Application Load Balancers, the range is 2 to 120 seconds, and the default is 5 seconds for the instance target type and 30 seconds for the lambda target type. For Network Load Balancers, you cannot set a custom value, and the default is 10 seconds for TCP and HTTPS health checks and 6 seconds for HTTP health checks.

UnhealthyThreshold int

The number of consecutive health check failures required before considering the target unhealthy . For Network Load Balancers, this value must be the same as the healthy_threshold. Defaults to 3.

enabled boolean

Boolean to enable / disable stickiness. Default is true

healthyThreshold number

The number of consecutive health checks successes required before considering an unhealthy target healthy. Defaults to 3.

interval number

The approximate amount of time, in seconds, between health checks of an individual target. Minimum value 5 seconds, Maximum value 300 seconds. For lambda target groups, it needs to be greater as the timeout of the underlying lambda. Default 30 seconds.

matcher string

The HTTP codes to use when checking for a successful response from a target. You can specify multiple values (for example, “200,202”) or a range of values (for example, “200-299”). Applies to Application Load Balancers only (HTTP/HTTPS), not Network Load Balancers (TCP).

path string

The destination for the health check request. Applies to Application Load Balancers only (HTTP/HTTPS), not Network Load Balancers (TCP).

port string

The port on which targets receive traffic, unless overridden when registering a specific target. Required when target_type is instance or ip. Does not apply when target_type is lambda.

protocol string

The protocol to use for routing traffic to the targets. Should be one of “TCP”, “TLS”, “UDP”, “TCP_UDP”, “HTTP” or “HTTPS”. Required when target_type is instance or ip. Does not apply when target_type is lambda.

timeout number

The amount of time, in seconds, during which no response means a failed health check. For Application Load Balancers, the range is 2 to 120 seconds, and the default is 5 seconds for the instance target type and 30 seconds for the lambda target type. For Network Load Balancers, you cannot set a custom value, and the default is 10 seconds for TCP and HTTPS health checks and 6 seconds for HTTP health checks.

unhealthyThreshold number

The number of consecutive health check failures required before considering the target unhealthy . For Network Load Balancers, this value must be the same as the healthy_threshold. Defaults to 3.

enabled bool

Boolean to enable / disable stickiness. Default is true

healthyThreshold float

The number of consecutive health checks successes required before considering an unhealthy target healthy. Defaults to 3.

interval float

The approximate amount of time, in seconds, between health checks of an individual target. Minimum value 5 seconds, Maximum value 300 seconds. For lambda target groups, it needs to be greater as the timeout of the underlying lambda. Default 30 seconds.

matcher str

The HTTP codes to use when checking for a successful response from a target. You can specify multiple values (for example, “200,202”) or a range of values (for example, “200-299”). Applies to Application Load Balancers only (HTTP/HTTPS), not Network Load Balancers (TCP).

path str

The destination for the health check request. Applies to Application Load Balancers only (HTTP/HTTPS), not Network Load Balancers (TCP).

port str

The port on which targets receive traffic, unless overridden when registering a specific target. Required when target_type is instance or ip. Does not apply when target_type is lambda.

protocol str

The protocol to use for routing traffic to the targets. Should be one of “TCP”, “TLS”, “UDP”, “TCP_UDP”, “HTTP” or “HTTPS”. Required when target_type is instance or ip. Does not apply when target_type is lambda.

timeout float

The amount of time, in seconds, during which no response means a failed health check. For Application Load Balancers, the range is 2 to 120 seconds, and the default is 5 seconds for the instance target type and 30 seconds for the lambda target type. For Network Load Balancers, you cannot set a custom value, and the default is 10 seconds for TCP and HTTPS health checks and 6 seconds for HTTP health checks.

unhealthyThreshold float

The number of consecutive health check failures required before considering the target unhealthy . For Network Load Balancers, this value must be the same as the healthy_threshold. Defaults to 3.

TargetGroupStickiness

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Type string

The type of sticky sessions. The only current possible value is lb_cookie.

CookieDuration int

The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the load balancer-generated cookie is considered stale. The range is 1 second to 1 week (604800 seconds). The default value is 1 day (86400 seconds).

Enabled bool

Indicates whether health checks are enabled. Defaults to true.

Type string

The type of sticky sessions. The only current possible value is lb_cookie.

CookieDuration int

The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the load balancer-generated cookie is considered stale. The range is 1 second to 1 week (604800 seconds). The default value is 1 day (86400 seconds).

Enabled bool

Indicates whether health checks are enabled. Defaults to true.

type string

The type of sticky sessions. The only current possible value is lb_cookie.

cookieDuration number

The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the load balancer-generated cookie is considered stale. The range is 1 second to 1 week (604800 seconds). The default value is 1 day (86400 seconds).

enabled boolean

Indicates whether health checks are enabled. Defaults to true.

type str

The type of sticky sessions. The only current possible value is lb_cookie.

cookieDuration float

The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the load balancer-generated cookie is considered stale. The range is 1 second to 1 week (604800 seconds). The default value is 1 day (86400 seconds).

enabled bool

Indicates whether health checks are enabled. Defaults to true.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.