/
targetGroup.go
489 lines (443 loc) · 27.6 KB
/
targetGroup.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package lb
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides a Target Group resource for use with Load Balancer resources.
//
// > **Note:** `alb.TargetGroup` is known as `lb.TargetGroup`. The functionality is identical.
//
// ## Example Usage
// ### Instance Target Group
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ec2"
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/lb"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// main, err := ec2.NewVpc(ctx, "main", &ec2.VpcArgs{
// CidrBlock: pulumi.String("10.0.0.0/16"),
// })
// if err != nil {
// return err
// }
// _, err = lb.NewTargetGroup(ctx, "test", &lb.TargetGroupArgs{
// Port: pulumi.Int(80),
// Protocol: pulumi.String("HTTP"),
// VpcId: main.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
// ### IP Target Group
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ec2"
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/lb"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// main, err := ec2.NewVpc(ctx, "main", &ec2.VpcArgs{
// CidrBlock: pulumi.String("10.0.0.0/16"),
// })
// if err != nil {
// return err
// }
// _, err = lb.NewTargetGroup(ctx, "ip-example", &lb.TargetGroupArgs{
// Port: pulumi.Int(80),
// Protocol: pulumi.String("HTTP"),
// TargetType: pulumi.String("ip"),
// VpcId: main.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
// ### Lambda Target Group
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/lb"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := lb.NewTargetGroup(ctx, "lambda-example", &lb.TargetGroupArgs{
// TargetType: pulumi.String("lambda"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ## Import
//
// Target Groups can be imported using their ARN, e.g.,
//
// ```sh
// $ pulumi import aws:lb/targetGroup:TargetGroup app_front_end arn:aws:elasticloadbalancing:us-west-2:187416307283:targetgroup/app-front-end/20cfe21448b66314
// ```
type TargetGroup struct {
pulumi.CustomResourceState
// ARN of the Target Group (matches `id`).
Arn pulumi.StringOutput `pulumi:"arn"`
// ARN suffix for use with CloudWatch Metrics.
ArnSuffix pulumi.StringOutput `pulumi:"arnSuffix"`
// 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`.
ConnectionTermination pulumi.BoolPtrOutput `pulumi:"connectionTermination"`
// 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.
DeregistrationDelay pulumi.IntPtrOutput `pulumi:"deregistrationDelay"`
// Health Check configuration block. Detailed below.
HealthCheck TargetGroupHealthCheckOutput `pulumi:"healthCheck"`
// 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`.
LambdaMultiValueHeadersEnabled pulumi.BoolPtrOutput `pulumi:"lambdaMultiValueHeadersEnabled"`
// Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is `roundRobin` or `leastOutstandingRequests`. The default is `roundRobin`.
LoadBalancingAlgorithmType pulumi.StringOutput `pulumi:"loadBalancingAlgorithmType"`
// Name of the target group. If omitted, this provider will assign a random, unique name.
Name pulumi.StringOutput `pulumi:"name"`
// Creates a unique name beginning with the specified prefix. Conflicts with `name`. Cannot be longer than 6 characters.
NamePrefix pulumi.StringPtrOutput `pulumi:"namePrefix"`
// Port to use to connect with the target. Valid values are either ports 1-65535, or `traffic-port`. Defaults to `traffic-port`.
Port pulumi.IntPtrOutput `pulumi:"port"`
// 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.
PreserveClientIp pulumi.StringOutput `pulumi:"preserveClientIp"`
// Protocol to use to connect with the target. Defaults to `HTTP`. Not applicable when `targetType` is `lambda`.
Protocol pulumi.StringPtrOutput `pulumi:"protocol"`
// 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
ProtocolVersion pulumi.StringOutput `pulumi:"protocolVersion"`
// 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`.
ProxyProtocolV2 pulumi.BoolPtrOutput `pulumi:"proxyProtocolV2"`
// 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.
SlowStart pulumi.IntPtrOutput `pulumi:"slowStart"`
// Stickiness configuration block. Detailed below.
Stickiness TargetGroupStickinessOutput `pulumi:"stickiness"`
// 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.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// A map of tags assigned to the resource, including those inherited from the provider .
TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
// Type of target that you must specify when registering targets with this target group. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTargetGroup.html) for supported values. The default is `instance`.
TargetType pulumi.StringPtrOutput `pulumi:"targetType"`
// Identifier of the VPC in which to create the target group. Required when `targetType` is `instance` or `ip`. Does not apply when `targetType` is `lambda`.
VpcId pulumi.StringPtrOutput `pulumi:"vpcId"`
}
// NewTargetGroup registers a new resource with the given unique name, arguments, and options.
func NewTargetGroup(ctx *pulumi.Context,
name string, args *TargetGroupArgs, opts ...pulumi.ResourceOption) (*TargetGroup, error) {
if args == nil {
args = &TargetGroupArgs{}
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("aws:elasticloadbalancingv2/targetGroup:TargetGroup"),
},
})
opts = append(opts, aliases)
var resource TargetGroup
err := ctx.RegisterResource("aws:lb/targetGroup:TargetGroup", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetTargetGroup gets an existing TargetGroup resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetTargetGroup(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *TargetGroupState, opts ...pulumi.ResourceOption) (*TargetGroup, error) {
var resource TargetGroup
err := ctx.ReadResource("aws:lb/targetGroup:TargetGroup", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering TargetGroup resources.
type targetGroupState struct {
// ARN of the Target Group (matches `id`).
Arn *string `pulumi:"arn"`
// ARN suffix for use with CloudWatch Metrics.
ArnSuffix *string `pulumi:"arnSuffix"`
// 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`.
ConnectionTermination *bool `pulumi:"connectionTermination"`
// 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.
DeregistrationDelay *int `pulumi:"deregistrationDelay"`
// Health Check configuration block. Detailed below.
HealthCheck *TargetGroupHealthCheck `pulumi:"healthCheck"`
// 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`.
LambdaMultiValueHeadersEnabled *bool `pulumi:"lambdaMultiValueHeadersEnabled"`
// Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is `roundRobin` or `leastOutstandingRequests`. The default is `roundRobin`.
LoadBalancingAlgorithmType *string `pulumi:"loadBalancingAlgorithmType"`
// Name of the target group. If omitted, this provider will assign a random, unique name.
Name *string `pulumi:"name"`
// Creates a unique name beginning with the specified prefix. Conflicts with `name`. Cannot be longer than 6 characters.
NamePrefix *string `pulumi:"namePrefix"`
// Port to use to connect with the target. Valid values are either ports 1-65535, or `traffic-port`. Defaults to `traffic-port`.
Port *int `pulumi:"port"`
// 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.
PreserveClientIp *string `pulumi:"preserveClientIp"`
// Protocol to use to connect with the target. Defaults to `HTTP`. Not applicable when `targetType` is `lambda`.
Protocol *string `pulumi:"protocol"`
// 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
ProtocolVersion *string `pulumi:"protocolVersion"`
// 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`.
ProxyProtocolV2 *bool `pulumi:"proxyProtocolV2"`
// 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.
SlowStart *int `pulumi:"slowStart"`
// Stickiness configuration block. Detailed below.
Stickiness *TargetGroupStickiness `pulumi:"stickiness"`
// 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.
Tags map[string]string `pulumi:"tags"`
// A map of tags assigned to the resource, including those inherited from the provider .
TagsAll map[string]string `pulumi:"tagsAll"`
// Type of target that you must specify when registering targets with this target group. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTargetGroup.html) for supported values. The default is `instance`.
TargetType *string `pulumi:"targetType"`
// Identifier of the VPC in which to create the target group. Required when `targetType` is `instance` or `ip`. Does not apply when `targetType` is `lambda`.
VpcId *string `pulumi:"vpcId"`
}
type TargetGroupState struct {
// ARN of the Target Group (matches `id`).
Arn pulumi.StringPtrInput
// ARN suffix for use with CloudWatch Metrics.
ArnSuffix pulumi.StringPtrInput
// 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`.
ConnectionTermination pulumi.BoolPtrInput
// 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.
DeregistrationDelay pulumi.IntPtrInput
// Health Check configuration block. Detailed below.
HealthCheck TargetGroupHealthCheckPtrInput
// 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`.
LambdaMultiValueHeadersEnabled pulumi.BoolPtrInput
// Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is `roundRobin` or `leastOutstandingRequests`. The default is `roundRobin`.
LoadBalancingAlgorithmType pulumi.StringPtrInput
// Name of the target group. If omitted, this provider will assign a random, unique name.
Name pulumi.StringPtrInput
// Creates a unique name beginning with the specified prefix. Conflicts with `name`. Cannot be longer than 6 characters.
NamePrefix pulumi.StringPtrInput
// Port to use to connect with the target. Valid values are either ports 1-65535, or `traffic-port`. Defaults to `traffic-port`.
Port pulumi.IntPtrInput
// 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.
PreserveClientIp pulumi.StringPtrInput
// Protocol to use to connect with the target. Defaults to `HTTP`. Not applicable when `targetType` is `lambda`.
Protocol pulumi.StringPtrInput
// 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
ProtocolVersion pulumi.StringPtrInput
// 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`.
ProxyProtocolV2 pulumi.BoolPtrInput
// 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.
SlowStart pulumi.IntPtrInput
// Stickiness configuration block. Detailed below.
Stickiness TargetGroupStickinessPtrInput
// 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.
Tags pulumi.StringMapInput
// A map of tags assigned to the resource, including those inherited from the provider .
TagsAll pulumi.StringMapInput
// Type of target that you must specify when registering targets with this target group. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTargetGroup.html) for supported values. The default is `instance`.
TargetType pulumi.StringPtrInput
// Identifier of the VPC in which to create the target group. Required when `targetType` is `instance` or `ip`. Does not apply when `targetType` is `lambda`.
VpcId pulumi.StringPtrInput
}
func (TargetGroupState) ElementType() reflect.Type {
return reflect.TypeOf((*targetGroupState)(nil)).Elem()
}
type targetGroupArgs struct {
// 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`.
ConnectionTermination *bool `pulumi:"connectionTermination"`
// 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.
DeregistrationDelay *int `pulumi:"deregistrationDelay"`
// Health Check configuration block. Detailed below.
HealthCheck *TargetGroupHealthCheck `pulumi:"healthCheck"`
// 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`.
LambdaMultiValueHeadersEnabled *bool `pulumi:"lambdaMultiValueHeadersEnabled"`
// Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is `roundRobin` or `leastOutstandingRequests`. The default is `roundRobin`.
LoadBalancingAlgorithmType *string `pulumi:"loadBalancingAlgorithmType"`
// Name of the target group. If omitted, this provider will assign a random, unique name.
Name *string `pulumi:"name"`
// Creates a unique name beginning with the specified prefix. Conflicts with `name`. Cannot be longer than 6 characters.
NamePrefix *string `pulumi:"namePrefix"`
// Port to use to connect with the target. Valid values are either ports 1-65535, or `traffic-port`. Defaults to `traffic-port`.
Port *int `pulumi:"port"`
// 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.
PreserveClientIp *string `pulumi:"preserveClientIp"`
// Protocol to use to connect with the target. Defaults to `HTTP`. Not applicable when `targetType` is `lambda`.
Protocol *string `pulumi:"protocol"`
// 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
ProtocolVersion *string `pulumi:"protocolVersion"`
// 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`.
ProxyProtocolV2 *bool `pulumi:"proxyProtocolV2"`
// 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.
SlowStart *int `pulumi:"slowStart"`
// Stickiness configuration block. Detailed below.
Stickiness *TargetGroupStickiness `pulumi:"stickiness"`
// 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.
Tags map[string]string `pulumi:"tags"`
// Type of target that you must specify when registering targets with this target group. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTargetGroup.html) for supported values. The default is `instance`.
TargetType *string `pulumi:"targetType"`
// Identifier of the VPC in which to create the target group. Required when `targetType` is `instance` or `ip`. Does not apply when `targetType` is `lambda`.
VpcId *string `pulumi:"vpcId"`
}
// The set of arguments for constructing a TargetGroup resource.
type TargetGroupArgs struct {
// 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`.
ConnectionTermination pulumi.BoolPtrInput
// 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.
DeregistrationDelay pulumi.IntPtrInput
// Health Check configuration block. Detailed below.
HealthCheck TargetGroupHealthCheckPtrInput
// 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`.
LambdaMultiValueHeadersEnabled pulumi.BoolPtrInput
// Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is `roundRobin` or `leastOutstandingRequests`. The default is `roundRobin`.
LoadBalancingAlgorithmType pulumi.StringPtrInput
// Name of the target group. If omitted, this provider will assign a random, unique name.
Name pulumi.StringPtrInput
// Creates a unique name beginning with the specified prefix. Conflicts with `name`. Cannot be longer than 6 characters.
NamePrefix pulumi.StringPtrInput
// Port to use to connect with the target. Valid values are either ports 1-65535, or `traffic-port`. Defaults to `traffic-port`.
Port pulumi.IntPtrInput
// 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.
PreserveClientIp pulumi.StringPtrInput
// Protocol to use to connect with the target. Defaults to `HTTP`. Not applicable when `targetType` is `lambda`.
Protocol pulumi.StringPtrInput
// 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
ProtocolVersion pulumi.StringPtrInput
// 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`.
ProxyProtocolV2 pulumi.BoolPtrInput
// 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.
SlowStart pulumi.IntPtrInput
// Stickiness configuration block. Detailed below.
Stickiness TargetGroupStickinessPtrInput
// 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.
Tags pulumi.StringMapInput
// Type of target that you must specify when registering targets with this target group. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTargetGroup.html) for supported values. The default is `instance`.
TargetType pulumi.StringPtrInput
// Identifier of the VPC in which to create the target group. Required when `targetType` is `instance` or `ip`. Does not apply when `targetType` is `lambda`.
VpcId pulumi.StringPtrInput
}
func (TargetGroupArgs) ElementType() reflect.Type {
return reflect.TypeOf((*targetGroupArgs)(nil)).Elem()
}
type TargetGroupInput interface {
pulumi.Input
ToTargetGroupOutput() TargetGroupOutput
ToTargetGroupOutputWithContext(ctx context.Context) TargetGroupOutput
}
func (*TargetGroup) ElementType() reflect.Type {
return reflect.TypeOf((**TargetGroup)(nil)).Elem()
}
func (i *TargetGroup) ToTargetGroupOutput() TargetGroupOutput {
return i.ToTargetGroupOutputWithContext(context.Background())
}
func (i *TargetGroup) ToTargetGroupOutputWithContext(ctx context.Context) TargetGroupOutput {
return pulumi.ToOutputWithContext(ctx, i).(TargetGroupOutput)
}
// TargetGroupArrayInput is an input type that accepts TargetGroupArray and TargetGroupArrayOutput values.
// You can construct a concrete instance of `TargetGroupArrayInput` via:
//
// TargetGroupArray{ TargetGroupArgs{...} }
type TargetGroupArrayInput interface {
pulumi.Input
ToTargetGroupArrayOutput() TargetGroupArrayOutput
ToTargetGroupArrayOutputWithContext(context.Context) TargetGroupArrayOutput
}
type TargetGroupArray []TargetGroupInput
func (TargetGroupArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*TargetGroup)(nil)).Elem()
}
func (i TargetGroupArray) ToTargetGroupArrayOutput() TargetGroupArrayOutput {
return i.ToTargetGroupArrayOutputWithContext(context.Background())
}
func (i TargetGroupArray) ToTargetGroupArrayOutputWithContext(ctx context.Context) TargetGroupArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(TargetGroupArrayOutput)
}
// TargetGroupMapInput is an input type that accepts TargetGroupMap and TargetGroupMapOutput values.
// You can construct a concrete instance of `TargetGroupMapInput` via:
//
// TargetGroupMap{ "key": TargetGroupArgs{...} }
type TargetGroupMapInput interface {
pulumi.Input
ToTargetGroupMapOutput() TargetGroupMapOutput
ToTargetGroupMapOutputWithContext(context.Context) TargetGroupMapOutput
}
type TargetGroupMap map[string]TargetGroupInput
func (TargetGroupMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*TargetGroup)(nil)).Elem()
}
func (i TargetGroupMap) ToTargetGroupMapOutput() TargetGroupMapOutput {
return i.ToTargetGroupMapOutputWithContext(context.Background())
}
func (i TargetGroupMap) ToTargetGroupMapOutputWithContext(ctx context.Context) TargetGroupMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(TargetGroupMapOutput)
}
type TargetGroupOutput struct{ *pulumi.OutputState }
func (TargetGroupOutput) ElementType() reflect.Type {
return reflect.TypeOf((**TargetGroup)(nil)).Elem()
}
func (o TargetGroupOutput) ToTargetGroupOutput() TargetGroupOutput {
return o
}
func (o TargetGroupOutput) ToTargetGroupOutputWithContext(ctx context.Context) TargetGroupOutput {
return o
}
type TargetGroupArrayOutput struct{ *pulumi.OutputState }
func (TargetGroupArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*TargetGroup)(nil)).Elem()
}
func (o TargetGroupArrayOutput) ToTargetGroupArrayOutput() TargetGroupArrayOutput {
return o
}
func (o TargetGroupArrayOutput) ToTargetGroupArrayOutputWithContext(ctx context.Context) TargetGroupArrayOutput {
return o
}
func (o TargetGroupArrayOutput) Index(i pulumi.IntInput) TargetGroupOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TargetGroup {
return vs[0].([]*TargetGroup)[vs[1].(int)]
}).(TargetGroupOutput)
}
type TargetGroupMapOutput struct{ *pulumi.OutputState }
func (TargetGroupMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*TargetGroup)(nil)).Elem()
}
func (o TargetGroupMapOutput) ToTargetGroupMapOutput() TargetGroupMapOutput {
return o
}
func (o TargetGroupMapOutput) ToTargetGroupMapOutputWithContext(ctx context.Context) TargetGroupMapOutput {
return o
}
func (o TargetGroupMapOutput) MapIndex(k pulumi.StringInput) TargetGroupOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TargetGroup {
return vs[0].(map[string]*TargetGroup)[vs[1].(string)]
}).(TargetGroupOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*TargetGroupInput)(nil)).Elem(), &TargetGroup{})
pulumi.RegisterInputType(reflect.TypeOf((*TargetGroupArrayInput)(nil)).Elem(), TargetGroupArray{})
pulumi.RegisterInputType(reflect.TypeOf((*TargetGroupMapInput)(nil)).Elem(), TargetGroupMap{})
pulumi.RegisterOutputType(TargetGroupOutput{})
pulumi.RegisterOutputType(TargetGroupArrayOutput{})
pulumi.RegisterOutputType(TargetGroupMapOutput{})
}