github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/lb/targetGroup.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package lb 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // Provides a Target Group resource for use with Load Balancer resources. 15 // 16 // > **Note:** `alb.TargetGroup` is known as `lb.TargetGroup`. The functionality is identical. 17 // 18 // ## Example Usage 19 // 20 // ### Instance Target Group 21 // 22 // <!--Start PulumiCodeChooser --> 23 // ```go 24 // package main 25 // 26 // import ( 27 // 28 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 29 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" 30 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 31 // 32 // ) 33 // 34 // func main() { 35 // pulumi.Run(func(ctx *pulumi.Context) error { 36 // main, err := ec2.NewVpc(ctx, "main", &ec2.VpcArgs{ 37 // CidrBlock: pulumi.String("10.0.0.0/16"), 38 // }) 39 // if err != nil { 40 // return err 41 // } 42 // _, err = lb.NewTargetGroup(ctx, "test", &lb.TargetGroupArgs{ 43 // Name: pulumi.String("tf-example-lb-tg"), 44 // Port: pulumi.Int(80), 45 // Protocol: pulumi.String("HTTP"), 46 // VpcId: main.ID(), 47 // }) 48 // if err != nil { 49 // return err 50 // } 51 // return nil 52 // }) 53 // } 54 // 55 // ``` 56 // <!--End PulumiCodeChooser --> 57 // 58 // ### IP Target Group 59 // 60 // <!--Start PulumiCodeChooser --> 61 // ```go 62 // package main 63 // 64 // import ( 65 // 66 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 67 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" 68 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 69 // 70 // ) 71 // 72 // func main() { 73 // pulumi.Run(func(ctx *pulumi.Context) error { 74 // main, err := ec2.NewVpc(ctx, "main", &ec2.VpcArgs{ 75 // CidrBlock: pulumi.String("10.0.0.0/16"), 76 // }) 77 // if err != nil { 78 // return err 79 // } 80 // _, err = lb.NewTargetGroup(ctx, "ip-example", &lb.TargetGroupArgs{ 81 // Name: pulumi.String("tf-example-lb-tg"), 82 // Port: pulumi.Int(80), 83 // Protocol: pulumi.String("HTTP"), 84 // TargetType: pulumi.String("ip"), 85 // VpcId: main.ID(), 86 // }) 87 // if err != nil { 88 // return err 89 // } 90 // return nil 91 // }) 92 // } 93 // 94 // ``` 95 // <!--End PulumiCodeChooser --> 96 // 97 // ### Lambda Target Group 98 // 99 // <!--Start PulumiCodeChooser --> 100 // ```go 101 // package main 102 // 103 // import ( 104 // 105 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" 106 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 107 // 108 // ) 109 // 110 // func main() { 111 // pulumi.Run(func(ctx *pulumi.Context) error { 112 // _, err := lb.NewTargetGroup(ctx, "lambda-example", &lb.TargetGroupArgs{ 113 // Name: pulumi.String("tf-example-lb-tg"), 114 // TargetType: pulumi.String("lambda"), 115 // }) 116 // if err != nil { 117 // return err 118 // } 119 // return nil 120 // }) 121 // } 122 // 123 // ``` 124 // <!--End PulumiCodeChooser --> 125 // 126 // ### ALB Target Group 127 // 128 // <!--Start PulumiCodeChooser --> 129 // ```go 130 // package main 131 // 132 // import ( 133 // 134 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" 135 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 136 // 137 // ) 138 // 139 // func main() { 140 // pulumi.Run(func(ctx *pulumi.Context) error { 141 // _, err := lb.NewTargetGroup(ctx, "alb-example", &lb.TargetGroupArgs{ 142 // Name: pulumi.String("tf-example-lb-alb-tg"), 143 // TargetType: pulumi.String("alb"), 144 // Port: pulumi.Int(80), 145 // Protocol: pulumi.String("TCP"), 146 // VpcId: pulumi.Any(main.Id), 147 // }) 148 // if err != nil { 149 // return err 150 // } 151 // return nil 152 // }) 153 // } 154 // 155 // ``` 156 // <!--End PulumiCodeChooser --> 157 // 158 // ### Target group with unhealthy connection termination disabled 159 // 160 // <!--Start PulumiCodeChooser --> 161 // ```go 162 // package main 163 // 164 // import ( 165 // 166 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" 167 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 168 // 169 // ) 170 // 171 // func main() { 172 // pulumi.Run(func(ctx *pulumi.Context) error { 173 // _, err := lb.NewTargetGroup(ctx, "tcp-example", &lb.TargetGroupArgs{ 174 // Name: pulumi.String("tf-example-lb-nlb-tg"), 175 // Port: pulumi.Int(25), 176 // Protocol: pulumi.String("TCP"), 177 // VpcId: pulumi.Any(main.Id), 178 // TargetHealthStates: lb.TargetGroupTargetHealthStateArray{ 179 // &lb.TargetGroupTargetHealthStateArgs{ 180 // EnableUnhealthyConnectionTermination: pulumi.Bool(false), 181 // }, 182 // }, 183 // }) 184 // if err != nil { 185 // return err 186 // } 187 // return nil 188 // }) 189 // } 190 // 191 // ``` 192 // <!--End PulumiCodeChooser --> 193 // 194 // ## Import 195 // 196 // Using `pulumi import`, import Target Groups using their ARN. For example: 197 // 198 // ```sh 199 // $ pulumi import aws:lb/targetGroup:TargetGroup app_front_end arn:aws:elasticloadbalancing:us-west-2:187416307283:targetgroup/app-front-end/20cfe21448b66314 200 // ``` 201 type TargetGroup struct { 202 pulumi.CustomResourceState 203 204 // ARN of the Target Group (matches `id`). 205 Arn pulumi.StringOutput `pulumi:"arn"` 206 // ARN suffix for use with CloudWatch Metrics. 207 ArnSuffix pulumi.StringOutput `pulumi:"arnSuffix"` 208 // Whether to terminate connections at the end of the deregistration timeout on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#deregistration-delay) for more information. Default is `false`. 209 ConnectionTermination pulumi.BoolOutput `pulumi:"connectionTermination"` 210 // 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. 211 DeregistrationDelay pulumi.IntPtrOutput `pulumi:"deregistrationDelay"` 212 // Health Check configuration block. Detailed below. 213 HealthCheck TargetGroupHealthCheckOutput `pulumi:"healthCheck"` 214 // 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`. 215 IpAddressType pulumi.StringOutput `pulumi:"ipAddressType"` 216 // 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`. 217 LambdaMultiValueHeadersEnabled pulumi.BoolPtrOutput `pulumi:"lambdaMultiValueHeadersEnabled"` 218 // ARNs of the Load Balancers associated with the Target Group. 219 LoadBalancerArns pulumi.StringArrayOutput `pulumi:"loadBalancerArns"` 220 // 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`. 221 LoadBalancingAlgorithmType pulumi.StringOutput `pulumi:"loadBalancingAlgorithmType"` 222 // Determines whether to enable target anomaly mitigation. Target anomaly mitigation is only supported by the `weightedRandom` load balancing algorithm type. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#automatic-target-weights) for more information. The value is `"on"` or `"off"`. The default is `"off"`. 223 LoadBalancingAnomalyMitigation pulumi.StringOutput `pulumi:"loadBalancingAnomalyMitigation"` 224 // Indicates whether cross zone load balancing is enabled. The value is `"true"`, `"false"` or `"useLoadBalancerConfiguration"`. The default is `"useLoadBalancerConfiguration"`. 225 LoadBalancingCrossZoneEnabled pulumi.StringOutput `pulumi:"loadBalancingCrossZoneEnabled"` 226 // 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. 227 Name pulumi.StringOutput `pulumi:"name"` 228 // Creates a unique name beginning with the specified prefix. Conflicts with `name`. Cannot be longer than 6 characters. 229 NamePrefix pulumi.StringOutput `pulumi:"namePrefix"` 230 // 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`. 231 Port pulumi.IntPtrOutput `pulumi:"port"` 232 // Whether client IP preservation is enabled. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#client-ip-preservation) for more information. 233 PreserveClientIp pulumi.StringOutput `pulumi:"preserveClientIp"` 234 // Protocol to use for routing traffic to the targets. 235 // Should be one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, or `UDP`. 236 // Required when `targetType` is `instance`, `ip`, or `alb`. 237 // Does not apply when `targetType` is `lambda`. 238 Protocol pulumi.StringPtrOutput `pulumi:"protocol"` 239 // 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 240 ProtocolVersion pulumi.StringOutput `pulumi:"protocolVersion"` 241 // Whether to enable support for proxy protocol v2 on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#proxy-protocol) for more information. Default is `false`. 242 ProxyProtocolV2 pulumi.BoolPtrOutput `pulumi:"proxyProtocolV2"` 243 // 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. 244 SlowStart pulumi.IntPtrOutput `pulumi:"slowStart"` 245 // Stickiness configuration block. Detailed below. 246 Stickiness TargetGroupStickinessOutput `pulumi:"stickiness"` 247 // 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. 248 Tags pulumi.StringMapOutput `pulumi:"tags"` 249 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 250 // 251 // Deprecated: Please use `tags` instead. 252 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 253 // Target failover block. Only applicable for Gateway Load Balancer target groups. See targetFailover for more information. 254 TargetFailovers TargetGroupTargetFailoverArrayOutput `pulumi:"targetFailovers"` 255 // Target health state block. Only applicable for Network Load Balancer target groups when `protocol` is `TCP` or `TLS`. See targetHealthState for more information. 256 TargetHealthStates TargetGroupTargetHealthStateArrayOutput `pulumi:"targetHealthStates"` 257 // Type of target that you must specify when registering targets with this target group. 258 // See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTargetGroup.html) for supported values. 259 // The default is `instance`. 260 // 261 // Note that you can't specify targets for a target group using both instance IDs and IP addresses. 262 // 263 // If the target type is `ip`, specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can't specify publicly routable IP addresses. 264 // 265 // Network Load Balancers do not support the `lambda` target type. 266 // 267 // Application Load Balancers do not support the `alb` target type. 268 TargetType pulumi.StringPtrOutput `pulumi:"targetType"` 269 // 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`. 270 VpcId pulumi.StringPtrOutput `pulumi:"vpcId"` 271 } 272 273 // NewTargetGroup registers a new resource with the given unique name, arguments, and options. 274 func NewTargetGroup(ctx *pulumi.Context, 275 name string, args *TargetGroupArgs, opts ...pulumi.ResourceOption) (*TargetGroup, error) { 276 if args == nil { 277 args = &TargetGroupArgs{} 278 } 279 280 aliases := pulumi.Aliases([]pulumi.Alias{ 281 { 282 Type: pulumi.String("aws:elasticloadbalancingv2/targetGroup:TargetGroup"), 283 }, 284 }) 285 opts = append(opts, aliases) 286 opts = internal.PkgResourceDefaultOpts(opts) 287 var resource TargetGroup 288 err := ctx.RegisterResource("aws:lb/targetGroup:TargetGroup", name, args, &resource, opts...) 289 if err != nil { 290 return nil, err 291 } 292 return &resource, nil 293 } 294 295 // GetTargetGroup gets an existing TargetGroup resource's state with the given name, ID, and optional 296 // state properties that are used to uniquely qualify the lookup (nil if not required). 297 func GetTargetGroup(ctx *pulumi.Context, 298 name string, id pulumi.IDInput, state *TargetGroupState, opts ...pulumi.ResourceOption) (*TargetGroup, error) { 299 var resource TargetGroup 300 err := ctx.ReadResource("aws:lb/targetGroup:TargetGroup", name, id, state, &resource, opts...) 301 if err != nil { 302 return nil, err 303 } 304 return &resource, nil 305 } 306 307 // Input properties used for looking up and filtering TargetGroup resources. 308 type targetGroupState struct { 309 // ARN of the Target Group (matches `id`). 310 Arn *string `pulumi:"arn"` 311 // ARN suffix for use with CloudWatch Metrics. 312 ArnSuffix *string `pulumi:"arnSuffix"` 313 // Whether to terminate connections at the end of the deregistration timeout on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#deregistration-delay) for more information. Default is `false`. 314 ConnectionTermination *bool `pulumi:"connectionTermination"` 315 // 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. 316 DeregistrationDelay *int `pulumi:"deregistrationDelay"` 317 // Health Check configuration block. Detailed below. 318 HealthCheck *TargetGroupHealthCheck `pulumi:"healthCheck"` 319 // 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`. 320 IpAddressType *string `pulumi:"ipAddressType"` 321 // 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`. 322 LambdaMultiValueHeadersEnabled *bool `pulumi:"lambdaMultiValueHeadersEnabled"` 323 // ARNs of the Load Balancers associated with the Target Group. 324 LoadBalancerArns []string `pulumi:"loadBalancerArns"` 325 // 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`. 326 LoadBalancingAlgorithmType *string `pulumi:"loadBalancingAlgorithmType"` 327 // Determines whether to enable target anomaly mitigation. Target anomaly mitigation is only supported by the `weightedRandom` load balancing algorithm type. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#automatic-target-weights) for more information. The value is `"on"` or `"off"`. The default is `"off"`. 328 LoadBalancingAnomalyMitigation *string `pulumi:"loadBalancingAnomalyMitigation"` 329 // Indicates whether cross zone load balancing is enabled. The value is `"true"`, `"false"` or `"useLoadBalancerConfiguration"`. The default is `"useLoadBalancerConfiguration"`. 330 LoadBalancingCrossZoneEnabled *string `pulumi:"loadBalancingCrossZoneEnabled"` 331 // 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. 332 Name *string `pulumi:"name"` 333 // Creates a unique name beginning with the specified prefix. Conflicts with `name`. Cannot be longer than 6 characters. 334 NamePrefix *string `pulumi:"namePrefix"` 335 // 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`. 336 Port *int `pulumi:"port"` 337 // Whether client IP preservation is enabled. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#client-ip-preservation) for more information. 338 PreserveClientIp *string `pulumi:"preserveClientIp"` 339 // Protocol to use for routing traffic to the targets. 340 // Should be one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, or `UDP`. 341 // Required when `targetType` is `instance`, `ip`, or `alb`. 342 // Does not apply when `targetType` is `lambda`. 343 Protocol *string `pulumi:"protocol"` 344 // 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 345 ProtocolVersion *string `pulumi:"protocolVersion"` 346 // Whether to enable support for proxy protocol v2 on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#proxy-protocol) for more information. Default is `false`. 347 ProxyProtocolV2 *bool `pulumi:"proxyProtocolV2"` 348 // 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. 349 SlowStart *int `pulumi:"slowStart"` 350 // Stickiness configuration block. Detailed below. 351 Stickiness *TargetGroupStickiness `pulumi:"stickiness"` 352 // 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. 353 Tags map[string]string `pulumi:"tags"` 354 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 355 // 356 // Deprecated: Please use `tags` instead. 357 TagsAll map[string]string `pulumi:"tagsAll"` 358 // Target failover block. Only applicable for Gateway Load Balancer target groups. See targetFailover for more information. 359 TargetFailovers []TargetGroupTargetFailover `pulumi:"targetFailovers"` 360 // Target health state block. Only applicable for Network Load Balancer target groups when `protocol` is `TCP` or `TLS`. See targetHealthState for more information. 361 TargetHealthStates []TargetGroupTargetHealthState `pulumi:"targetHealthStates"` 362 // Type of target that you must specify when registering targets with this target group. 363 // See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTargetGroup.html) for supported values. 364 // The default is `instance`. 365 // 366 // Note that you can't specify targets for a target group using both instance IDs and IP addresses. 367 // 368 // If the target type is `ip`, specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can't specify publicly routable IP addresses. 369 // 370 // Network Load Balancers do not support the `lambda` target type. 371 // 372 // Application Load Balancers do not support the `alb` target type. 373 TargetType *string `pulumi:"targetType"` 374 // 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`. 375 VpcId *string `pulumi:"vpcId"` 376 } 377 378 type TargetGroupState struct { 379 // ARN of the Target Group (matches `id`). 380 Arn pulumi.StringPtrInput 381 // ARN suffix for use with CloudWatch Metrics. 382 ArnSuffix pulumi.StringPtrInput 383 // Whether to terminate connections at the end of the deregistration timeout on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#deregistration-delay) for more information. Default is `false`. 384 ConnectionTermination pulumi.BoolPtrInput 385 // 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. 386 DeregistrationDelay pulumi.IntPtrInput 387 // Health Check configuration block. Detailed below. 388 HealthCheck TargetGroupHealthCheckPtrInput 389 // 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`. 390 IpAddressType pulumi.StringPtrInput 391 // 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`. 392 LambdaMultiValueHeadersEnabled pulumi.BoolPtrInput 393 // ARNs of the Load Balancers associated with the Target Group. 394 LoadBalancerArns pulumi.StringArrayInput 395 // 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`. 396 LoadBalancingAlgorithmType pulumi.StringPtrInput 397 // Determines whether to enable target anomaly mitigation. Target anomaly mitigation is only supported by the `weightedRandom` load balancing algorithm type. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#automatic-target-weights) for more information. The value is `"on"` or `"off"`. The default is `"off"`. 398 LoadBalancingAnomalyMitigation pulumi.StringPtrInput 399 // Indicates whether cross zone load balancing is enabled. The value is `"true"`, `"false"` or `"useLoadBalancerConfiguration"`. The default is `"useLoadBalancerConfiguration"`. 400 LoadBalancingCrossZoneEnabled pulumi.StringPtrInput 401 // 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. 402 Name pulumi.StringPtrInput 403 // Creates a unique name beginning with the specified prefix. Conflicts with `name`. Cannot be longer than 6 characters. 404 NamePrefix pulumi.StringPtrInput 405 // 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`. 406 Port pulumi.IntPtrInput 407 // Whether client IP preservation is enabled. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#client-ip-preservation) for more information. 408 PreserveClientIp pulumi.StringPtrInput 409 // Protocol to use for routing traffic to the targets. 410 // Should be one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, or `UDP`. 411 // Required when `targetType` is `instance`, `ip`, or `alb`. 412 // Does not apply when `targetType` is `lambda`. 413 Protocol pulumi.StringPtrInput 414 // 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 415 ProtocolVersion pulumi.StringPtrInput 416 // Whether to enable support for proxy protocol v2 on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#proxy-protocol) for more information. Default is `false`. 417 ProxyProtocolV2 pulumi.BoolPtrInput 418 // 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. 419 SlowStart pulumi.IntPtrInput 420 // Stickiness configuration block. Detailed below. 421 Stickiness TargetGroupStickinessPtrInput 422 // 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. 423 Tags pulumi.StringMapInput 424 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 425 // 426 // Deprecated: Please use `tags` instead. 427 TagsAll pulumi.StringMapInput 428 // Target failover block. Only applicable for Gateway Load Balancer target groups. See targetFailover for more information. 429 TargetFailovers TargetGroupTargetFailoverArrayInput 430 // Target health state block. Only applicable for Network Load Balancer target groups when `protocol` is `TCP` or `TLS`. See targetHealthState for more information. 431 TargetHealthStates TargetGroupTargetHealthStateArrayInput 432 // Type of target that you must specify when registering targets with this target group. 433 // See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTargetGroup.html) for supported values. 434 // The default is `instance`. 435 // 436 // Note that you can't specify targets for a target group using both instance IDs and IP addresses. 437 // 438 // If the target type is `ip`, specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can't specify publicly routable IP addresses. 439 // 440 // Network Load Balancers do not support the `lambda` target type. 441 // 442 // Application Load Balancers do not support the `alb` target type. 443 TargetType pulumi.StringPtrInput 444 // 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`. 445 VpcId pulumi.StringPtrInput 446 } 447 448 func (TargetGroupState) ElementType() reflect.Type { 449 return reflect.TypeOf((*targetGroupState)(nil)).Elem() 450 } 451 452 type targetGroupArgs struct { 453 // Whether to terminate connections at the end of the deregistration timeout on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#deregistration-delay) for more information. Default is `false`. 454 ConnectionTermination *bool `pulumi:"connectionTermination"` 455 // 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. 456 DeregistrationDelay *int `pulumi:"deregistrationDelay"` 457 // Health Check configuration block. Detailed below. 458 HealthCheck *TargetGroupHealthCheck `pulumi:"healthCheck"` 459 // 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`. 460 IpAddressType *string `pulumi:"ipAddressType"` 461 // 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`. 462 LambdaMultiValueHeadersEnabled *bool `pulumi:"lambdaMultiValueHeadersEnabled"` 463 // 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`. 464 LoadBalancingAlgorithmType *string `pulumi:"loadBalancingAlgorithmType"` 465 // Determines whether to enable target anomaly mitigation. Target anomaly mitigation is only supported by the `weightedRandom` load balancing algorithm type. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#automatic-target-weights) for more information. The value is `"on"` or `"off"`. The default is `"off"`. 466 LoadBalancingAnomalyMitigation *string `pulumi:"loadBalancingAnomalyMitigation"` 467 // Indicates whether cross zone load balancing is enabled. The value is `"true"`, `"false"` or `"useLoadBalancerConfiguration"`. The default is `"useLoadBalancerConfiguration"`. 468 LoadBalancingCrossZoneEnabled *string `pulumi:"loadBalancingCrossZoneEnabled"` 469 // 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. 470 Name *string `pulumi:"name"` 471 // Creates a unique name beginning with the specified prefix. Conflicts with `name`. Cannot be longer than 6 characters. 472 NamePrefix *string `pulumi:"namePrefix"` 473 // 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`. 474 Port *int `pulumi:"port"` 475 // Whether client IP preservation is enabled. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#client-ip-preservation) for more information. 476 PreserveClientIp *string `pulumi:"preserveClientIp"` 477 // Protocol to use for routing traffic to the targets. 478 // Should be one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, or `UDP`. 479 // Required when `targetType` is `instance`, `ip`, or `alb`. 480 // Does not apply when `targetType` is `lambda`. 481 Protocol *string `pulumi:"protocol"` 482 // 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 483 ProtocolVersion *string `pulumi:"protocolVersion"` 484 // Whether to enable support for proxy protocol v2 on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#proxy-protocol) for more information. Default is `false`. 485 ProxyProtocolV2 *bool `pulumi:"proxyProtocolV2"` 486 // 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. 487 SlowStart *int `pulumi:"slowStart"` 488 // Stickiness configuration block. Detailed below. 489 Stickiness *TargetGroupStickiness `pulumi:"stickiness"` 490 // 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. 491 Tags map[string]string `pulumi:"tags"` 492 // Target failover block. Only applicable for Gateway Load Balancer target groups. See targetFailover for more information. 493 TargetFailovers []TargetGroupTargetFailover `pulumi:"targetFailovers"` 494 // Target health state block. Only applicable for Network Load Balancer target groups when `protocol` is `TCP` or `TLS`. See targetHealthState for more information. 495 TargetHealthStates []TargetGroupTargetHealthState `pulumi:"targetHealthStates"` 496 // Type of target that you must specify when registering targets with this target group. 497 // See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTargetGroup.html) for supported values. 498 // The default is `instance`. 499 // 500 // Note that you can't specify targets for a target group using both instance IDs and IP addresses. 501 // 502 // If the target type is `ip`, specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can't specify publicly routable IP addresses. 503 // 504 // Network Load Balancers do not support the `lambda` target type. 505 // 506 // Application Load Balancers do not support the `alb` target type. 507 TargetType *string `pulumi:"targetType"` 508 // 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`. 509 VpcId *string `pulumi:"vpcId"` 510 } 511 512 // The set of arguments for constructing a TargetGroup resource. 513 type TargetGroupArgs struct { 514 // Whether to terminate connections at the end of the deregistration timeout on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#deregistration-delay) for more information. Default is `false`. 515 ConnectionTermination pulumi.BoolPtrInput 516 // 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. 517 DeregistrationDelay pulumi.IntPtrInput 518 // Health Check configuration block. Detailed below. 519 HealthCheck TargetGroupHealthCheckPtrInput 520 // 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`. 521 IpAddressType pulumi.StringPtrInput 522 // 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`. 523 LambdaMultiValueHeadersEnabled pulumi.BoolPtrInput 524 // 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`. 525 LoadBalancingAlgorithmType pulumi.StringPtrInput 526 // Determines whether to enable target anomaly mitigation. Target anomaly mitigation is only supported by the `weightedRandom` load balancing algorithm type. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#automatic-target-weights) for more information. The value is `"on"` or `"off"`. The default is `"off"`. 527 LoadBalancingAnomalyMitigation pulumi.StringPtrInput 528 // Indicates whether cross zone load balancing is enabled. The value is `"true"`, `"false"` or `"useLoadBalancerConfiguration"`. The default is `"useLoadBalancerConfiguration"`. 529 LoadBalancingCrossZoneEnabled pulumi.StringPtrInput 530 // 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. 531 Name pulumi.StringPtrInput 532 // Creates a unique name beginning with the specified prefix. Conflicts with `name`. Cannot be longer than 6 characters. 533 NamePrefix pulumi.StringPtrInput 534 // 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`. 535 Port pulumi.IntPtrInput 536 // Whether client IP preservation is enabled. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#client-ip-preservation) for more information. 537 PreserveClientIp pulumi.StringPtrInput 538 // Protocol to use for routing traffic to the targets. 539 // Should be one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, or `UDP`. 540 // Required when `targetType` is `instance`, `ip`, or `alb`. 541 // Does not apply when `targetType` is `lambda`. 542 Protocol pulumi.StringPtrInput 543 // 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 544 ProtocolVersion pulumi.StringPtrInput 545 // Whether to enable support for proxy protocol v2 on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#proxy-protocol) for more information. Default is `false`. 546 ProxyProtocolV2 pulumi.BoolPtrInput 547 // 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. 548 SlowStart pulumi.IntPtrInput 549 // Stickiness configuration block. Detailed below. 550 Stickiness TargetGroupStickinessPtrInput 551 // 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. 552 Tags pulumi.StringMapInput 553 // Target failover block. Only applicable for Gateway Load Balancer target groups. See targetFailover for more information. 554 TargetFailovers TargetGroupTargetFailoverArrayInput 555 // Target health state block. Only applicable for Network Load Balancer target groups when `protocol` is `TCP` or `TLS`. See targetHealthState for more information. 556 TargetHealthStates TargetGroupTargetHealthStateArrayInput 557 // Type of target that you must specify when registering targets with this target group. 558 // See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTargetGroup.html) for supported values. 559 // The default is `instance`. 560 // 561 // Note that you can't specify targets for a target group using both instance IDs and IP addresses. 562 // 563 // If the target type is `ip`, specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can't specify publicly routable IP addresses. 564 // 565 // Network Load Balancers do not support the `lambda` target type. 566 // 567 // Application Load Balancers do not support the `alb` target type. 568 TargetType pulumi.StringPtrInput 569 // 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`. 570 VpcId pulumi.StringPtrInput 571 } 572 573 func (TargetGroupArgs) ElementType() reflect.Type { 574 return reflect.TypeOf((*targetGroupArgs)(nil)).Elem() 575 } 576 577 type TargetGroupInput interface { 578 pulumi.Input 579 580 ToTargetGroupOutput() TargetGroupOutput 581 ToTargetGroupOutputWithContext(ctx context.Context) TargetGroupOutput 582 } 583 584 func (*TargetGroup) ElementType() reflect.Type { 585 return reflect.TypeOf((**TargetGroup)(nil)).Elem() 586 } 587 588 func (i *TargetGroup) ToTargetGroupOutput() TargetGroupOutput { 589 return i.ToTargetGroupOutputWithContext(context.Background()) 590 } 591 592 func (i *TargetGroup) ToTargetGroupOutputWithContext(ctx context.Context) TargetGroupOutput { 593 return pulumi.ToOutputWithContext(ctx, i).(TargetGroupOutput) 594 } 595 596 // TargetGroupArrayInput is an input type that accepts TargetGroupArray and TargetGroupArrayOutput values. 597 // You can construct a concrete instance of `TargetGroupArrayInput` via: 598 // 599 // TargetGroupArray{ TargetGroupArgs{...} } 600 type TargetGroupArrayInput interface { 601 pulumi.Input 602 603 ToTargetGroupArrayOutput() TargetGroupArrayOutput 604 ToTargetGroupArrayOutputWithContext(context.Context) TargetGroupArrayOutput 605 } 606 607 type TargetGroupArray []TargetGroupInput 608 609 func (TargetGroupArray) ElementType() reflect.Type { 610 return reflect.TypeOf((*[]*TargetGroup)(nil)).Elem() 611 } 612 613 func (i TargetGroupArray) ToTargetGroupArrayOutput() TargetGroupArrayOutput { 614 return i.ToTargetGroupArrayOutputWithContext(context.Background()) 615 } 616 617 func (i TargetGroupArray) ToTargetGroupArrayOutputWithContext(ctx context.Context) TargetGroupArrayOutput { 618 return pulumi.ToOutputWithContext(ctx, i).(TargetGroupArrayOutput) 619 } 620 621 // TargetGroupMapInput is an input type that accepts TargetGroupMap and TargetGroupMapOutput values. 622 // You can construct a concrete instance of `TargetGroupMapInput` via: 623 // 624 // TargetGroupMap{ "key": TargetGroupArgs{...} } 625 type TargetGroupMapInput interface { 626 pulumi.Input 627 628 ToTargetGroupMapOutput() TargetGroupMapOutput 629 ToTargetGroupMapOutputWithContext(context.Context) TargetGroupMapOutput 630 } 631 632 type TargetGroupMap map[string]TargetGroupInput 633 634 func (TargetGroupMap) ElementType() reflect.Type { 635 return reflect.TypeOf((*map[string]*TargetGroup)(nil)).Elem() 636 } 637 638 func (i TargetGroupMap) ToTargetGroupMapOutput() TargetGroupMapOutput { 639 return i.ToTargetGroupMapOutputWithContext(context.Background()) 640 } 641 642 func (i TargetGroupMap) ToTargetGroupMapOutputWithContext(ctx context.Context) TargetGroupMapOutput { 643 return pulumi.ToOutputWithContext(ctx, i).(TargetGroupMapOutput) 644 } 645 646 type TargetGroupOutput struct{ *pulumi.OutputState } 647 648 func (TargetGroupOutput) ElementType() reflect.Type { 649 return reflect.TypeOf((**TargetGroup)(nil)).Elem() 650 } 651 652 func (o TargetGroupOutput) ToTargetGroupOutput() TargetGroupOutput { 653 return o 654 } 655 656 func (o TargetGroupOutput) ToTargetGroupOutputWithContext(ctx context.Context) TargetGroupOutput { 657 return o 658 } 659 660 // ARN of the Target Group (matches `id`). 661 func (o TargetGroupOutput) Arn() pulumi.StringOutput { 662 return o.ApplyT(func(v *TargetGroup) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 663 } 664 665 // ARN suffix for use with CloudWatch Metrics. 666 func (o TargetGroupOutput) ArnSuffix() pulumi.StringOutput { 667 return o.ApplyT(func(v *TargetGroup) pulumi.StringOutput { return v.ArnSuffix }).(pulumi.StringOutput) 668 } 669 670 // Whether to terminate connections at the end of the deregistration timeout on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#deregistration-delay) for more information. Default is `false`. 671 func (o TargetGroupOutput) ConnectionTermination() pulumi.BoolOutput { 672 return o.ApplyT(func(v *TargetGroup) pulumi.BoolOutput { return v.ConnectionTermination }).(pulumi.BoolOutput) 673 } 674 675 // 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. 676 func (o TargetGroupOutput) DeregistrationDelay() pulumi.IntPtrOutput { 677 return o.ApplyT(func(v *TargetGroup) pulumi.IntPtrOutput { return v.DeregistrationDelay }).(pulumi.IntPtrOutput) 678 } 679 680 // Health Check configuration block. Detailed below. 681 func (o TargetGroupOutput) HealthCheck() TargetGroupHealthCheckOutput { 682 return o.ApplyT(func(v *TargetGroup) TargetGroupHealthCheckOutput { return v.HealthCheck }).(TargetGroupHealthCheckOutput) 683 } 684 685 // 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`. 686 func (o TargetGroupOutput) IpAddressType() pulumi.StringOutput { 687 return o.ApplyT(func(v *TargetGroup) pulumi.StringOutput { return v.IpAddressType }).(pulumi.StringOutput) 688 } 689 690 // 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`. 691 func (o TargetGroupOutput) LambdaMultiValueHeadersEnabled() pulumi.BoolPtrOutput { 692 return o.ApplyT(func(v *TargetGroup) pulumi.BoolPtrOutput { return v.LambdaMultiValueHeadersEnabled }).(pulumi.BoolPtrOutput) 693 } 694 695 // ARNs of the Load Balancers associated with the Target Group. 696 func (o TargetGroupOutput) LoadBalancerArns() pulumi.StringArrayOutput { 697 return o.ApplyT(func(v *TargetGroup) pulumi.StringArrayOutput { return v.LoadBalancerArns }).(pulumi.StringArrayOutput) 698 } 699 700 // 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`. 701 func (o TargetGroupOutput) LoadBalancingAlgorithmType() pulumi.StringOutput { 702 return o.ApplyT(func(v *TargetGroup) pulumi.StringOutput { return v.LoadBalancingAlgorithmType }).(pulumi.StringOutput) 703 } 704 705 // Determines whether to enable target anomaly mitigation. Target anomaly mitigation is only supported by the `weightedRandom` load balancing algorithm type. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#automatic-target-weights) for more information. The value is `"on"` or `"off"`. The default is `"off"`. 706 func (o TargetGroupOutput) LoadBalancingAnomalyMitigation() pulumi.StringOutput { 707 return o.ApplyT(func(v *TargetGroup) pulumi.StringOutput { return v.LoadBalancingAnomalyMitigation }).(pulumi.StringOutput) 708 } 709 710 // Indicates whether cross zone load balancing is enabled. The value is `"true"`, `"false"` or `"useLoadBalancerConfiguration"`. The default is `"useLoadBalancerConfiguration"`. 711 func (o TargetGroupOutput) LoadBalancingCrossZoneEnabled() pulumi.StringOutput { 712 return o.ApplyT(func(v *TargetGroup) pulumi.StringOutput { return v.LoadBalancingCrossZoneEnabled }).(pulumi.StringOutput) 713 } 714 715 // 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. 716 func (o TargetGroupOutput) Name() pulumi.StringOutput { 717 return o.ApplyT(func(v *TargetGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 718 } 719 720 // Creates a unique name beginning with the specified prefix. Conflicts with `name`. Cannot be longer than 6 characters. 721 func (o TargetGroupOutput) NamePrefix() pulumi.StringOutput { 722 return o.ApplyT(func(v *TargetGroup) pulumi.StringOutput { return v.NamePrefix }).(pulumi.StringOutput) 723 } 724 725 // 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`. 726 func (o TargetGroupOutput) Port() pulumi.IntPtrOutput { 727 return o.ApplyT(func(v *TargetGroup) pulumi.IntPtrOutput { return v.Port }).(pulumi.IntPtrOutput) 728 } 729 730 // Whether client IP preservation is enabled. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#client-ip-preservation) for more information. 731 func (o TargetGroupOutput) PreserveClientIp() pulumi.StringOutput { 732 return o.ApplyT(func(v *TargetGroup) pulumi.StringOutput { return v.PreserveClientIp }).(pulumi.StringOutput) 733 } 734 735 // Protocol to use for routing traffic to the targets. 736 // Should be one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, or `UDP`. 737 // Required when `targetType` is `instance`, `ip`, or `alb`. 738 // Does not apply when `targetType` is `lambda`. 739 func (o TargetGroupOutput) Protocol() pulumi.StringPtrOutput { 740 return o.ApplyT(func(v *TargetGroup) pulumi.StringPtrOutput { return v.Protocol }).(pulumi.StringPtrOutput) 741 } 742 743 // 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 744 func (o TargetGroupOutput) ProtocolVersion() pulumi.StringOutput { 745 return o.ApplyT(func(v *TargetGroup) pulumi.StringOutput { return v.ProtocolVersion }).(pulumi.StringOutput) 746 } 747 748 // Whether to enable support for proxy protocol v2 on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#proxy-protocol) for more information. Default is `false`. 749 func (o TargetGroupOutput) ProxyProtocolV2() pulumi.BoolPtrOutput { 750 return o.ApplyT(func(v *TargetGroup) pulumi.BoolPtrOutput { return v.ProxyProtocolV2 }).(pulumi.BoolPtrOutput) 751 } 752 753 // 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. 754 func (o TargetGroupOutput) SlowStart() pulumi.IntPtrOutput { 755 return o.ApplyT(func(v *TargetGroup) pulumi.IntPtrOutput { return v.SlowStart }).(pulumi.IntPtrOutput) 756 } 757 758 // Stickiness configuration block. Detailed below. 759 func (o TargetGroupOutput) Stickiness() TargetGroupStickinessOutput { 760 return o.ApplyT(func(v *TargetGroup) TargetGroupStickinessOutput { return v.Stickiness }).(TargetGroupStickinessOutput) 761 } 762 763 // 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. 764 func (o TargetGroupOutput) Tags() pulumi.StringMapOutput { 765 return o.ApplyT(func(v *TargetGroup) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 766 } 767 768 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 769 // 770 // Deprecated: Please use `tags` instead. 771 func (o TargetGroupOutput) TagsAll() pulumi.StringMapOutput { 772 return o.ApplyT(func(v *TargetGroup) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 773 } 774 775 // Target failover block. Only applicable for Gateway Load Balancer target groups. See targetFailover for more information. 776 func (o TargetGroupOutput) TargetFailovers() TargetGroupTargetFailoverArrayOutput { 777 return o.ApplyT(func(v *TargetGroup) TargetGroupTargetFailoverArrayOutput { return v.TargetFailovers }).(TargetGroupTargetFailoverArrayOutput) 778 } 779 780 // Target health state block. Only applicable for Network Load Balancer target groups when `protocol` is `TCP` or `TLS`. See targetHealthState for more information. 781 func (o TargetGroupOutput) TargetHealthStates() TargetGroupTargetHealthStateArrayOutput { 782 return o.ApplyT(func(v *TargetGroup) TargetGroupTargetHealthStateArrayOutput { return v.TargetHealthStates }).(TargetGroupTargetHealthStateArrayOutput) 783 } 784 785 // Type of target that you must specify when registering targets with this target group. 786 // See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTargetGroup.html) for supported values. 787 // The default is `instance`. 788 // 789 // Note that you can't specify targets for a target group using both instance IDs and IP addresses. 790 // 791 // If the target type is `ip`, specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can't specify publicly routable IP addresses. 792 // 793 // Network Load Balancers do not support the `lambda` target type. 794 // 795 // Application Load Balancers do not support the `alb` target type. 796 func (o TargetGroupOutput) TargetType() pulumi.StringPtrOutput { 797 return o.ApplyT(func(v *TargetGroup) pulumi.StringPtrOutput { return v.TargetType }).(pulumi.StringPtrOutput) 798 } 799 800 // 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`. 801 func (o TargetGroupOutput) VpcId() pulumi.StringPtrOutput { 802 return o.ApplyT(func(v *TargetGroup) pulumi.StringPtrOutput { return v.VpcId }).(pulumi.StringPtrOutput) 803 } 804 805 type TargetGroupArrayOutput struct{ *pulumi.OutputState } 806 807 func (TargetGroupArrayOutput) ElementType() reflect.Type { 808 return reflect.TypeOf((*[]*TargetGroup)(nil)).Elem() 809 } 810 811 func (o TargetGroupArrayOutput) ToTargetGroupArrayOutput() TargetGroupArrayOutput { 812 return o 813 } 814 815 func (o TargetGroupArrayOutput) ToTargetGroupArrayOutputWithContext(ctx context.Context) TargetGroupArrayOutput { 816 return o 817 } 818 819 func (o TargetGroupArrayOutput) Index(i pulumi.IntInput) TargetGroupOutput { 820 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TargetGroup { 821 return vs[0].([]*TargetGroup)[vs[1].(int)] 822 }).(TargetGroupOutput) 823 } 824 825 type TargetGroupMapOutput struct{ *pulumi.OutputState } 826 827 func (TargetGroupMapOutput) ElementType() reflect.Type { 828 return reflect.TypeOf((*map[string]*TargetGroup)(nil)).Elem() 829 } 830 831 func (o TargetGroupMapOutput) ToTargetGroupMapOutput() TargetGroupMapOutput { 832 return o 833 } 834 835 func (o TargetGroupMapOutput) ToTargetGroupMapOutputWithContext(ctx context.Context) TargetGroupMapOutput { 836 return o 837 } 838 839 func (o TargetGroupMapOutput) MapIndex(k pulumi.StringInput) TargetGroupOutput { 840 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TargetGroup { 841 return vs[0].(map[string]*TargetGroup)[vs[1].(string)] 842 }).(TargetGroupOutput) 843 } 844 845 func init() { 846 pulumi.RegisterInputType(reflect.TypeOf((*TargetGroupInput)(nil)).Elem(), &TargetGroup{}) 847 pulumi.RegisterInputType(reflect.TypeOf((*TargetGroupArrayInput)(nil)).Elem(), TargetGroupArray{}) 848 pulumi.RegisterInputType(reflect.TypeOf((*TargetGroupMapInput)(nil)).Elem(), TargetGroupMap{}) 849 pulumi.RegisterOutputType(TargetGroupOutput{}) 850 pulumi.RegisterOutputType(TargetGroupArrayOutput{}) 851 pulumi.RegisterOutputType(TargetGroupMapOutput{}) 852 }