/
loadBalancer.go
657 lines (589 loc) · 29.1 KB
/
loadBalancer.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
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package elasticloadbalancing
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides an Elastic Load Balancer resource, also known as a "Classic
// Load Balancer" after the release of
// Application/Network Load Balancers.
//
// > **NOTE on ELB Instances and ELB Attachments:** This provider currently
// provides both a standalone ELB Attachment resource
// (describing an instance attached to an ELB), and an ELB resource with
// `instances` defined in-line. At this time you cannot use an ELB with in-line
// instances in conjunction with a ELB Attachment resources. Doing so will cause a
// conflict and will overwrite attachments.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/elb"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := elb.NewLoadBalancer(ctx, "bar", &elb.LoadBalancerArgs{
// AvailabilityZones: pulumi.StringArray{
// pulumi.String("us-west-2a"),
// pulumi.String("us-west-2b"),
// pulumi.String("us-west-2c"),
// },
// AccessLogs: &elb.LoadBalancerAccessLogsArgs{
// Bucket: pulumi.String("foo"),
// BucketPrefix: pulumi.String("bar"),
// Interval: pulumi.Int(60),
// },
// Listeners: elb.LoadBalancerListenerArray{
// &elb.LoadBalancerListenerArgs{
// InstancePort: pulumi.Int(8000),
// InstanceProtocol: pulumi.String("http"),
// LbPort: pulumi.Int(80),
// LbProtocol: pulumi.String("http"),
// },
// &elb.LoadBalancerListenerArgs{
// InstancePort: pulumi.Int(8000),
// InstanceProtocol: pulumi.String("http"),
// LbPort: pulumi.Int(443),
// LbProtocol: pulumi.String("https"),
// SslCertificateId: pulumi.String("arn:aws:iam::123456789012:server-certificate/certName"),
// },
// },
// HealthCheck: &elb.LoadBalancerHealthCheckArgs{
// HealthyThreshold: pulumi.Int(2),
// UnhealthyThreshold: pulumi.Int(2),
// Timeout: pulumi.Int(3),
// Target: pulumi.String("HTTP:8000/"),
// Interval: pulumi.Int(30),
// },
// Instances: pulumi.StringArray{
// aws_instance.Foo.Id,
// },
// CrossZoneLoadBalancing: pulumi.Bool(true),
// IdleTimeout: pulumi.Int(400),
// ConnectionDraining: pulumi.Bool(true),
// ConnectionDrainingTimeout: pulumi.Int(400),
// Tags: pulumi.StringMap{
// "Name": pulumi.String("foobar-elb"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
// ## Note on ECDSA Key Algorithm
//
// If the ARN of the `sslCertificateId` that is pointed to references a
// certificate that was signed by an ECDSA key, note that ELB only supports the
// P256 and P384 curves. Using a certificate signed by a key using a different
// curve could produce the error `ERR_SSL_VERSION_OR_CIPHER_MISMATCH` in your
// browser.
//
// ## Import
//
// ELBs can be imported using the `name`, e.g.,
//
// ```sh
//
// $ pulumi import aws:elasticloadbalancing/loadBalancer:LoadBalancer bar elb-production-12345
//
// ```
//
// Deprecated: aws.elasticloadbalancing.LoadBalancer has been deprecated in favor of aws.elb.LoadBalancer
type LoadBalancer struct {
pulumi.CustomResourceState
// An Access Logs block. Access Logs documented below.
AccessLogs LoadBalancerAccessLogsPtrOutput `pulumi:"accessLogs"`
// The ARN of the ELB
Arn pulumi.StringOutput `pulumi:"arn"`
// The AZ's to serve traffic in.
AvailabilityZones pulumi.StringArrayOutput `pulumi:"availabilityZones"`
// Boolean to enable connection draining. Default: `false`
ConnectionDraining pulumi.BoolPtrOutput `pulumi:"connectionDraining"`
// The time in seconds to allow for connections to drain. Default: `300`
ConnectionDrainingTimeout pulumi.IntPtrOutput `pulumi:"connectionDrainingTimeout"`
// Enable cross-zone load balancing. Default: `true`
CrossZoneLoadBalancing pulumi.BoolPtrOutput `pulumi:"crossZoneLoadBalancing"`
// Determines how the load balancer handles requests that might pose a security risk to an application due to HTTP desync. Valid values are `monitor`, `defensive` (default), `strictest`.
DesyncMitigationMode pulumi.StringPtrOutput `pulumi:"desyncMitigationMode"`
// The DNS name of the ELB
DnsName pulumi.StringOutput `pulumi:"dnsName"`
// A healthCheck block. Health Check documented below.
HealthCheck LoadBalancerHealthCheckOutput `pulumi:"healthCheck"`
// The time in seconds that the connection is allowed to be idle. Default: `60`
IdleTimeout pulumi.IntPtrOutput `pulumi:"idleTimeout"`
// A list of instance ids to place in the ELB pool.
Instances pulumi.StringArrayOutput `pulumi:"instances"`
// If true, ELB will be an internal ELB.
Internal pulumi.BoolOutput `pulumi:"internal"`
// A list of listener blocks. Listeners documented below.
Listeners LoadBalancerListenerArrayOutput `pulumi:"listeners"`
// The name of the ELB. By default generated by this provider.
Name pulumi.StringOutput `pulumi:"name"`
// Creates a unique name beginning with the specified
// prefix. Conflicts with `name`.
NamePrefix pulumi.StringPtrOutput `pulumi:"namePrefix"`
// A list of security group IDs to assign to the ELB.
// Only valid if creating an ELB within a VPC
SecurityGroups pulumi.StringArrayOutput `pulumi:"securityGroups"`
// The name of the security group that you can use as
// part of your inbound rules for your load balancer's back-end application
// instances. Use this for Classic or Default VPC only.
SourceSecurityGroup pulumi.StringOutput `pulumi:"sourceSecurityGroup"`
// The ID of the security group that you can use as
// part of your inbound rules for your load balancer's back-end application
// instances. Only available on ELBs launched in a VPC.
SourceSecurityGroupId pulumi.StringOutput `pulumi:"sourceSecurityGroupId"`
// A list of subnet IDs to attach to the ELB.
Subnets pulumi.StringArrayOutput `pulumi:"subnets"`
// A 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.
//
// Exactly one of `availabilityZones` or `subnets` must be specified: this
// determines if the ELB exists in a VPC or in EC2-classic.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
// The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record)
ZoneId pulumi.StringOutput `pulumi:"zoneId"`
}
// NewLoadBalancer registers a new resource with the given unique name, arguments, and options.
func NewLoadBalancer(ctx *pulumi.Context,
name string, args *LoadBalancerArgs, opts ...pulumi.ResourceOption) (*LoadBalancer, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Listeners == nil {
return nil, errors.New("invalid value for required argument 'Listeners'")
}
var resource LoadBalancer
err := ctx.RegisterResource("aws:elasticloadbalancing/loadBalancer:LoadBalancer", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetLoadBalancer gets an existing LoadBalancer 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 GetLoadBalancer(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *LoadBalancerState, opts ...pulumi.ResourceOption) (*LoadBalancer, error) {
var resource LoadBalancer
err := ctx.ReadResource("aws:elasticloadbalancing/loadBalancer:LoadBalancer", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering LoadBalancer resources.
type loadBalancerState struct {
// An Access Logs block. Access Logs documented below.
AccessLogs *LoadBalancerAccessLogs `pulumi:"accessLogs"`
// The ARN of the ELB
Arn *string `pulumi:"arn"`
// The AZ's to serve traffic in.
AvailabilityZones []string `pulumi:"availabilityZones"`
// Boolean to enable connection draining. Default: `false`
ConnectionDraining *bool `pulumi:"connectionDraining"`
// The time in seconds to allow for connections to drain. Default: `300`
ConnectionDrainingTimeout *int `pulumi:"connectionDrainingTimeout"`
// Enable cross-zone load balancing. Default: `true`
CrossZoneLoadBalancing *bool `pulumi:"crossZoneLoadBalancing"`
// Determines how the load balancer handles requests that might pose a security risk to an application due to HTTP desync. Valid values are `monitor`, `defensive` (default), `strictest`.
DesyncMitigationMode *string `pulumi:"desyncMitigationMode"`
// The DNS name of the ELB
DnsName *string `pulumi:"dnsName"`
// A healthCheck block. Health Check documented below.
HealthCheck *LoadBalancerHealthCheck `pulumi:"healthCheck"`
// The time in seconds that the connection is allowed to be idle. Default: `60`
IdleTimeout *int `pulumi:"idleTimeout"`
// A list of instance ids to place in the ELB pool.
Instances []string `pulumi:"instances"`
// If true, ELB will be an internal ELB.
Internal *bool `pulumi:"internal"`
// A list of listener blocks. Listeners documented below.
Listeners []LoadBalancerListener `pulumi:"listeners"`
// The name of the ELB. By default generated by this provider.
Name *string `pulumi:"name"`
// Creates a unique name beginning with the specified
// prefix. Conflicts with `name`.
NamePrefix *string `pulumi:"namePrefix"`
// A list of security group IDs to assign to the ELB.
// Only valid if creating an ELB within a VPC
SecurityGroups []string `pulumi:"securityGroups"`
// The name of the security group that you can use as
// part of your inbound rules for your load balancer's back-end application
// instances. Use this for Classic or Default VPC only.
SourceSecurityGroup *string `pulumi:"sourceSecurityGroup"`
// The ID of the security group that you can use as
// part of your inbound rules for your load balancer's back-end application
// instances. Only available on ELBs launched in a VPC.
SourceSecurityGroupId *string `pulumi:"sourceSecurityGroupId"`
// A list of subnet IDs to attach to the ELB.
Subnets []string `pulumi:"subnets"`
// A 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.
//
// Exactly one of `availabilityZones` or `subnets` must be specified: this
// determines if the ELB exists in a VPC or in EC2-classic.
Tags map[string]string `pulumi:"tags"`
// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
TagsAll map[string]string `pulumi:"tagsAll"`
// The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record)
ZoneId *string `pulumi:"zoneId"`
}
type LoadBalancerState struct {
// An Access Logs block. Access Logs documented below.
AccessLogs LoadBalancerAccessLogsPtrInput
// The ARN of the ELB
Arn pulumi.StringPtrInput
// The AZ's to serve traffic in.
AvailabilityZones pulumi.StringArrayInput
// Boolean to enable connection draining. Default: `false`
ConnectionDraining pulumi.BoolPtrInput
// The time in seconds to allow for connections to drain. Default: `300`
ConnectionDrainingTimeout pulumi.IntPtrInput
// Enable cross-zone load balancing. Default: `true`
CrossZoneLoadBalancing pulumi.BoolPtrInput
// Determines how the load balancer handles requests that might pose a security risk to an application due to HTTP desync. Valid values are `monitor`, `defensive` (default), `strictest`.
DesyncMitigationMode pulumi.StringPtrInput
// The DNS name of the ELB
DnsName pulumi.StringPtrInput
// A healthCheck block. Health Check documented below.
HealthCheck LoadBalancerHealthCheckPtrInput
// The time in seconds that the connection is allowed to be idle. Default: `60`
IdleTimeout pulumi.IntPtrInput
// A list of instance ids to place in the ELB pool.
Instances pulumi.StringArrayInput
// If true, ELB will be an internal ELB.
Internal pulumi.BoolPtrInput
// A list of listener blocks. Listeners documented below.
Listeners LoadBalancerListenerArrayInput
// The name of the ELB. By default generated by this provider.
Name pulumi.StringPtrInput
// Creates a unique name beginning with the specified
// prefix. Conflicts with `name`.
NamePrefix pulumi.StringPtrInput
// A list of security group IDs to assign to the ELB.
// Only valid if creating an ELB within a VPC
SecurityGroups pulumi.StringArrayInput
// The name of the security group that you can use as
// part of your inbound rules for your load balancer's back-end application
// instances. Use this for Classic or Default VPC only.
SourceSecurityGroup pulumi.StringPtrInput
// The ID of the security group that you can use as
// part of your inbound rules for your load balancer's back-end application
// instances. Only available on ELBs launched in a VPC.
SourceSecurityGroupId pulumi.StringPtrInput
// A list of subnet IDs to attach to the ELB.
Subnets pulumi.StringArrayInput
// A 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.
//
// Exactly one of `availabilityZones` or `subnets` must be specified: this
// determines if the ELB exists in a VPC or in EC2-classic.
Tags pulumi.StringMapInput
// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
TagsAll pulumi.StringMapInput
// The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record)
ZoneId pulumi.StringPtrInput
}
func (LoadBalancerState) ElementType() reflect.Type {
return reflect.TypeOf((*loadBalancerState)(nil)).Elem()
}
type loadBalancerArgs struct {
// An Access Logs block. Access Logs documented below.
AccessLogs *LoadBalancerAccessLogs `pulumi:"accessLogs"`
// The AZ's to serve traffic in.
AvailabilityZones []string `pulumi:"availabilityZones"`
// Boolean to enable connection draining. Default: `false`
ConnectionDraining *bool `pulumi:"connectionDraining"`
// The time in seconds to allow for connections to drain. Default: `300`
ConnectionDrainingTimeout *int `pulumi:"connectionDrainingTimeout"`
// Enable cross-zone load balancing. Default: `true`
CrossZoneLoadBalancing *bool `pulumi:"crossZoneLoadBalancing"`
// Determines how the load balancer handles requests that might pose a security risk to an application due to HTTP desync. Valid values are `monitor`, `defensive` (default), `strictest`.
DesyncMitigationMode *string `pulumi:"desyncMitigationMode"`
// A healthCheck block. Health Check documented below.
HealthCheck *LoadBalancerHealthCheck `pulumi:"healthCheck"`
// The time in seconds that the connection is allowed to be idle. Default: `60`
IdleTimeout *int `pulumi:"idleTimeout"`
// A list of instance ids to place in the ELB pool.
Instances []string `pulumi:"instances"`
// If true, ELB will be an internal ELB.
Internal *bool `pulumi:"internal"`
// A list of listener blocks. Listeners documented below.
Listeners []LoadBalancerListener `pulumi:"listeners"`
// The name of the ELB. By default generated by this provider.
Name *string `pulumi:"name"`
// Creates a unique name beginning with the specified
// prefix. Conflicts with `name`.
NamePrefix *string `pulumi:"namePrefix"`
// A list of security group IDs to assign to the ELB.
// Only valid if creating an ELB within a VPC
SecurityGroups []string `pulumi:"securityGroups"`
// The name of the security group that you can use as
// part of your inbound rules for your load balancer's back-end application
// instances. Use this for Classic or Default VPC only.
SourceSecurityGroup *string `pulumi:"sourceSecurityGroup"`
// A list of subnet IDs to attach to the ELB.
Subnets []string `pulumi:"subnets"`
// A 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.
//
// Exactly one of `availabilityZones` or `subnets` must be specified: this
// determines if the ELB exists in a VPC or in EC2-classic.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a LoadBalancer resource.
type LoadBalancerArgs struct {
// An Access Logs block. Access Logs documented below.
AccessLogs LoadBalancerAccessLogsPtrInput
// The AZ's to serve traffic in.
AvailabilityZones pulumi.StringArrayInput
// Boolean to enable connection draining. Default: `false`
ConnectionDraining pulumi.BoolPtrInput
// The time in seconds to allow for connections to drain. Default: `300`
ConnectionDrainingTimeout pulumi.IntPtrInput
// Enable cross-zone load balancing. Default: `true`
CrossZoneLoadBalancing pulumi.BoolPtrInput
// Determines how the load balancer handles requests that might pose a security risk to an application due to HTTP desync. Valid values are `monitor`, `defensive` (default), `strictest`.
DesyncMitigationMode pulumi.StringPtrInput
// A healthCheck block. Health Check documented below.
HealthCheck LoadBalancerHealthCheckPtrInput
// The time in seconds that the connection is allowed to be idle. Default: `60`
IdleTimeout pulumi.IntPtrInput
// A list of instance ids to place in the ELB pool.
Instances pulumi.StringArrayInput
// If true, ELB will be an internal ELB.
Internal pulumi.BoolPtrInput
// A list of listener blocks. Listeners documented below.
Listeners LoadBalancerListenerArrayInput
// The name of the ELB. By default generated by this provider.
Name pulumi.StringPtrInput
// Creates a unique name beginning with the specified
// prefix. Conflicts with `name`.
NamePrefix pulumi.StringPtrInput
// A list of security group IDs to assign to the ELB.
// Only valid if creating an ELB within a VPC
SecurityGroups pulumi.StringArrayInput
// The name of the security group that you can use as
// part of your inbound rules for your load balancer's back-end application
// instances. Use this for Classic or Default VPC only.
SourceSecurityGroup pulumi.StringPtrInput
// A list of subnet IDs to attach to the ELB.
Subnets pulumi.StringArrayInput
// A 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.
//
// Exactly one of `availabilityZones` or `subnets` must be specified: this
// determines if the ELB exists in a VPC or in EC2-classic.
Tags pulumi.StringMapInput
}
func (LoadBalancerArgs) ElementType() reflect.Type {
return reflect.TypeOf((*loadBalancerArgs)(nil)).Elem()
}
type LoadBalancerInput interface {
pulumi.Input
ToLoadBalancerOutput() LoadBalancerOutput
ToLoadBalancerOutputWithContext(ctx context.Context) LoadBalancerOutput
}
func (*LoadBalancer) ElementType() reflect.Type {
return reflect.TypeOf((**LoadBalancer)(nil)).Elem()
}
func (i *LoadBalancer) ToLoadBalancerOutput() LoadBalancerOutput {
return i.ToLoadBalancerOutputWithContext(context.Background())
}
func (i *LoadBalancer) ToLoadBalancerOutputWithContext(ctx context.Context) LoadBalancerOutput {
return pulumi.ToOutputWithContext(ctx, i).(LoadBalancerOutput)
}
// LoadBalancerArrayInput is an input type that accepts LoadBalancerArray and LoadBalancerArrayOutput values.
// You can construct a concrete instance of `LoadBalancerArrayInput` via:
//
// LoadBalancerArray{ LoadBalancerArgs{...} }
type LoadBalancerArrayInput interface {
pulumi.Input
ToLoadBalancerArrayOutput() LoadBalancerArrayOutput
ToLoadBalancerArrayOutputWithContext(context.Context) LoadBalancerArrayOutput
}
type LoadBalancerArray []LoadBalancerInput
func (LoadBalancerArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LoadBalancer)(nil)).Elem()
}
func (i LoadBalancerArray) ToLoadBalancerArrayOutput() LoadBalancerArrayOutput {
return i.ToLoadBalancerArrayOutputWithContext(context.Background())
}
func (i LoadBalancerArray) ToLoadBalancerArrayOutputWithContext(ctx context.Context) LoadBalancerArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(LoadBalancerArrayOutput)
}
// LoadBalancerMapInput is an input type that accepts LoadBalancerMap and LoadBalancerMapOutput values.
// You can construct a concrete instance of `LoadBalancerMapInput` via:
//
// LoadBalancerMap{ "key": LoadBalancerArgs{...} }
type LoadBalancerMapInput interface {
pulumi.Input
ToLoadBalancerMapOutput() LoadBalancerMapOutput
ToLoadBalancerMapOutputWithContext(context.Context) LoadBalancerMapOutput
}
type LoadBalancerMap map[string]LoadBalancerInput
func (LoadBalancerMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LoadBalancer)(nil)).Elem()
}
func (i LoadBalancerMap) ToLoadBalancerMapOutput() LoadBalancerMapOutput {
return i.ToLoadBalancerMapOutputWithContext(context.Background())
}
func (i LoadBalancerMap) ToLoadBalancerMapOutputWithContext(ctx context.Context) LoadBalancerMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(LoadBalancerMapOutput)
}
type LoadBalancerOutput struct{ *pulumi.OutputState }
func (LoadBalancerOutput) ElementType() reflect.Type {
return reflect.TypeOf((**LoadBalancer)(nil)).Elem()
}
func (o LoadBalancerOutput) ToLoadBalancerOutput() LoadBalancerOutput {
return o
}
func (o LoadBalancerOutput) ToLoadBalancerOutputWithContext(ctx context.Context) LoadBalancerOutput {
return o
}
// An Access Logs block. Access Logs documented below.
func (o LoadBalancerOutput) AccessLogs() LoadBalancerAccessLogsPtrOutput {
return o.ApplyT(func(v *LoadBalancer) LoadBalancerAccessLogsPtrOutput { return v.AccessLogs }).(LoadBalancerAccessLogsPtrOutput)
}
// The ARN of the ELB
func (o LoadBalancerOutput) Arn() pulumi.StringOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
}
// The AZ's to serve traffic in.
func (o LoadBalancerOutput) AvailabilityZones() pulumi.StringArrayOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.StringArrayOutput { return v.AvailabilityZones }).(pulumi.StringArrayOutput)
}
// Boolean to enable connection draining. Default: `false`
func (o LoadBalancerOutput) ConnectionDraining() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.BoolPtrOutput { return v.ConnectionDraining }).(pulumi.BoolPtrOutput)
}
// The time in seconds to allow for connections to drain. Default: `300`
func (o LoadBalancerOutput) ConnectionDrainingTimeout() pulumi.IntPtrOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.IntPtrOutput { return v.ConnectionDrainingTimeout }).(pulumi.IntPtrOutput)
}
// Enable cross-zone load balancing. Default: `true`
func (o LoadBalancerOutput) CrossZoneLoadBalancing() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.BoolPtrOutput { return v.CrossZoneLoadBalancing }).(pulumi.BoolPtrOutput)
}
// Determines how the load balancer handles requests that might pose a security risk to an application due to HTTP desync. Valid values are `monitor`, `defensive` (default), `strictest`.
func (o LoadBalancerOutput) DesyncMitigationMode() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.StringPtrOutput { return v.DesyncMitigationMode }).(pulumi.StringPtrOutput)
}
// The DNS name of the ELB
func (o LoadBalancerOutput) DnsName() pulumi.StringOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.DnsName }).(pulumi.StringOutput)
}
// A healthCheck block. Health Check documented below.
func (o LoadBalancerOutput) HealthCheck() LoadBalancerHealthCheckOutput {
return o.ApplyT(func(v *LoadBalancer) LoadBalancerHealthCheckOutput { return v.HealthCheck }).(LoadBalancerHealthCheckOutput)
}
// The time in seconds that the connection is allowed to be idle. Default: `60`
func (o LoadBalancerOutput) IdleTimeout() pulumi.IntPtrOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.IntPtrOutput { return v.IdleTimeout }).(pulumi.IntPtrOutput)
}
// A list of instance ids to place in the ELB pool.
func (o LoadBalancerOutput) Instances() pulumi.StringArrayOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.StringArrayOutput { return v.Instances }).(pulumi.StringArrayOutput)
}
// If true, ELB will be an internal ELB.
func (o LoadBalancerOutput) Internal() pulumi.BoolOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.BoolOutput { return v.Internal }).(pulumi.BoolOutput)
}
// A list of listener blocks. Listeners documented below.
func (o LoadBalancerOutput) Listeners() LoadBalancerListenerArrayOutput {
return o.ApplyT(func(v *LoadBalancer) LoadBalancerListenerArrayOutput { return v.Listeners }).(LoadBalancerListenerArrayOutput)
}
// The name of the ELB. By default generated by this provider.
func (o LoadBalancerOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Creates a unique name beginning with the specified
// prefix. Conflicts with `name`.
func (o LoadBalancerOutput) NamePrefix() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.StringPtrOutput { return v.NamePrefix }).(pulumi.StringPtrOutput)
}
// A list of security group IDs to assign to the ELB.
// Only valid if creating an ELB within a VPC
func (o LoadBalancerOutput) SecurityGroups() pulumi.StringArrayOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.StringArrayOutput { return v.SecurityGroups }).(pulumi.StringArrayOutput)
}
// The name of the security group that you can use as
// part of your inbound rules for your load balancer's back-end application
// instances. Use this for Classic or Default VPC only.
func (o LoadBalancerOutput) SourceSecurityGroup() pulumi.StringOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.SourceSecurityGroup }).(pulumi.StringOutput)
}
// The ID of the security group that you can use as
// part of your inbound rules for your load balancer's back-end application
// instances. Only available on ELBs launched in a VPC.
func (o LoadBalancerOutput) SourceSecurityGroupId() pulumi.StringOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.SourceSecurityGroupId }).(pulumi.StringOutput)
}
// A list of subnet IDs to attach to the ELB.
func (o LoadBalancerOutput) Subnets() pulumi.StringArrayOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.StringArrayOutput { return v.Subnets }).(pulumi.StringArrayOutput)
}
// A 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.
//
// Exactly one of `availabilityZones` or `subnets` must be specified: this
// determines if the ELB exists in a VPC or in EC2-classic.
func (o LoadBalancerOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
func (o LoadBalancerOutput) TagsAll() pulumi.StringMapOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
}
// The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record)
func (o LoadBalancerOutput) ZoneId() pulumi.StringOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.ZoneId }).(pulumi.StringOutput)
}
type LoadBalancerArrayOutput struct{ *pulumi.OutputState }
func (LoadBalancerArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LoadBalancer)(nil)).Elem()
}
func (o LoadBalancerArrayOutput) ToLoadBalancerArrayOutput() LoadBalancerArrayOutput {
return o
}
func (o LoadBalancerArrayOutput) ToLoadBalancerArrayOutputWithContext(ctx context.Context) LoadBalancerArrayOutput {
return o
}
func (o LoadBalancerArrayOutput) Index(i pulumi.IntInput) LoadBalancerOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LoadBalancer {
return vs[0].([]*LoadBalancer)[vs[1].(int)]
}).(LoadBalancerOutput)
}
type LoadBalancerMapOutput struct{ *pulumi.OutputState }
func (LoadBalancerMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LoadBalancer)(nil)).Elem()
}
func (o LoadBalancerMapOutput) ToLoadBalancerMapOutput() LoadBalancerMapOutput {
return o
}
func (o LoadBalancerMapOutput) ToLoadBalancerMapOutputWithContext(ctx context.Context) LoadBalancerMapOutput {
return o
}
func (o LoadBalancerMapOutput) MapIndex(k pulumi.StringInput) LoadBalancerOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LoadBalancer {
return vs[0].(map[string]*LoadBalancer)[vs[1].(string)]
}).(LoadBalancerOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*LoadBalancerInput)(nil)).Elem(), &LoadBalancer{})
pulumi.RegisterInputType(reflect.TypeOf((*LoadBalancerArrayInput)(nil)).Elem(), LoadBalancerArray{})
pulumi.RegisterInputType(reflect.TypeOf((*LoadBalancerMapInput)(nil)).Elem(), LoadBalancerMap{})
pulumi.RegisterOutputType(LoadBalancerOutput{})
pulumi.RegisterOutputType(LoadBalancerArrayOutput{})
pulumi.RegisterOutputType(LoadBalancerMapOutput{})
}