TargetGroup
Provides a Target Group resource for use with Load Balancer resources.
Note:
aws.alb.TargetGroupis known asaws.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
new TargetGroup(name: string, args?: TargetGroupArgs, opts?: CustomResourceOptions);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:
- Deregistration
Delay 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.
- Health
Check TargetGroup Health Check Args A Health Check block. Health Check blocks are documented below.
- Lambda
Multi boolValue Headers Enabled 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_typeislambda.- Load
Balancing stringAlgorithm Type Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is
round_robinorleast_outstanding_requests. The default isround_robin.- Name string
The name of the target group. If omitted, this provider will assign a random, unique name.
- Name
Prefix 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_typeisinstanceorip. Does not apply whentarget_typeislambda.- 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_typeisinstanceorip. Does not apply whentarget_typeislambda.- Proxy
Protocol boolV2 Boolean to enable / disable support for proxy protocol v2 on Network Load Balancers. See doc for more information.
- Slow
Start 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
Target
Group Stickiness Args A Stickiness block. Stickiness blocks are documented below.
stickinessis only valid if used with Load Balancers of typeApplication- Dictionary<string, string>
A map of tags to assign to the resource.
- Target
Type 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) orip(targets are specified by IP address) orlambda(targets are specified by lambda arn). The default isinstance. Note that you can’t specify targets for a target group using both instance IDs and IP addresses. If the target type isip, 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 string The identifier of the VPC in which to create the target group. Required when
target_typeisinstanceorip. Does not apply whentarget_typeislambda.
- Deregistration
Delay 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.
- Health
Check TargetGroup Health Check A Health Check block. Health Check blocks are documented below.
- Lambda
Multi boolValue Headers Enabled 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_typeislambda.- Load
Balancing stringAlgorithm Type Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is
round_robinorleast_outstanding_requests. The default isround_robin.- Name string
The name of the target group. If omitted, this provider will assign a random, unique name.
- Name
Prefix 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_typeisinstanceorip. Does not apply whentarget_typeislambda.- 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_typeisinstanceorip. Does not apply whentarget_typeislambda.- Proxy
Protocol boolV2 Boolean to enable / disable support for proxy protocol v2 on Network Load Balancers. See doc for more information.
- Slow
Start 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
Target
Group Stickiness A Stickiness block. Stickiness blocks are documented below.
stickinessis only valid if used with Load Balancers of typeApplication- map[string]string
A map of tags to assign to the resource.
- Target
Type 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) orip(targets are specified by IP address) orlambda(targets are specified by lambda arn). The default isinstance. Note that you can’t specify targets for a target group using both instance IDs and IP addresses. If the target type isip, 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 string The identifier of the VPC in which to create the target group. Required when
target_typeisinstanceorip. Does not apply whentarget_typeislambda.
- deregistration
Delay 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.
- health
Check TargetGroup Health Check A Health Check block. Health Check blocks are documented below.
- lambda
Multi booleanValue Headers Enabled 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_typeislambda.- load
Balancing stringAlgorithm Type Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is
round_robinorleast_outstanding_requests. The default isround_robin.- name string
The name of the target group. If omitted, this provider will assign a random, unique name.
- name
Prefix 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_typeisinstanceorip. Does not apply whentarget_typeislambda.- 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_typeisinstanceorip. Does not apply whentarget_typeislambda.- proxy
Protocol booleanV2 Boolean to enable / disable support for proxy protocol v2 on Network Load Balancers. See doc for more information.
- slow
Start 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
Target
Group Stickiness A Stickiness block. Stickiness blocks are documented below.
stickinessis only valid if used with Load Balancers of typeApplication- {[key: string]: string}
A map of tags to assign to the resource.
- target
Type 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) orip(targets are specified by IP address) orlambda(targets are specified by lambda arn). The default isinstance. Note that you can’t specify targets for a target group using both instance IDs and IP addresses. If the target type isip, 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 string The identifier of the VPC in which to create the target group. Required when
target_typeisinstanceorip. Does not apply whentarget_typeislambda.
- 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[TargetGroup Health Check] A Health Check block. Health Check blocks are documented below.
- lambda_
multi_ boolvalue_ headers_ enabled 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_typeislambda.- load_
balancing_ stralgorithm_ type Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is
round_robinorleast_outstanding_requests. The default isround_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_typeisinstanceorip. Does not apply whentarget_typeislambda.- 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_typeisinstanceorip. Does not apply whentarget_typeislambda.- proxy_
protocol_ boolv2 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[Target
Group Stickiness] A Stickiness block. Stickiness blocks are documented below.
stickinessis only valid if used with Load Balancers of typeApplication- 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) orip(targets are specified by IP address) orlambda(targets are specified by lambda arn). The default isinstance. Note that you can’t specify targets for a target group using both instance IDs and IP addresses. If the target type isip, 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_typeisinstanceorip. Does not apply whentarget_typeislambda.
Outputs
All input properties are implicitly available as output properties. Additionally, the TargetGroup resource produces the following output properties:
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): TargetGroupstatic 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)- Arn
Suffix string The ARN suffix for use with CloudWatch Metrics.
- Deregistration
Delay 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.
- Health
Check TargetGroup Health Check Args A Health Check block. Health Check blocks are documented below.
- Lambda
Multi boolValue Headers Enabled 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_typeislambda.- Load
Balancing stringAlgorithm Type Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is
round_robinorleast_outstanding_requests. The default isround_robin.- Name string
The name of the target group. If omitted, this provider will assign a random, unique name.
- Name
Prefix 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_typeisinstanceorip. Does not apply whentarget_typeislambda.- 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_typeisinstanceorip. Does not apply whentarget_typeislambda.- Proxy
Protocol boolV2 Boolean to enable / disable support for proxy protocol v2 on Network Load Balancers. See doc for more information.
- Slow
Start 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
Target
Group Stickiness Args A Stickiness block. Stickiness blocks are documented below.
stickinessis only valid if used with Load Balancers of typeApplication- Dictionary<string, string>
A map of tags to assign to the resource.
- Target
Type 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) orip(targets are specified by IP address) orlambda(targets are specified by lambda arn). The default isinstance. Note that you can’t specify targets for a target group using both instance IDs and IP addresses. If the target type isip, 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 string The identifier of the VPC in which to create the target group. Required when
target_typeisinstanceorip. Does not apply whentarget_typeislambda.
- Arn string
The ARN of the Target Group (matches
id)- Arn
Suffix string The ARN suffix for use with CloudWatch Metrics.
- Deregistration
Delay 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.
- Health
Check TargetGroup Health Check A Health Check block. Health Check blocks are documented below.
- Lambda
Multi boolValue Headers Enabled 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_typeislambda.- Load
Balancing stringAlgorithm Type Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is
round_robinorleast_outstanding_requests. The default isround_robin.- Name string
The name of the target group. If omitted, this provider will assign a random, unique name.
- Name
Prefix 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_typeisinstanceorip. Does not apply whentarget_typeislambda.- 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_typeisinstanceorip. Does not apply whentarget_typeislambda.- Proxy
Protocol boolV2 Boolean to enable / disable support for proxy protocol v2 on Network Load Balancers. See doc for more information.
- Slow
Start 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
Target
Group Stickiness A Stickiness block. Stickiness blocks are documented below.
stickinessis only valid if used with Load Balancers of typeApplication- map[string]string
A map of tags to assign to the resource.
- Target
Type 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) orip(targets are specified by IP address) orlambda(targets are specified by lambda arn). The default isinstance. Note that you can’t specify targets for a target group using both instance IDs and IP addresses. If the target type isip, 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 string The identifier of the VPC in which to create the target group. Required when
target_typeisinstanceorip. Does not apply whentarget_typeislambda.
- arn string
The ARN of the Target Group (matches
id)- arn
Suffix string The ARN suffix for use with CloudWatch Metrics.
- deregistration
Delay 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.
- health
Check TargetGroup Health Check A Health Check block. Health Check blocks are documented below.
- lambda
Multi booleanValue Headers Enabled 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_typeislambda.- load
Balancing stringAlgorithm Type Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is
round_robinorleast_outstanding_requests. The default isround_robin.- name string
The name of the target group. If omitted, this provider will assign a random, unique name.
- name
Prefix 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_typeisinstanceorip. Does not apply whentarget_typeislambda.- 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_typeisinstanceorip. Does not apply whentarget_typeislambda.- proxy
Protocol booleanV2 Boolean to enable / disable support for proxy protocol v2 on Network Load Balancers. See doc for more information.
- slow
Start 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
Target
Group Stickiness A Stickiness block. Stickiness blocks are documented below.
stickinessis only valid if used with Load Balancers of typeApplication- {[key: string]: string}
A map of tags to assign to the resource.
- target
Type 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) orip(targets are specified by IP address) orlambda(targets are specified by lambda arn). The default isinstance. Note that you can’t specify targets for a target group using both instance IDs and IP addresses. If the target type isip, 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 string The identifier of the VPC in which to create the target group. Required when
target_typeisinstanceorip. Does not apply whentarget_typeislambda.
- 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[TargetGroup Health Check] A Health Check block. Health Check blocks are documented below.
- lambda_
multi_ boolvalue_ headers_ enabled 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_typeislambda.- load_
balancing_ stralgorithm_ type Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is
round_robinorleast_outstanding_requests. The default isround_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_typeisinstanceorip. Does not apply whentarget_typeislambda.- 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_typeisinstanceorip. Does not apply whentarget_typeislambda.- proxy_
protocol_ boolv2 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[Target
Group Stickiness] A Stickiness block. Stickiness blocks are documented below.
stickinessis only valid if used with Load Balancers of typeApplication- 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) orip(targets are specified by IP address) orlambda(targets are specified by lambda arn). The default isinstance. Note that you can’t specify targets for a target group using both instance IDs and IP addresses. If the target type isip, 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_typeisinstanceorip. Does not apply whentarget_typeislambda.
Supporting Types
TargetGroupHealthCheck
- Enabled bool
Boolean to enable / disable
stickiness. Default istrue- Healthy
Threshold 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
lambdatarget groups, it needs to be greater as thetimeoutof the underlyinglambda. 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_typeisinstanceorip. Does not apply whentarget_typeislambda.- 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_typeisinstanceorip. Does not apply whentarget_typeislambda.- 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
instancetarget type and 30 seconds for thelambdatarget 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.- Unhealthy
Threshold 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 istrue- Healthy
Threshold 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
lambdatarget groups, it needs to be greater as thetimeoutof the underlyinglambda. 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_typeisinstanceorip. Does not apply whentarget_typeislambda.- 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_typeisinstanceorip. Does not apply whentarget_typeislambda.- 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
instancetarget type and 30 seconds for thelambdatarget 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.- Unhealthy
Threshold 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 istrue- healthy
Threshold 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
lambdatarget groups, it needs to be greater as thetimeoutof the underlyinglambda. 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_typeisinstanceorip. Does not apply whentarget_typeislambda.- 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_typeisinstanceorip. Does not apply whentarget_typeislambda.- 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
instancetarget type and 30 seconds for thelambdatarget 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.- unhealthy
Threshold 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 istrue- healthy
Threshold 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
lambdatarget groups, it needs to be greater as thetimeoutof the underlyinglambda. 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_typeisinstanceorip. Does not apply whentarget_typeislambda.- 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_typeisinstanceorip. Does not apply whentarget_typeislambda.- 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
instancetarget type and 30 seconds for thelambdatarget 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.- unhealthy
Threshold 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
- Type string
The type of sticky sessions. The only current possible value is
lb_cookie.- 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.- 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.- 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.- 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
awsTerraform Provider.