TargetGroup class

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

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", {
    name: "tf-example-lb-tg",
    port: 80,
    protocol: "HTTP",
    vpcId: main.id,
});
import pulumi
import pulumi_aws as aws

main = aws.ec2.Vpc("main", cidr_block="10.0.0.0/16")
test = aws.lb.TargetGroup("test",
    name="tf-example-lb-tg",
    port=80,
    protocol="HTTP",
    vpc_id=main.id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var main = new Aws.Ec2.Vpc("main", new()
    {
        CidrBlock = "10.0.0.0/16",
    });

    var test = new Aws.LB.TargetGroup("test", new()
    {
        Name = "tf-example-lb-tg",
        Port = 80,
        Protocol = "HTTP",
        VpcId = main.Id,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2"
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lb"
	"github.com/pulumi/pulumi/sdk/v3/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{
			Name:     pulumi.String("tf-example-lb-tg"),
			Port:     pulumi.Int(80),
			Protocol: pulumi.String("HTTP"),
			VpcId:    main.ID().ToIDOutput().ToStringOutput(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_lb_targetgroup" "test" {
  name     = "tf-example-lb-tg"
  port     = 80
  protocol = "HTTP"
  vpc_id   = aws_ec2_vpc.main.id
}
resource "aws_ec2_vpc" "main" {
  cidr_block = "10.0.0.0/16"
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Vpc;
import com.pulumi.aws.ec2.VpcArgs;
import com.pulumi.aws.lb.TargetGroup;
import com.pulumi.aws.lb.TargetGroupArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var main = new Vpc("main", VpcArgs.builder()
            .cidrBlock("10.0.0.0/16")
            .build());

        var test = new TargetGroup("test", TargetGroupArgs.builder()
            .name("tf-example-lb-tg")
            .port(80)
            .protocol("HTTP")
            .vpcId(main.id())
            .build());

    }
}
resources:
  test:
    type: aws:lb:TargetGroup
    properties:
      name: tf-example-lb-tg
      port: 80
      protocol: HTTP
      vpcId: ${main.id}
  main:
    type: aws:ec2:Vpc
    properties:
      cidrBlock: 10.0.0.0/16

IP Target Group

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", {
    name: "tf-example-lb-tg",
    port: 80,
    protocol: "HTTP",
    targetType: "ip",
    vpcId: main.id,
});
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",
    name="tf-example-lb-tg",
    port=80,
    protocol="HTTP",
    target_type="ip",
    vpc_id=main.id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var main = new Aws.Ec2.Vpc("main", new()
    {
        CidrBlock = "10.0.0.0/16",
    });

    var ip_example = new Aws.LB.TargetGroup("ip-example", new()
    {
        Name = "tf-example-lb-tg",
        Port = 80,
        Protocol = "HTTP",
        TargetType = "ip",
        VpcId = main.Id,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2"
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lb"
	"github.com/pulumi/pulumi/sdk/v3/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{
			Name:       pulumi.String("tf-example-lb-tg"),
			Port:       pulumi.Int(80),
			Protocol:   pulumi.String("HTTP"),
			TargetType: pulumi.String("ip"),
			VpcId:      main.ID().ToIDOutput().ToStringOutput(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_lb_targetgroup" "ip-example" {
  name        = "tf-example-lb-tg"
  port        = 80
  protocol    = "HTTP"
  target_type = "ip"
  vpc_id      = aws_ec2_vpc.main.id
}
resource "aws_ec2_vpc" "main" {
  cidr_block = "10.0.0.0/16"
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Vpc;
import com.pulumi.aws.ec2.VpcArgs;
import com.pulumi.aws.lb.TargetGroup;
import com.pulumi.aws.lb.TargetGroupArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var main = new Vpc("main", VpcArgs.builder()
            .cidrBlock("10.0.0.0/16")
            .build());

        var ip_example = new TargetGroup("ip-example", TargetGroupArgs.builder()
            .name("tf-example-lb-tg")
            .port(80)
            .protocol("HTTP")
            .targetType("ip")
            .vpcId(main.id())
            .build());

    }
}
resources:
  ip-example:
    type: aws:lb:TargetGroup
    properties:
      name: tf-example-lb-tg
      port: 80
      protocol: HTTP
      targetType: ip
      vpcId: ${main.id}
  main:
    type: aws:ec2:Vpc
    properties:
      cidrBlock: 10.0.0.0/16

Lambda Target Group

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const lambda_example = new aws.lb.TargetGroup("lambda-example", {
    name: "tf-example-lb-tg",
    targetType: "lambda",
});
import pulumi
import pulumi_aws as aws

lambda_example = aws.lb.TargetGroup("lambda-example",
    name="tf-example-lb-tg",
    target_type="lambda")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var lambda_example = new Aws.LB.TargetGroup("lambda-example", new()
    {
        Name = "tf-example-lb-tg",
        TargetType = "lambda",
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := lb.NewTargetGroup(ctx, "lambda-example", &lb.TargetGroupArgs{
			Name:       pulumi.String("tf-example-lb-tg"),
			TargetType: pulumi.String("lambda"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_lb_targetgroup" "lambda-example" {
  name        = "tf-example-lb-tg"
  target_type = "lambda"
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lb.TargetGroup;
import com.pulumi.aws.lb.TargetGroupArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var lambda_example = new TargetGroup("lambda-example", TargetGroupArgs.builder()
            .name("tf-example-lb-tg")
            .targetType("lambda")
            .build());

    }
}
resources:
  lambda-example:
    type: aws:lb:TargetGroup
    properties:
      name: tf-example-lb-tg
      targetType: lambda

ALB Target Group

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const alb_example = new aws.lb.TargetGroup("alb-example", {
    name: "tf-example-lb-alb-tg",
    targetType: "alb",
    port: 80,
    protocol: "TCP",
    vpcId: main.id,
});
import pulumi
import pulumi_aws as aws

alb_example = aws.lb.TargetGroup("alb-example",
    name="tf-example-lb-alb-tg",
    target_type="alb",
    port=80,
    protocol="TCP",
    vpc_id=main["id"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var alb_example = new Aws.LB.TargetGroup("alb-example", new()
    {
        Name = "tf-example-lb-alb-tg",
        TargetType = "alb",
        Port = 80,
        Protocol = "TCP",
        VpcId = main.Id,
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := lb.NewTargetGroup(ctx, "alb-example", &lb.TargetGroupArgs{
			Name:       pulumi.String("tf-example-lb-alb-tg"),
			TargetType: pulumi.String("alb"),
			Port:       pulumi.Int(80),
			Protocol:   pulumi.String("TCP"),
			VpcId:      pulumi.Any(main.Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_lb_targetgroup" "alb-example" {
  name        = "tf-example-lb-alb-tg"
  target_type = "alb"
  port        = 80
  protocol    = "TCP"
  vpc_id      = main.id
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lb.TargetGroup;
import com.pulumi.aws.lb.TargetGroupArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var alb_example = new TargetGroup("alb-example", TargetGroupArgs.builder()
            .name("tf-example-lb-alb-tg")
            .targetType("alb")
            .port(80)
            .protocol("TCP")
            .vpcId(main.id())
            .build());

    }
}
resources:
  alb-example:
    type: aws:lb:TargetGroup
    properties:
      name: tf-example-lb-alb-tg
      targetType: alb
      port: 80
      protocol: TCP
      vpcId: ${main.id}

Target group with unhealthy connection termination disabled

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const tcp_example = new aws.lb.TargetGroup("tcp-example", {
    targetHealthStates: [{
        enableUnhealthyConnectionTermination: false,
    }],
    name: "tf-example-lb-nlb-tg",
    port: 25,
    protocol: "TCP",
    vpcId: main.id,
});
import pulumi
import pulumi_aws as aws

tcp_example = aws.lb.TargetGroup("tcp-example",
    target_health_states=[{
        "enable_unhealthy_connection_termination": False,
    }],
    name="tf-example-lb-nlb-tg",
    port=25,
    protocol="TCP",
    vpc_id=main["id"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var tcp_example = new Aws.LB.TargetGroup("tcp-example", new()
    {
        TargetHealthStates = new[]
        {
            new Aws.LB.Inputs.TargetGroupTargetHealthStateArgs
            {
                EnableUnhealthyConnectionTermination = false,
            },
        },
        Name = "tf-example-lb-nlb-tg",
        Port = 25,
        Protocol = "TCP",
        VpcId = main.Id,
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := lb.NewTargetGroup(ctx, "tcp-example", &lb.TargetGroupArgs{
			TargetHealthStates: lb.TargetGroupTargetHealthStateArray{
				&lb.TargetGroupTargetHealthStateArgs{
					EnableUnhealthyConnectionTermination: pulumi.Bool(false),
				},
			},
			Name:     pulumi.String("tf-example-lb-nlb-tg"),
			Port:     pulumi.Int(25),
			Protocol: pulumi.String("TCP"),
			VpcId:    pulumi.Any(main.Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_lb_targetgroup" "tcp-example" {
  target_health_states {
    enable_unhealthy_connection_termination = false
  }
  name     = "tf-example-lb-nlb-tg"
  port     = 25
  protocol = "TCP"
  vpc_id   = main.id
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lb.TargetGroup;
import com.pulumi.aws.lb.TargetGroupArgs;
import com.pulumi.aws.lb.inputs.TargetGroupTargetHealthStateArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var tcp_example = new TargetGroup("tcp-example", TargetGroupArgs.builder()
            .targetHealthStates(TargetGroupTargetHealthStateArgs.builder()
                .enableUnhealthyConnectionTermination(false)
                .build())
            .name("tf-example-lb-nlb-tg")
            .port(25)
            .protocol("TCP")
            .vpcId(main.id())
            .build());

    }
}
resources:
  tcp-example:
    type: aws:lb:TargetGroup
    properties:
      targetHealthStates:
        - enableUnhealthyConnectionTermination: false
      name: tf-example-lb-nlb-tg
      port: 25
      protocol: TCP
      vpcId: ${main.id}

Target group with health requirements

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const tcp_example = new aws.lb.TargetGroup("tcp-example", {
    targetGroupHealth: {
        dnsFailover: {
            minimumHealthyTargetsCount: "1",
            minimumHealthyTargetsPercentage: "off",
        },
        unhealthyStateRouting: {
            minimumHealthyTargetsCount: 1,
            minimumHealthyTargetsPercentage: "off",
        },
    },
    name: "tf-example-lb-nlb-tg",
    port: 80,
    protocol: "TCP",
    vpcId: main.id,
});
import pulumi
import pulumi_aws as aws

tcp_example = aws.lb.TargetGroup("tcp-example",
    target_group_health={
        "dns_failover": {
            "minimum_healthy_targets_count": "1",
            "minimum_healthy_targets_percentage": "off",
        },
        "unhealthy_state_routing": {
            "minimum_healthy_targets_count": 1,
            "minimum_healthy_targets_percentage": "off",
        },
    },
    name="tf-example-lb-nlb-tg",
    port=80,
    protocol="TCP",
    vpc_id=main["id"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var tcp_example = new Aws.LB.TargetGroup("tcp-example", new()
    {
        TargetGroupHealth = new Aws.LB.Inputs.TargetGroupTargetGroupHealthArgs
        {
            DnsFailover = new Aws.LB.Inputs.TargetGroupTargetGroupHealthDnsFailoverArgs
            {
                MinimumHealthyTargetsCount = "1",
                MinimumHealthyTargetsPercentage = "off",
            },
            UnhealthyStateRouting = new Aws.LB.Inputs.TargetGroupTargetGroupHealthUnhealthyStateRoutingArgs
            {
                MinimumHealthyTargetsCount = 1,
                MinimumHealthyTargetsPercentage = "off",
            },
        },
        Name = "tf-example-lb-nlb-tg",
        Port = 80,
        Protocol = "TCP",
        VpcId = main.Id,
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := lb.NewTargetGroup(ctx, "tcp-example", &lb.TargetGroupArgs{
			TargetGroupHealth: &lb.TargetGroupTargetGroupHealthArgs{
				DnsFailover: &lb.TargetGroupTargetGroupHealthDnsFailoverArgs{
					MinimumHealthyTargetsCount:      pulumi.String("1"),
					MinimumHealthyTargetsPercentage: pulumi.String("off"),
				},
				UnhealthyStateRouting: &lb.TargetGroupTargetGroupHealthUnhealthyStateRoutingArgs{
					MinimumHealthyTargetsCount:      pulumi.Int(1),
					MinimumHealthyTargetsPercentage: pulumi.String("off"),
				},
			},
			Name:     pulumi.String("tf-example-lb-nlb-tg"),
			Port:     pulumi.Int(80),
			Protocol: pulumi.String("TCP"),
			VpcId:    pulumi.Any(main.Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_lb_targetgroup" "tcp-example" {
  target_group_health = {
    dns_failover = {
      minimum_healthy_targets_count      = "1"
      minimum_healthy_targets_percentage = "off"
    }
    unhealthy_state_routing = {
      minimum_healthy_targets_count      = "1"
      minimum_healthy_targets_percentage = "off"
    }
  }
  name     = "tf-example-lb-nlb-tg"
  port     = 80
  protocol = "TCP"
  vpc_id   = main.id
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lb.TargetGroup;
import com.pulumi.aws.lb.TargetGroupArgs;
import com.pulumi.aws.lb.inputs.TargetGroupTargetGroupHealthArgs;
import com.pulumi.aws.lb.inputs.TargetGroupTargetGroupHealthDnsFailoverArgs;
import com.pulumi.aws.lb.inputs.TargetGroupTargetGroupHealthUnhealthyStateRoutingArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var tcp_example = new TargetGroup("tcp-example", TargetGroupArgs.builder()
            .targetGroupHealth(TargetGroupTargetGroupHealthArgs.builder()
                .dnsFailover(TargetGroupTargetGroupHealthDnsFailoverArgs.builder()
                    .minimumHealthyTargetsCount("1")
                    .minimumHealthyTargetsPercentage("off")
                    .build())
                .unhealthyStateRouting(TargetGroupTargetGroupHealthUnhealthyStateRoutingArgs.builder()
                    .minimumHealthyTargetsCount(1)
                    .minimumHealthyTargetsPercentage("off")
                    .build())
                .build())
            .name("tf-example-lb-nlb-tg")
            .port(80)
            .protocol("TCP")
            .vpcId(main.id())
            .build());

    }
}
resources:
  tcp-example:
    type: aws:lb:TargetGroup
    properties:
      targetGroupHealth:
        dnsFailover:
          minimumHealthyTargetsCount: '1'
          minimumHealthyTargetsPercentage: off
        unhealthyStateRouting:
          minimumHealthyTargetsCount: '1'
          minimumHealthyTargetsPercentage: off
      name: tf-example-lb-nlb-tg
      port: 80
      protocol: TCP
      vpcId: ${main.id}

Import

Identity Schema

Required

  • arn (String) ARN of the target group.

Using pulumi import, import Target Groups using their ARN. For example:

$ pulumi import aws:lb/targetGroup:TargetGroup app_front_end arn:aws:elasticloadbalancing:us-west-2:187416307283:targetgroup/app-front-end/20cfe21448b66314

Constructors

TargetGroup(String name, {TargetGroupArgs? args, CustomResourceOptions? options})
Creates a new TargetGroup. name The Pulumi resource name. args Arguments used to configure this TargetGroup. The set of arguments for TargetGroup. options Resource options controlling this resource's behavior.
TargetGroup.reference(String urn)
Creates a typed reference to an existing TargetGroup resource.

Properties

arn ↔ Output<String>
ARN of the Target Group (matches id).
latefinal
arnSuffix ↔ Output<String>
ARN suffix for use with CloudWatch Metrics.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
connectionTermination ↔ Output<bool>
Whether to terminate connections at the end of the deregistration timeout on Network Load Balancers. See doc for more information. Default is false.
latefinal
deregistrationDelay ↔ Output<int?>
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.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
healthCheck ↔ Output<TargetGroupHealthCheck>
Health Check configuration block. Detailed below.
latefinal
id ↔ Output<String>
getter/setter pairinherited
ipAddressType ↔ Output<String>
The type of IP addresses used by the target group, only supported when target type is set to ip. Possible values are ipv4 or ipv6.
latefinal
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
lambdaMultiValueHeadersEnabled ↔ Output<bool?>
Whether the request and response headers exchanged between the load balancer and the Lambda function include arrays of values or strings. Only applies when targetType is lambda. Default is false.
latefinal
loadBalancerArns ↔ Output<List<String>>
ARNs of the Load Balancers associated with the Target Group.
latefinal
loadBalancingAlgorithmType ↔ Output<String>
Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is roundRobin, leastOutstandingRequests, or weightedRandom. The default is roundRobin.
latefinal
loadBalancingAnomalyMitigation ↔ Output<String>
Determines whether to enable target anomaly mitigation. Target anomaly mitigation is only supported by the weightedRandom load balancing algorithm type. See doc for more information. The value is "on" or "off". The default is "off".
latefinal
loadBalancingCrossZoneEnabled ↔ Output<String>
Indicates whether cross zone load balancing is enabled. The value is "true", "false" or "useLoadBalancerConfiguration". The default is "useLoadBalancerConfiguration".
latefinal
name ↔ Output<String>
Name of the target group. If omitted, this provider will assign a random, unique name. This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen.
latefinal
namePrefix ↔ Output<String>
Creates a unique name beginning with the specified prefix. Conflicts with name. Cannot be longer than 6 characters.
latefinal
port ↔ Output<int?>
Port on which targets receive traffic, unless overridden when registering a specific target. Required when targetType is instance, ip or alb. Does not apply when targetType is lambda.
latefinal
preserveClientIp ↔ Output<String>
Whether client IP preservation is enabled. See doc for more information.
latefinal
protocol ↔ Output<String?>
Protocol to use for routing traffic to the targets. Should be one of GENEVE, HTTP, HTTPS, TCP, TCP_UDP, TLS, UDP, QUIC, or TCP_QUIC. Required when targetType is instance, ip, or alb. Does not apply when targetType is lambda.
latefinal
protocolVersion ↔ Output<String>
Only applicable when protocol is HTTP or HTTPS. The protocol version. Specify GRPC to send requests to targets using gRPC. Specify HTTP2 to send requests to targets using HTTP/2. The default is HTTP1, which sends requests to targets using HTTP/1.1
latefinal
proxyProtocolV2 ↔ Output<bool?>
Whether to enable support for proxy protocol v2 on Network Load Balancers. See doc for more information. Default is false.
latefinal
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
slowStart ↔ Output<int?>
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.
latefinal
stickiness ↔ Output<TargetGroupStickiness>
Stickiness configuration block. Detailed below.
latefinal
tags ↔ Output<Map<String, String>?>
Map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
latefinal
tagsAll ↔ Output<Map<String, String>>
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
latefinal
targetControlPort ↔ Output<int?>
Port on which the target control agent and application load balancer exchange management traffic for the target optimizer feature. Only applicable for Application Load Balancer target groups when targetType is instance or ip.
latefinal
targetFailovers ↔ Output<List<TargetGroupTargetFailover>>
Target failover block. Only applicable for Gateway Load Balancer target groups. See targetFailover for more information.
latefinal
targetGroupHealth ↔ Output<TargetGroupTargetGroupHealth>
Target health requirements block. See targetGroupHealth for more information.
latefinal
targetHealthStates ↔ Output<List<TargetGroupTargetHealthState>>
Target health state block. Only applicable for Network Load Balancer target groups when protocol is TCP or TLS. See targetHealthState for more information.
latefinal
targetType ↔ Output<String?>
Type of target that you must specify when registering targets with this target group. See doc for supported values. The default is instance.
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited
vpcId ↔ Output<String?>
Identifier of the VPC in which to create the target group. Required when targetType is instance, ip or alb. Does not apply when targetType is lambda.
latefinal

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {TargetGroupState? state, CustomResourceOptions? options}) → TargetGroup
Gets an existing TargetGroup resource's state with the given name and id.