1. Packages
  2. AWS
  3. API Docs
  4. vpclattice
  5. TargetGroup
AWS v6.64.0 published on Friday, Dec 6, 2024 by Pulumi

aws.vpclattice.TargetGroup

Explore with Pulumi AI

aws logo
AWS v6.64.0 published on Friday, Dec 6, 2024 by Pulumi

    Resource for managing an AWS VPC Lattice Target Group.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.vpclattice.TargetGroup("example", {
        name: "example",
        type: "INSTANCE",
        config: {
            vpcIdentifier: exampleAwsVpc.id,
            port: 443,
            protocol: "HTTPS",
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.vpclattice.TargetGroup("example",
        name="example",
        type="INSTANCE",
        config={
            "vpc_identifier": example_aws_vpc["id"],
            "port": 443,
            "protocol": "HTTPS",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/vpclattice"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vpclattice.NewTargetGroup(ctx, "example", &vpclattice.TargetGroupArgs{
    			Name: pulumi.String("example"),
    			Type: pulumi.String("INSTANCE"),
    			Config: &vpclattice.TargetGroupConfigArgs{
    				VpcIdentifier: pulumi.Any(exampleAwsVpc.Id),
    				Port:          pulumi.Int(443),
    				Protocol:      pulumi.String("HTTPS"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.VpcLattice.TargetGroup("example", new()
        {
            Name = "example",
            Type = "INSTANCE",
            Config = new Aws.VpcLattice.Inputs.TargetGroupConfigArgs
            {
                VpcIdentifier = exampleAwsVpc.Id,
                Port = 443,
                Protocol = "HTTPS",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.vpclattice.TargetGroup;
    import com.pulumi.aws.vpclattice.TargetGroupArgs;
    import com.pulumi.aws.vpclattice.inputs.TargetGroupConfigArgs;
    import java.util.List;
    import java.util.ArrayList;
    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 example = new TargetGroup("example", TargetGroupArgs.builder()
                .name("example")
                .type("INSTANCE")
                .config(TargetGroupConfigArgs.builder()
                    .vpcIdentifier(exampleAwsVpc.id())
                    .port(443)
                    .protocol("HTTPS")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:vpclattice:TargetGroup
        properties:
          name: example
          type: INSTANCE
          config:
            vpcIdentifier: ${exampleAwsVpc.id}
            port: 443
            protocol: HTTPS
    

    Basic usage with Health check

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.vpclattice.TargetGroup("example", {
        name: "example",
        type: "IP",
        config: {
            vpcIdentifier: exampleAwsVpc.id,
            ipAddressType: "IPV4",
            port: 443,
            protocol: "HTTPS",
            protocolVersion: "HTTP1",
            healthCheck: {
                enabled: true,
                healthCheckIntervalSeconds: 20,
                healthCheckTimeoutSeconds: 10,
                healthyThresholdCount: 7,
                unhealthyThresholdCount: 3,
                matcher: {
                    value: "200-299",
                },
                path: "/instance",
                port: 80,
                protocol: "HTTP",
                protocolVersion: "HTTP1",
            },
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.vpclattice.TargetGroup("example",
        name="example",
        type="IP",
        config={
            "vpc_identifier": example_aws_vpc["id"],
            "ip_address_type": "IPV4",
            "port": 443,
            "protocol": "HTTPS",
            "protocol_version": "HTTP1",
            "health_check": {
                "enabled": True,
                "health_check_interval_seconds": 20,
                "health_check_timeout_seconds": 10,
                "healthy_threshold_count": 7,
                "unhealthy_threshold_count": 3,
                "matcher": {
                    "value": "200-299",
                },
                "path": "/instance",
                "port": 80,
                "protocol": "HTTP",
                "protocol_version": "HTTP1",
            },
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/vpclattice"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vpclattice.NewTargetGroup(ctx, "example", &vpclattice.TargetGroupArgs{
    			Name: pulumi.String("example"),
    			Type: pulumi.String("IP"),
    			Config: &vpclattice.TargetGroupConfigArgs{
    				VpcIdentifier:   pulumi.Any(exampleAwsVpc.Id),
    				IpAddressType:   pulumi.String("IPV4"),
    				Port:            pulumi.Int(443),
    				Protocol:        pulumi.String("HTTPS"),
    				ProtocolVersion: pulumi.String("HTTP1"),
    				HealthCheck: &vpclattice.TargetGroupConfigHealthCheckArgs{
    					Enabled:                    pulumi.Bool(true),
    					HealthCheckIntervalSeconds: pulumi.Int(20),
    					HealthCheckTimeoutSeconds:  pulumi.Int(10),
    					HealthyThresholdCount:      pulumi.Int(7),
    					UnhealthyThresholdCount:    pulumi.Int(3),
    					Matcher: &vpclattice.TargetGroupConfigHealthCheckMatcherArgs{
    						Value: pulumi.String("200-299"),
    					},
    					Path:            pulumi.String("/instance"),
    					Port:            pulumi.Int(80),
    					Protocol:        pulumi.String("HTTP"),
    					ProtocolVersion: pulumi.String("HTTP1"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.VpcLattice.TargetGroup("example", new()
        {
            Name = "example",
            Type = "IP",
            Config = new Aws.VpcLattice.Inputs.TargetGroupConfigArgs
            {
                VpcIdentifier = exampleAwsVpc.Id,
                IpAddressType = "IPV4",
                Port = 443,
                Protocol = "HTTPS",
                ProtocolVersion = "HTTP1",
                HealthCheck = new Aws.VpcLattice.Inputs.TargetGroupConfigHealthCheckArgs
                {
                    Enabled = true,
                    HealthCheckIntervalSeconds = 20,
                    HealthCheckTimeoutSeconds = 10,
                    HealthyThresholdCount = 7,
                    UnhealthyThresholdCount = 3,
                    Matcher = new Aws.VpcLattice.Inputs.TargetGroupConfigHealthCheckMatcherArgs
                    {
                        Value = "200-299",
                    },
                    Path = "/instance",
                    Port = 80,
                    Protocol = "HTTP",
                    ProtocolVersion = "HTTP1",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.vpclattice.TargetGroup;
    import com.pulumi.aws.vpclattice.TargetGroupArgs;
    import com.pulumi.aws.vpclattice.inputs.TargetGroupConfigArgs;
    import com.pulumi.aws.vpclattice.inputs.TargetGroupConfigHealthCheckArgs;
    import com.pulumi.aws.vpclattice.inputs.TargetGroupConfigHealthCheckMatcherArgs;
    import java.util.List;
    import java.util.ArrayList;
    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 example = new TargetGroup("example", TargetGroupArgs.builder()
                .name("example")
                .type("IP")
                .config(TargetGroupConfigArgs.builder()
                    .vpcIdentifier(exampleAwsVpc.id())
                    .ipAddressType("IPV4")
                    .port(443)
                    .protocol("HTTPS")
                    .protocolVersion("HTTP1")
                    .healthCheck(TargetGroupConfigHealthCheckArgs.builder()
                        .enabled(true)
                        .healthCheckIntervalSeconds(20)
                        .healthCheckTimeoutSeconds(10)
                        .healthyThresholdCount(7)
                        .unhealthyThresholdCount(3)
                        .matcher(TargetGroupConfigHealthCheckMatcherArgs.builder()
                            .value("200-299")
                            .build())
                        .path("/instance")
                        .port(80)
                        .protocol("HTTP")
                        .protocolVersion("HTTP1")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:vpclattice:TargetGroup
        properties:
          name: example
          type: IP
          config:
            vpcIdentifier: ${exampleAwsVpc.id}
            ipAddressType: IPV4
            port: 443
            protocol: HTTPS
            protocolVersion: HTTP1
            healthCheck:
              enabled: true
              healthCheckIntervalSeconds: 20
              healthCheckTimeoutSeconds: 10
              healthyThresholdCount: 7
              unhealthyThresholdCount: 3
              matcher:
                value: 200-299
              path: /instance
              port: 80
              protocol: HTTP
              protocolVersion: HTTP1
    

    ALB

    If the type is ALB, health_check block is not supported.

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.vpclattice.TargetGroup("example", {
        name: "example",
        type: "ALB",
        config: {
            vpcIdentifier: exampleAwsVpc.id,
            port: 443,
            protocol: "HTTPS",
            protocolVersion: "HTTP1",
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.vpclattice.TargetGroup("example",
        name="example",
        type="ALB",
        config={
            "vpc_identifier": example_aws_vpc["id"],
            "port": 443,
            "protocol": "HTTPS",
            "protocol_version": "HTTP1",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/vpclattice"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vpclattice.NewTargetGroup(ctx, "example", &vpclattice.TargetGroupArgs{
    			Name: pulumi.String("example"),
    			Type: pulumi.String("ALB"),
    			Config: &vpclattice.TargetGroupConfigArgs{
    				VpcIdentifier:   pulumi.Any(exampleAwsVpc.Id),
    				Port:            pulumi.Int(443),
    				Protocol:        pulumi.String("HTTPS"),
    				ProtocolVersion: pulumi.String("HTTP1"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.VpcLattice.TargetGroup("example", new()
        {
            Name = "example",
            Type = "ALB",
            Config = new Aws.VpcLattice.Inputs.TargetGroupConfigArgs
            {
                VpcIdentifier = exampleAwsVpc.Id,
                Port = 443,
                Protocol = "HTTPS",
                ProtocolVersion = "HTTP1",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.vpclattice.TargetGroup;
    import com.pulumi.aws.vpclattice.TargetGroupArgs;
    import com.pulumi.aws.vpclattice.inputs.TargetGroupConfigArgs;
    import java.util.List;
    import java.util.ArrayList;
    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 example = new TargetGroup("example", TargetGroupArgs.builder()
                .name("example")
                .type("ALB")
                .config(TargetGroupConfigArgs.builder()
                    .vpcIdentifier(exampleAwsVpc.id())
                    .port(443)
                    .protocol("HTTPS")
                    .protocolVersion("HTTP1")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:vpclattice:TargetGroup
        properties:
          name: example
          type: ALB
          config:
            vpcIdentifier: ${exampleAwsVpc.id}
            port: 443
            protocol: HTTPS
            protocolVersion: HTTP1
    

    Lambda

    If the type is Lambda, config block is not supported.

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.vpclattice.TargetGroup("example", {
        name: "example",
        type: "LAMBDA",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.vpclattice.TargetGroup("example",
        name="example",
        type="LAMBDA")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/vpclattice"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vpclattice.NewTargetGroup(ctx, "example", &vpclattice.TargetGroupArgs{
    			Name: pulumi.String("example"),
    			Type: pulumi.String("LAMBDA"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.VpcLattice.TargetGroup("example", new()
        {
            Name = "example",
            Type = "LAMBDA",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.vpclattice.TargetGroup;
    import com.pulumi.aws.vpclattice.TargetGroupArgs;
    import java.util.List;
    import java.util.ArrayList;
    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 example = new TargetGroup("example", TargetGroupArgs.builder()
                .name("example")
                .type("LAMBDA")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:vpclattice:TargetGroup
        properties:
          name: example
          type: LAMBDA
    

    Create TargetGroup Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new TargetGroup(name: string, args: TargetGroupArgs, opts?: CustomResourceOptions);
    @overload
    def TargetGroup(resource_name: str,
                    args: TargetGroupArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def TargetGroup(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    type: Optional[str] = None,
                    config: Optional[TargetGroupConfigArgs] = None,
                    name: Optional[str] = None,
                    tags: Optional[Mapping[str, str]] = None)
    func NewTargetGroup(ctx *Context, name string, args TargetGroupArgs, opts ...ResourceOption) (*TargetGroup, error)
    public TargetGroup(string name, TargetGroupArgs args, CustomResourceOptions? opts = null)
    public TargetGroup(String name, TargetGroupArgs args)
    public TargetGroup(String name, TargetGroupArgs args, CustomResourceOptions options)
    
    type: aws:vpclattice:TargetGroup
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    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.
    args TargetGroupArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control 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.
    name String
    The unique name of the resource.
    args TargetGroupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var exampletargetGroupResourceResourceFromVpclatticetargetGroup = new Aws.VpcLattice.TargetGroup("exampletargetGroupResourceResourceFromVpclatticetargetGroup", new()
    {
        Type = "string",
        Config = new Aws.VpcLattice.Inputs.TargetGroupConfigArgs
        {
            HealthCheck = new Aws.VpcLattice.Inputs.TargetGroupConfigHealthCheckArgs
            {
                Enabled = false,
                HealthCheckIntervalSeconds = 0,
                HealthCheckTimeoutSeconds = 0,
                HealthyThresholdCount = 0,
                Matcher = new Aws.VpcLattice.Inputs.TargetGroupConfigHealthCheckMatcherArgs
                {
                    Value = "string",
                },
                Path = "string",
                Port = 0,
                Protocol = "string",
                ProtocolVersion = "string",
                UnhealthyThresholdCount = 0,
            },
            IpAddressType = "string",
            LambdaEventStructureVersion = "string",
            Port = 0,
            Protocol = "string",
            ProtocolVersion = "string",
            VpcIdentifier = "string",
        },
        Name = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := vpclattice.NewTargetGroup(ctx, "exampletargetGroupResourceResourceFromVpclatticetargetGroup", &vpclattice.TargetGroupArgs{
    	Type: pulumi.String("string"),
    	Config: &vpclattice.TargetGroupConfigArgs{
    		HealthCheck: &vpclattice.TargetGroupConfigHealthCheckArgs{
    			Enabled:                    pulumi.Bool(false),
    			HealthCheckIntervalSeconds: pulumi.Int(0),
    			HealthCheckTimeoutSeconds:  pulumi.Int(0),
    			HealthyThresholdCount:      pulumi.Int(0),
    			Matcher: &vpclattice.TargetGroupConfigHealthCheckMatcherArgs{
    				Value: pulumi.String("string"),
    			},
    			Path:                    pulumi.String("string"),
    			Port:                    pulumi.Int(0),
    			Protocol:                pulumi.String("string"),
    			ProtocolVersion:         pulumi.String("string"),
    			UnhealthyThresholdCount: pulumi.Int(0),
    		},
    		IpAddressType:               pulumi.String("string"),
    		LambdaEventStructureVersion: pulumi.String("string"),
    		Port:                        pulumi.Int(0),
    		Protocol:                    pulumi.String("string"),
    		ProtocolVersion:             pulumi.String("string"),
    		VpcIdentifier:               pulumi.String("string"),
    	},
    	Name: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var exampletargetGroupResourceResourceFromVpclatticetargetGroup = new TargetGroup("exampletargetGroupResourceResourceFromVpclatticetargetGroup", TargetGroupArgs.builder()
        .type("string")
        .config(TargetGroupConfigArgs.builder()
            .healthCheck(TargetGroupConfigHealthCheckArgs.builder()
                .enabled(false)
                .healthCheckIntervalSeconds(0)
                .healthCheckTimeoutSeconds(0)
                .healthyThresholdCount(0)
                .matcher(TargetGroupConfigHealthCheckMatcherArgs.builder()
                    .value("string")
                    .build())
                .path("string")
                .port(0)
                .protocol("string")
                .protocolVersion("string")
                .unhealthyThresholdCount(0)
                .build())
            .ipAddressType("string")
            .lambdaEventStructureVersion("string")
            .port(0)
            .protocol("string")
            .protocolVersion("string")
            .vpcIdentifier("string")
            .build())
        .name("string")
        .tags(Map.of("string", "string"))
        .build());
    
    exampletarget_group_resource_resource_from_vpclatticetarget_group = aws.vpclattice.TargetGroup("exampletargetGroupResourceResourceFromVpclatticetargetGroup",
        type="string",
        config={
            "health_check": {
                "enabled": False,
                "health_check_interval_seconds": 0,
                "health_check_timeout_seconds": 0,
                "healthy_threshold_count": 0,
                "matcher": {
                    "value": "string",
                },
                "path": "string",
                "port": 0,
                "protocol": "string",
                "protocol_version": "string",
                "unhealthy_threshold_count": 0,
            },
            "ip_address_type": "string",
            "lambda_event_structure_version": "string",
            "port": 0,
            "protocol": "string",
            "protocol_version": "string",
            "vpc_identifier": "string",
        },
        name="string",
        tags={
            "string": "string",
        })
    
    const exampletargetGroupResourceResourceFromVpclatticetargetGroup = new aws.vpclattice.TargetGroup("exampletargetGroupResourceResourceFromVpclatticetargetGroup", {
        type: "string",
        config: {
            healthCheck: {
                enabled: false,
                healthCheckIntervalSeconds: 0,
                healthCheckTimeoutSeconds: 0,
                healthyThresholdCount: 0,
                matcher: {
                    value: "string",
                },
                path: "string",
                port: 0,
                protocol: "string",
                protocolVersion: "string",
                unhealthyThresholdCount: 0,
            },
            ipAddressType: "string",
            lambdaEventStructureVersion: "string",
            port: 0,
            protocol: "string",
            protocolVersion: "string",
            vpcIdentifier: "string",
        },
        name: "string",
        tags: {
            string: "string",
        },
    });
    
    type: aws:vpclattice:TargetGroup
    properties:
        config:
            healthCheck:
                enabled: false
                healthCheckIntervalSeconds: 0
                healthCheckTimeoutSeconds: 0
                healthyThresholdCount: 0
                matcher:
                    value: string
                path: string
                port: 0
                protocol: string
                protocolVersion: string
                unhealthyThresholdCount: 0
            ipAddressType: string
            lambdaEventStructureVersion: string
            port: 0
            protocol: string
            protocolVersion: string
            vpcIdentifier: string
        name: string
        tags:
            string: string
        type: string
    

    TargetGroup Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The TargetGroup resource accepts the following input properties:

    Type string

    The type of target group. Valid Values are IP | LAMBDA | INSTANCE | ALB

    The following arguments are optional:

    Config TargetGroupConfig
    The target group configuration.
    Name string
    The name of the target group. The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
    Tags Dictionary<string, string>
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Type string

    The type of target group. Valid Values are IP | LAMBDA | INSTANCE | ALB

    The following arguments are optional:

    Config TargetGroupConfigArgs
    The target group configuration.
    Name string
    The name of the target group. The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
    Tags map[string]string
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    type String

    The type of target group. Valid Values are IP | LAMBDA | INSTANCE | ALB

    The following arguments are optional:

    config TargetGroupConfig
    The target group configuration.
    name String
    The name of the target group. The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
    tags Map<String,String>
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    type string

    The type of target group. Valid Values are IP | LAMBDA | INSTANCE | ALB

    The following arguments are optional:

    config TargetGroupConfig
    The target group configuration.
    name string
    The name of the target group. The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
    tags {[key: string]: string}
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    type str

    The type of target group. Valid Values are IP | LAMBDA | INSTANCE | ALB

    The following arguments are optional:

    config TargetGroupConfigArgs
    The target group configuration.
    name str
    The name of the target group. The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
    tags Mapping[str, str]
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    type String

    The type of target group. Valid Values are IP | LAMBDA | INSTANCE | ALB

    The following arguments are optional:

    config Property Map
    The target group configuration.
    name String
    The name of the target group. The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
    tags Map<String>
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

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

    Arn string
    ARN of the target group.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Status of the target group.
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    ARN of the target group.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Status of the target group.
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    ARN of the target group.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Status of the target group.
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    ARN of the target group.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    Status of the target group.
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    ARN of the target group.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    Status of the target group.
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    ARN of the target group.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Status of the target group.
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Look up 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
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            config: Optional[TargetGroupConfigArgs] = None,
            name: Optional[str] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            type: Optional[str] = None) -> TargetGroup
    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)
    public static TargetGroup get(String name, Output<String> id, TargetGroupState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    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
    ARN of the target group.
    Config TargetGroupConfig
    The target group configuration.
    Name string
    The name of the target group. The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
    Status string
    Status of the target group.
    Tags Dictionary<string, string>
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Type string

    The type of target group. Valid Values are IP | LAMBDA | INSTANCE | ALB

    The following arguments are optional:

    Arn string
    ARN of the target group.
    Config TargetGroupConfigArgs
    The target group configuration.
    Name string
    The name of the target group. The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
    Status string
    Status of the target group.
    Tags map[string]string
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Type string

    The type of target group. Valid Values are IP | LAMBDA | INSTANCE | ALB

    The following arguments are optional:

    arn String
    ARN of the target group.
    config TargetGroupConfig
    The target group configuration.
    name String
    The name of the target group. The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
    status String
    Status of the target group.
    tags Map<String,String>
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type String

    The type of target group. Valid Values are IP | LAMBDA | INSTANCE | ALB

    The following arguments are optional:

    arn string
    ARN of the target group.
    config TargetGroupConfig
    The target group configuration.
    name string
    The name of the target group. The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
    status string
    Status of the target group.
    tags {[key: string]: string}
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type string

    The type of target group. Valid Values are IP | LAMBDA | INSTANCE | ALB

    The following arguments are optional:

    arn str
    ARN of the target group.
    config TargetGroupConfigArgs
    The target group configuration.
    name str
    The name of the target group. The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
    status str
    Status of the target group.
    tags Mapping[str, str]
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type str

    The type of target group. Valid Values are IP | LAMBDA | INSTANCE | ALB

    The following arguments are optional:

    arn String
    ARN of the target group.
    config Property Map
    The target group configuration.
    name String
    The name of the target group. The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
    status String
    Status of the target group.
    tags Map<String>
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type String

    The type of target group. Valid Values are IP | LAMBDA | INSTANCE | ALB

    The following arguments are optional:

    Supporting Types

    TargetGroupConfig, TargetGroupConfigArgs

    HealthCheck TargetGroupConfigHealthCheck
    The health check configuration.
    IpAddressType string
    The type of IP address used for the target group. Valid values: IPV4 | IPV6.
    LambdaEventStructureVersion string
    The version of the event structure that the Lambda function receives. Supported only if type is LAMBDA. Valid Values are V1 | V2.
    Port int
    The port on which the targets are listening.
    Protocol string
    The protocol to use for routing traffic to the targets. Valid Values are HTTP | HTTPS.
    ProtocolVersion string
    The protocol version. Valid Values are HTTP1 | HTTP2 | GRPC. Default value is HTTP1.
    VpcIdentifier string
    The ID of the VPC.
    HealthCheck TargetGroupConfigHealthCheck
    The health check configuration.
    IpAddressType string
    The type of IP address used for the target group. Valid values: IPV4 | IPV6.
    LambdaEventStructureVersion string
    The version of the event structure that the Lambda function receives. Supported only if type is LAMBDA. Valid Values are V1 | V2.
    Port int
    The port on which the targets are listening.
    Protocol string
    The protocol to use for routing traffic to the targets. Valid Values are HTTP | HTTPS.
    ProtocolVersion string
    The protocol version. Valid Values are HTTP1 | HTTP2 | GRPC. Default value is HTTP1.
    VpcIdentifier string
    The ID of the VPC.
    healthCheck TargetGroupConfigHealthCheck
    The health check configuration.
    ipAddressType String
    The type of IP address used for the target group. Valid values: IPV4 | IPV6.
    lambdaEventStructureVersion String
    The version of the event structure that the Lambda function receives. Supported only if type is LAMBDA. Valid Values are V1 | V2.
    port Integer
    The port on which the targets are listening.
    protocol String
    The protocol to use for routing traffic to the targets. Valid Values are HTTP | HTTPS.
    protocolVersion String
    The protocol version. Valid Values are HTTP1 | HTTP2 | GRPC. Default value is HTTP1.
    vpcIdentifier String
    The ID of the VPC.
    healthCheck TargetGroupConfigHealthCheck
    The health check configuration.
    ipAddressType string
    The type of IP address used for the target group. Valid values: IPV4 | IPV6.
    lambdaEventStructureVersion string
    The version of the event structure that the Lambda function receives. Supported only if type is LAMBDA. Valid Values are V1 | V2.
    port number
    The port on which the targets are listening.
    protocol string
    The protocol to use for routing traffic to the targets. Valid Values are HTTP | HTTPS.
    protocolVersion string
    The protocol version. Valid Values are HTTP1 | HTTP2 | GRPC. Default value is HTTP1.
    vpcIdentifier string
    The ID of the VPC.
    health_check TargetGroupConfigHealthCheck
    The health check configuration.
    ip_address_type str
    The type of IP address used for the target group. Valid values: IPV4 | IPV6.
    lambda_event_structure_version str
    The version of the event structure that the Lambda function receives. Supported only if type is LAMBDA. Valid Values are V1 | V2.
    port int
    The port on which the targets are listening.
    protocol str
    The protocol to use for routing traffic to the targets. Valid Values are HTTP | HTTPS.
    protocol_version str
    The protocol version. Valid Values are HTTP1 | HTTP2 | GRPC. Default value is HTTP1.
    vpc_identifier str
    The ID of the VPC.
    healthCheck Property Map
    The health check configuration.
    ipAddressType String
    The type of IP address used for the target group. Valid values: IPV4 | IPV6.
    lambdaEventStructureVersion String
    The version of the event structure that the Lambda function receives. Supported only if type is LAMBDA. Valid Values are V1 | V2.
    port Number
    The port on which the targets are listening.
    protocol String
    The protocol to use for routing traffic to the targets. Valid Values are HTTP | HTTPS.
    protocolVersion String
    The protocol version. Valid Values are HTTP1 | HTTP2 | GRPC. Default value is HTTP1.
    vpcIdentifier String
    The ID of the VPC.

    TargetGroupConfigHealthCheck, TargetGroupConfigHealthCheckArgs

    Enabled bool
    Indicates whether health checking is enabled. Defaults to true.
    HealthCheckIntervalSeconds int
    The approximate amount of time, in seconds, between health checks of an individual target. The range is 5–300 seconds. The default is 30 seconds.
    HealthCheckTimeoutSeconds int
    The amount of time, in seconds, to wait before reporting a target as unhealthy. The range is 1–120 seconds. The default is 5 seconds.

    • healthy_threshold_count - (Optional) The number of consecutive successful health checks required before considering an unhealthy target healthy. The range is 2–10. The default is 5.
    HealthyThresholdCount int
    Matcher TargetGroupConfigHealthCheckMatcher
    The codes to use when checking for a successful response from a target. These are called Success codes in the console.
    Path string
    The destination for health checks on the targets. If the protocol version is HTTP/1.1 or HTTP/2, specify a valid URI (for example, /path?query). The default path is /. Health checks are not supported if the protocol version is gRPC, however, you can choose HTTP/1.1 or HTTP/2 and specify a valid URI.
    Port int
    The port used when performing health checks on targets. The default setting is the port that a target receives traffic on.
    Protocol string
    The protocol used when performing health checks on targets. The possible protocols are HTTP and HTTPS.
    ProtocolVersion string
    The protocol version used when performing health checks on targets. The possible protocol versions are HTTP1 and HTTP2. The default is HTTP1.
    UnhealthyThresholdCount int
    The number of consecutive failed health checks required before considering a target unhealthy. The range is 2–10. The default is 2.
    Enabled bool
    Indicates whether health checking is enabled. Defaults to true.
    HealthCheckIntervalSeconds int
    The approximate amount of time, in seconds, between health checks of an individual target. The range is 5–300 seconds. The default is 30 seconds.
    HealthCheckTimeoutSeconds int
    The amount of time, in seconds, to wait before reporting a target as unhealthy. The range is 1–120 seconds. The default is 5 seconds.

    • healthy_threshold_count - (Optional) The number of consecutive successful health checks required before considering an unhealthy target healthy. The range is 2–10. The default is 5.
    HealthyThresholdCount int
    Matcher TargetGroupConfigHealthCheckMatcher
    The codes to use when checking for a successful response from a target. These are called Success codes in the console.
    Path string
    The destination for health checks on the targets. If the protocol version is HTTP/1.1 or HTTP/2, specify a valid URI (for example, /path?query). The default path is /. Health checks are not supported if the protocol version is gRPC, however, you can choose HTTP/1.1 or HTTP/2 and specify a valid URI.
    Port int
    The port used when performing health checks on targets. The default setting is the port that a target receives traffic on.
    Protocol string
    The protocol used when performing health checks on targets. The possible protocols are HTTP and HTTPS.
    ProtocolVersion string
    The protocol version used when performing health checks on targets. The possible protocol versions are HTTP1 and HTTP2. The default is HTTP1.
    UnhealthyThresholdCount int
    The number of consecutive failed health checks required before considering a target unhealthy. The range is 2–10. The default is 2.
    enabled Boolean
    Indicates whether health checking is enabled. Defaults to true.
    healthCheckIntervalSeconds Integer
    The approximate amount of time, in seconds, between health checks of an individual target. The range is 5–300 seconds. The default is 30 seconds.
    healthCheckTimeoutSeconds Integer
    The amount of time, in seconds, to wait before reporting a target as unhealthy. The range is 1–120 seconds. The default is 5 seconds.

    • healthy_threshold_count - (Optional) The number of consecutive successful health checks required before considering an unhealthy target healthy. The range is 2–10. The default is 5.
    healthyThresholdCount Integer
    matcher TargetGroupConfigHealthCheckMatcher
    The codes to use when checking for a successful response from a target. These are called Success codes in the console.
    path String
    The destination for health checks on the targets. If the protocol version is HTTP/1.1 or HTTP/2, specify a valid URI (for example, /path?query). The default path is /. Health checks are not supported if the protocol version is gRPC, however, you can choose HTTP/1.1 or HTTP/2 and specify a valid URI.
    port Integer
    The port used when performing health checks on targets. The default setting is the port that a target receives traffic on.
    protocol String
    The protocol used when performing health checks on targets. The possible protocols are HTTP and HTTPS.
    protocolVersion String
    The protocol version used when performing health checks on targets. The possible protocol versions are HTTP1 and HTTP2. The default is HTTP1.
    unhealthyThresholdCount Integer
    The number of consecutive failed health checks required before considering a target unhealthy. The range is 2–10. The default is 2.
    enabled boolean
    Indicates whether health checking is enabled. Defaults to true.
    healthCheckIntervalSeconds number
    The approximate amount of time, in seconds, between health checks of an individual target. The range is 5–300 seconds. The default is 30 seconds.
    healthCheckTimeoutSeconds number
    The amount of time, in seconds, to wait before reporting a target as unhealthy. The range is 1–120 seconds. The default is 5 seconds.

    • healthy_threshold_count - (Optional) The number of consecutive successful health checks required before considering an unhealthy target healthy. The range is 2–10. The default is 5.
    healthyThresholdCount number
    matcher TargetGroupConfigHealthCheckMatcher
    The codes to use when checking for a successful response from a target. These are called Success codes in the console.
    path string
    The destination for health checks on the targets. If the protocol version is HTTP/1.1 or HTTP/2, specify a valid URI (for example, /path?query). The default path is /. Health checks are not supported if the protocol version is gRPC, however, you can choose HTTP/1.1 or HTTP/2 and specify a valid URI.
    port number
    The port used when performing health checks on targets. The default setting is the port that a target receives traffic on.
    protocol string
    The protocol used when performing health checks on targets. The possible protocols are HTTP and HTTPS.
    protocolVersion string
    The protocol version used when performing health checks on targets. The possible protocol versions are HTTP1 and HTTP2. The default is HTTP1.
    unhealthyThresholdCount number
    The number of consecutive failed health checks required before considering a target unhealthy. The range is 2–10. The default is 2.
    enabled bool
    Indicates whether health checking is enabled. Defaults to true.
    health_check_interval_seconds int
    The approximate amount of time, in seconds, between health checks of an individual target. The range is 5–300 seconds. The default is 30 seconds.
    health_check_timeout_seconds int
    The amount of time, in seconds, to wait before reporting a target as unhealthy. The range is 1–120 seconds. The default is 5 seconds.

    • healthy_threshold_count - (Optional) The number of consecutive successful health checks required before considering an unhealthy target healthy. The range is 2–10. The default is 5.
    healthy_threshold_count int
    matcher TargetGroupConfigHealthCheckMatcher
    The codes to use when checking for a successful response from a target. These are called Success codes in the console.
    path str
    The destination for health checks on the targets. If the protocol version is HTTP/1.1 or HTTP/2, specify a valid URI (for example, /path?query). The default path is /. Health checks are not supported if the protocol version is gRPC, however, you can choose HTTP/1.1 or HTTP/2 and specify a valid URI.
    port int
    The port used when performing health checks on targets. The default setting is the port that a target receives traffic on.
    protocol str
    The protocol used when performing health checks on targets. The possible protocols are HTTP and HTTPS.
    protocol_version str
    The protocol version used when performing health checks on targets. The possible protocol versions are HTTP1 and HTTP2. The default is HTTP1.
    unhealthy_threshold_count int
    The number of consecutive failed health checks required before considering a target unhealthy. The range is 2–10. The default is 2.
    enabled Boolean
    Indicates whether health checking is enabled. Defaults to true.
    healthCheckIntervalSeconds Number
    The approximate amount of time, in seconds, between health checks of an individual target. The range is 5–300 seconds. The default is 30 seconds.
    healthCheckTimeoutSeconds Number
    The amount of time, in seconds, to wait before reporting a target as unhealthy. The range is 1–120 seconds. The default is 5 seconds.

    • healthy_threshold_count - (Optional) The number of consecutive successful health checks required before considering an unhealthy target healthy. The range is 2–10. The default is 5.
    healthyThresholdCount Number
    matcher Property Map
    The codes to use when checking for a successful response from a target. These are called Success codes in the console.
    path String
    The destination for health checks on the targets. If the protocol version is HTTP/1.1 or HTTP/2, specify a valid URI (for example, /path?query). The default path is /. Health checks are not supported if the protocol version is gRPC, however, you can choose HTTP/1.1 or HTTP/2 and specify a valid URI.
    port Number
    The port used when performing health checks on targets. The default setting is the port that a target receives traffic on.
    protocol String
    The protocol used when performing health checks on targets. The possible protocols are HTTP and HTTPS.
    protocolVersion String
    The protocol version used when performing health checks on targets. The possible protocol versions are HTTP1 and HTTP2. The default is HTTP1.
    unhealthyThresholdCount Number
    The number of consecutive failed health checks required before considering a target unhealthy. The range is 2–10. The default is 2.

    TargetGroupConfigHealthCheckMatcher, TargetGroupConfigHealthCheckMatcherArgs

    Value string
    The HTTP codes to use when checking for a successful response from a target.
    Value string
    The HTTP codes to use when checking for a successful response from a target.
    value String
    The HTTP codes to use when checking for a successful response from a target.
    value string
    The HTTP codes to use when checking for a successful response from a target.
    value str
    The HTTP codes to use when checking for a successful response from a target.
    value String
    The HTTP codes to use when checking for a successful response from a target.

    Import

    Using pulumi import, import VPC Lattice Target Group using the id. For example:

    $ pulumi import aws:vpclattice/targetGroup:TargetGroup example tg-0c11d4dc16ed96bdb
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.64.0 published on Friday, Dec 6, 2024 by Pulumi