github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/elb/loadBalancer.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 elb 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Provides an Elastic Load Balancer resource, also known as a "Classic 16 // Load Balancer" after the release of 17 // Application/Network Load Balancers. 18 // 19 // > **NOTE on ELB Instances and ELB Attachments:** This provider currently 20 // provides both a standalone ELB Attachment resource 21 // (describing an instance attached to an ELB), and an ELB resource with 22 // `instances` defined in-line. At this time you cannot use an ELB with in-line 23 // instances in conjunction with a ELB Attachment resources. Doing so will cause a 24 // conflict and will overwrite attachments. 25 // 26 // ## Example Usage 27 // 28 // <!--Start PulumiCodeChooser --> 29 // ```go 30 // package main 31 // 32 // import ( 33 // 34 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elb" 35 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 36 // 37 // ) 38 // 39 // func main() { 40 // pulumi.Run(func(ctx *pulumi.Context) error { 41 // // Create a new load balancer 42 // _, err := elb.NewLoadBalancer(ctx, "bar", &elb.LoadBalancerArgs{ 43 // Name: pulumi.String("foobar-elb"), 44 // AvailabilityZones: pulumi.StringArray{ 45 // pulumi.String("us-west-2a"), 46 // pulumi.String("us-west-2b"), 47 // pulumi.String("us-west-2c"), 48 // }, 49 // AccessLogs: &elb.LoadBalancerAccessLogsArgs{ 50 // Bucket: pulumi.String("foo"), 51 // BucketPrefix: pulumi.String("bar"), 52 // Interval: pulumi.Int(60), 53 // }, 54 // Listeners: elb.LoadBalancerListenerArray{ 55 // &elb.LoadBalancerListenerArgs{ 56 // InstancePort: pulumi.Int(8000), 57 // InstanceProtocol: pulumi.String("http"), 58 // LbPort: pulumi.Int(80), 59 // LbProtocol: pulumi.String("http"), 60 // }, 61 // &elb.LoadBalancerListenerArgs{ 62 // InstancePort: pulumi.Int(8000), 63 // InstanceProtocol: pulumi.String("http"), 64 // LbPort: pulumi.Int(443), 65 // LbProtocol: pulumi.String("https"), 66 // SslCertificateId: pulumi.String("arn:aws:iam::123456789012:server-certificate/certName"), 67 // }, 68 // }, 69 // HealthCheck: &elb.LoadBalancerHealthCheckArgs{ 70 // HealthyThreshold: pulumi.Int(2), 71 // UnhealthyThreshold: pulumi.Int(2), 72 // Timeout: pulumi.Int(3), 73 // Target: pulumi.String("HTTP:8000/"), 74 // Interval: pulumi.Int(30), 75 // }, 76 // Instances: pulumi.StringArray{ 77 // foo.Id, 78 // }, 79 // CrossZoneLoadBalancing: pulumi.Bool(true), 80 // IdleTimeout: pulumi.Int(400), 81 // ConnectionDraining: pulumi.Bool(true), 82 // ConnectionDrainingTimeout: pulumi.Int(400), 83 // Tags: pulumi.StringMap{ 84 // "Name": pulumi.String("foobar-elb"), 85 // }, 86 // }) 87 // if err != nil { 88 // return err 89 // } 90 // return nil 91 // }) 92 // } 93 // 94 // ``` 95 // <!--End PulumiCodeChooser --> 96 // 97 // ## Note on ECDSA Key Algorithm 98 // 99 // If the ARN of the `sslCertificateId` that is pointed to references a 100 // certificate that was signed by an ECDSA key, note that ELB only supports the 101 // P256 and P384 curves. Using a certificate signed by a key using a different 102 // curve could produce the error `ERR_SSL_VERSION_OR_CIPHER_MISMATCH` in your 103 // browser. 104 // 105 // ## Import 106 // 107 // Using `pulumi import`, import ELBs using the `name`. For example: 108 // 109 // ```sh 110 // $ pulumi import aws:elb/loadBalancer:LoadBalancer bar elb-production-12345 111 // ``` 112 type LoadBalancer struct { 113 pulumi.CustomResourceState 114 115 // An Access Logs block. Access Logs documented below. 116 AccessLogs LoadBalancerAccessLogsPtrOutput `pulumi:"accessLogs"` 117 // The ARN of the ELB 118 Arn pulumi.StringOutput `pulumi:"arn"` 119 // The AZ's to serve traffic in. 120 AvailabilityZones pulumi.StringArrayOutput `pulumi:"availabilityZones"` 121 // Boolean to enable connection draining. Default: `false` 122 ConnectionDraining pulumi.BoolPtrOutput `pulumi:"connectionDraining"` 123 // The time in seconds to allow for connections to drain. Default: `300` 124 ConnectionDrainingTimeout pulumi.IntPtrOutput `pulumi:"connectionDrainingTimeout"` 125 // Enable cross-zone load balancing. Default: `true` 126 CrossZoneLoadBalancing pulumi.BoolPtrOutput `pulumi:"crossZoneLoadBalancing"` 127 // 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`. 128 DesyncMitigationMode pulumi.StringPtrOutput `pulumi:"desyncMitigationMode"` 129 // The DNS name of the ELB 130 DnsName pulumi.StringOutput `pulumi:"dnsName"` 131 // A healthCheck block. Health Check documented below. 132 HealthCheck LoadBalancerHealthCheckOutput `pulumi:"healthCheck"` 133 // The time in seconds that the connection is allowed to be idle. Default: `60` 134 IdleTimeout pulumi.IntPtrOutput `pulumi:"idleTimeout"` 135 // A list of instance ids to place in the ELB pool. 136 Instances pulumi.StringArrayOutput `pulumi:"instances"` 137 // If true, ELB will be an internal ELB. 138 Internal pulumi.BoolOutput `pulumi:"internal"` 139 // A list of listener blocks. Listeners documented below. 140 Listeners LoadBalancerListenerArrayOutput `pulumi:"listeners"` 141 // The name of the ELB. By default generated by this provider. 142 Name pulumi.StringOutput `pulumi:"name"` 143 // Creates a unique name beginning with the specified 144 // prefix. Conflicts with `name`. 145 NamePrefix pulumi.StringOutput `pulumi:"namePrefix"` 146 // A list of security group IDs to assign to the ELB. 147 // Only valid if creating an ELB within a VPC 148 SecurityGroups pulumi.StringArrayOutput `pulumi:"securityGroups"` 149 // The name of the security group that you can use as 150 // part of your inbound rules for your load balancer's back-end application 151 // instances. Use this for Classic or Default VPC only. 152 SourceSecurityGroup pulumi.StringOutput `pulumi:"sourceSecurityGroup"` 153 // The ID of the security group that you can use as 154 // part of your inbound rules for your load balancer's back-end application 155 // instances. Only available on ELBs launched in a VPC. 156 SourceSecurityGroupId pulumi.StringOutput `pulumi:"sourceSecurityGroupId"` 157 // A list of subnet IDs to attach to the ELB. When an update to subnets will remove all current subnets, this will force a new resource. 158 Subnets pulumi.StringArrayOutput `pulumi:"subnets"` 159 // 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. 160 // 161 // Exactly one of `availabilityZones` or `subnets` must be specified: this 162 // determines if the ELB exists in a VPC or in EC2-classic. 163 Tags pulumi.StringMapOutput `pulumi:"tags"` 164 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 165 // 166 // Deprecated: Please use `tags` instead. 167 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 168 // The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record) 169 ZoneId pulumi.StringOutput `pulumi:"zoneId"` 170 } 171 172 // NewLoadBalancer registers a new resource with the given unique name, arguments, and options. 173 func NewLoadBalancer(ctx *pulumi.Context, 174 name string, args *LoadBalancerArgs, opts ...pulumi.ResourceOption) (*LoadBalancer, error) { 175 if args == nil { 176 return nil, errors.New("missing one or more required arguments") 177 } 178 179 if args.Listeners == nil { 180 return nil, errors.New("invalid value for required argument 'Listeners'") 181 } 182 aliases := pulumi.Aliases([]pulumi.Alias{ 183 { 184 Type: pulumi.String("aws:elasticloadbalancing/loadBalancer:LoadBalancer"), 185 }, 186 }) 187 opts = append(opts, aliases) 188 opts = internal.PkgResourceDefaultOpts(opts) 189 var resource LoadBalancer 190 err := ctx.RegisterResource("aws:elb/loadBalancer:LoadBalancer", name, args, &resource, opts...) 191 if err != nil { 192 return nil, err 193 } 194 return &resource, nil 195 } 196 197 // GetLoadBalancer gets an existing LoadBalancer resource's state with the given name, ID, and optional 198 // state properties that are used to uniquely qualify the lookup (nil if not required). 199 func GetLoadBalancer(ctx *pulumi.Context, 200 name string, id pulumi.IDInput, state *LoadBalancerState, opts ...pulumi.ResourceOption) (*LoadBalancer, error) { 201 var resource LoadBalancer 202 err := ctx.ReadResource("aws:elb/loadBalancer:LoadBalancer", name, id, state, &resource, opts...) 203 if err != nil { 204 return nil, err 205 } 206 return &resource, nil 207 } 208 209 // Input properties used for looking up and filtering LoadBalancer resources. 210 type loadBalancerState struct { 211 // An Access Logs block. Access Logs documented below. 212 AccessLogs *LoadBalancerAccessLogs `pulumi:"accessLogs"` 213 // The ARN of the ELB 214 Arn *string `pulumi:"arn"` 215 // The AZ's to serve traffic in. 216 AvailabilityZones []string `pulumi:"availabilityZones"` 217 // Boolean to enable connection draining. Default: `false` 218 ConnectionDraining *bool `pulumi:"connectionDraining"` 219 // The time in seconds to allow for connections to drain. Default: `300` 220 ConnectionDrainingTimeout *int `pulumi:"connectionDrainingTimeout"` 221 // Enable cross-zone load balancing. Default: `true` 222 CrossZoneLoadBalancing *bool `pulumi:"crossZoneLoadBalancing"` 223 // 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`. 224 DesyncMitigationMode *string `pulumi:"desyncMitigationMode"` 225 // The DNS name of the ELB 226 DnsName *string `pulumi:"dnsName"` 227 // A healthCheck block. Health Check documented below. 228 HealthCheck *LoadBalancerHealthCheck `pulumi:"healthCheck"` 229 // The time in seconds that the connection is allowed to be idle. Default: `60` 230 IdleTimeout *int `pulumi:"idleTimeout"` 231 // A list of instance ids to place in the ELB pool. 232 Instances []string `pulumi:"instances"` 233 // If true, ELB will be an internal ELB. 234 Internal *bool `pulumi:"internal"` 235 // A list of listener blocks. Listeners documented below. 236 Listeners []LoadBalancerListener `pulumi:"listeners"` 237 // The name of the ELB. By default generated by this provider. 238 Name *string `pulumi:"name"` 239 // Creates a unique name beginning with the specified 240 // prefix. Conflicts with `name`. 241 NamePrefix *string `pulumi:"namePrefix"` 242 // A list of security group IDs to assign to the ELB. 243 // Only valid if creating an ELB within a VPC 244 SecurityGroups []string `pulumi:"securityGroups"` 245 // The name of the security group that you can use as 246 // part of your inbound rules for your load balancer's back-end application 247 // instances. Use this for Classic or Default VPC only. 248 SourceSecurityGroup *string `pulumi:"sourceSecurityGroup"` 249 // The ID of the security group that you can use as 250 // part of your inbound rules for your load balancer's back-end application 251 // instances. Only available on ELBs launched in a VPC. 252 SourceSecurityGroupId *string `pulumi:"sourceSecurityGroupId"` 253 // A list of subnet IDs to attach to the ELB. When an update to subnets will remove all current subnets, this will force a new resource. 254 Subnets []string `pulumi:"subnets"` 255 // 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. 256 // 257 // Exactly one of `availabilityZones` or `subnets` must be specified: this 258 // determines if the ELB exists in a VPC or in EC2-classic. 259 Tags map[string]string `pulumi:"tags"` 260 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 261 // 262 // Deprecated: Please use `tags` instead. 263 TagsAll map[string]string `pulumi:"tagsAll"` 264 // The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record) 265 ZoneId *string `pulumi:"zoneId"` 266 } 267 268 type LoadBalancerState struct { 269 // An Access Logs block. Access Logs documented below. 270 AccessLogs LoadBalancerAccessLogsPtrInput 271 // The ARN of the ELB 272 Arn pulumi.StringPtrInput 273 // The AZ's to serve traffic in. 274 AvailabilityZones pulumi.StringArrayInput 275 // Boolean to enable connection draining. Default: `false` 276 ConnectionDraining pulumi.BoolPtrInput 277 // The time in seconds to allow for connections to drain. Default: `300` 278 ConnectionDrainingTimeout pulumi.IntPtrInput 279 // Enable cross-zone load balancing. Default: `true` 280 CrossZoneLoadBalancing pulumi.BoolPtrInput 281 // 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`. 282 DesyncMitigationMode pulumi.StringPtrInput 283 // The DNS name of the ELB 284 DnsName pulumi.StringPtrInput 285 // A healthCheck block. Health Check documented below. 286 HealthCheck LoadBalancerHealthCheckPtrInput 287 // The time in seconds that the connection is allowed to be idle. Default: `60` 288 IdleTimeout pulumi.IntPtrInput 289 // A list of instance ids to place in the ELB pool. 290 Instances pulumi.StringArrayInput 291 // If true, ELB will be an internal ELB. 292 Internal pulumi.BoolPtrInput 293 // A list of listener blocks. Listeners documented below. 294 Listeners LoadBalancerListenerArrayInput 295 // The name of the ELB. By default generated by this provider. 296 Name pulumi.StringPtrInput 297 // Creates a unique name beginning with the specified 298 // prefix. Conflicts with `name`. 299 NamePrefix pulumi.StringPtrInput 300 // A list of security group IDs to assign to the ELB. 301 // Only valid if creating an ELB within a VPC 302 SecurityGroups pulumi.StringArrayInput 303 // The name of the security group that you can use as 304 // part of your inbound rules for your load balancer's back-end application 305 // instances. Use this for Classic or Default VPC only. 306 SourceSecurityGroup pulumi.StringPtrInput 307 // The ID of the security group that you can use as 308 // part of your inbound rules for your load balancer's back-end application 309 // instances. Only available on ELBs launched in a VPC. 310 SourceSecurityGroupId pulumi.StringPtrInput 311 // A list of subnet IDs to attach to the ELB. When an update to subnets will remove all current subnets, this will force a new resource. 312 Subnets pulumi.StringArrayInput 313 // 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. 314 // 315 // Exactly one of `availabilityZones` or `subnets` must be specified: this 316 // determines if the ELB exists in a VPC or in EC2-classic. 317 Tags pulumi.StringMapInput 318 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 319 // 320 // Deprecated: Please use `tags` instead. 321 TagsAll pulumi.StringMapInput 322 // The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record) 323 ZoneId pulumi.StringPtrInput 324 } 325 326 func (LoadBalancerState) ElementType() reflect.Type { 327 return reflect.TypeOf((*loadBalancerState)(nil)).Elem() 328 } 329 330 type loadBalancerArgs struct { 331 // An Access Logs block. Access Logs documented below. 332 AccessLogs *LoadBalancerAccessLogs `pulumi:"accessLogs"` 333 // The AZ's to serve traffic in. 334 AvailabilityZones []string `pulumi:"availabilityZones"` 335 // Boolean to enable connection draining. Default: `false` 336 ConnectionDraining *bool `pulumi:"connectionDraining"` 337 // The time in seconds to allow for connections to drain. Default: `300` 338 ConnectionDrainingTimeout *int `pulumi:"connectionDrainingTimeout"` 339 // Enable cross-zone load balancing. Default: `true` 340 CrossZoneLoadBalancing *bool `pulumi:"crossZoneLoadBalancing"` 341 // 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`. 342 DesyncMitigationMode *string `pulumi:"desyncMitigationMode"` 343 // A healthCheck block. Health Check documented below. 344 HealthCheck *LoadBalancerHealthCheck `pulumi:"healthCheck"` 345 // The time in seconds that the connection is allowed to be idle. Default: `60` 346 IdleTimeout *int `pulumi:"idleTimeout"` 347 // A list of instance ids to place in the ELB pool. 348 Instances []string `pulumi:"instances"` 349 // If true, ELB will be an internal ELB. 350 Internal *bool `pulumi:"internal"` 351 // A list of listener blocks. Listeners documented below. 352 Listeners []LoadBalancerListener `pulumi:"listeners"` 353 // The name of the ELB. By default generated by this provider. 354 Name *string `pulumi:"name"` 355 // Creates a unique name beginning with the specified 356 // prefix. Conflicts with `name`. 357 NamePrefix *string `pulumi:"namePrefix"` 358 // A list of security group IDs to assign to the ELB. 359 // Only valid if creating an ELB within a VPC 360 SecurityGroups []string `pulumi:"securityGroups"` 361 // The name of the security group that you can use as 362 // part of your inbound rules for your load balancer's back-end application 363 // instances. Use this for Classic or Default VPC only. 364 SourceSecurityGroup *string `pulumi:"sourceSecurityGroup"` 365 // A list of subnet IDs to attach to the ELB. When an update to subnets will remove all current subnets, this will force a new resource. 366 Subnets []string `pulumi:"subnets"` 367 // 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. 368 // 369 // Exactly one of `availabilityZones` or `subnets` must be specified: this 370 // determines if the ELB exists in a VPC or in EC2-classic. 371 Tags map[string]string `pulumi:"tags"` 372 } 373 374 // The set of arguments for constructing a LoadBalancer resource. 375 type LoadBalancerArgs struct { 376 // An Access Logs block. Access Logs documented below. 377 AccessLogs LoadBalancerAccessLogsPtrInput 378 // The AZ's to serve traffic in. 379 AvailabilityZones pulumi.StringArrayInput 380 // Boolean to enable connection draining. Default: `false` 381 ConnectionDraining pulumi.BoolPtrInput 382 // The time in seconds to allow for connections to drain. Default: `300` 383 ConnectionDrainingTimeout pulumi.IntPtrInput 384 // Enable cross-zone load balancing. Default: `true` 385 CrossZoneLoadBalancing pulumi.BoolPtrInput 386 // 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`. 387 DesyncMitigationMode pulumi.StringPtrInput 388 // A healthCheck block. Health Check documented below. 389 HealthCheck LoadBalancerHealthCheckPtrInput 390 // The time in seconds that the connection is allowed to be idle. Default: `60` 391 IdleTimeout pulumi.IntPtrInput 392 // A list of instance ids to place in the ELB pool. 393 Instances pulumi.StringArrayInput 394 // If true, ELB will be an internal ELB. 395 Internal pulumi.BoolPtrInput 396 // A list of listener blocks. Listeners documented below. 397 Listeners LoadBalancerListenerArrayInput 398 // The name of the ELB. By default generated by this provider. 399 Name pulumi.StringPtrInput 400 // Creates a unique name beginning with the specified 401 // prefix. Conflicts with `name`. 402 NamePrefix pulumi.StringPtrInput 403 // A list of security group IDs to assign to the ELB. 404 // Only valid if creating an ELB within a VPC 405 SecurityGroups pulumi.StringArrayInput 406 // The name of the security group that you can use as 407 // part of your inbound rules for your load balancer's back-end application 408 // instances. Use this for Classic or Default VPC only. 409 SourceSecurityGroup pulumi.StringPtrInput 410 // A list of subnet IDs to attach to the ELB. When an update to subnets will remove all current subnets, this will force a new resource. 411 Subnets pulumi.StringArrayInput 412 // 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. 413 // 414 // Exactly one of `availabilityZones` or `subnets` must be specified: this 415 // determines if the ELB exists in a VPC or in EC2-classic. 416 Tags pulumi.StringMapInput 417 } 418 419 func (LoadBalancerArgs) ElementType() reflect.Type { 420 return reflect.TypeOf((*loadBalancerArgs)(nil)).Elem() 421 } 422 423 type LoadBalancerInput interface { 424 pulumi.Input 425 426 ToLoadBalancerOutput() LoadBalancerOutput 427 ToLoadBalancerOutputWithContext(ctx context.Context) LoadBalancerOutput 428 } 429 430 func (*LoadBalancer) ElementType() reflect.Type { 431 return reflect.TypeOf((**LoadBalancer)(nil)).Elem() 432 } 433 434 func (i *LoadBalancer) ToLoadBalancerOutput() LoadBalancerOutput { 435 return i.ToLoadBalancerOutputWithContext(context.Background()) 436 } 437 438 func (i *LoadBalancer) ToLoadBalancerOutputWithContext(ctx context.Context) LoadBalancerOutput { 439 return pulumi.ToOutputWithContext(ctx, i).(LoadBalancerOutput) 440 } 441 442 // LoadBalancerArrayInput is an input type that accepts LoadBalancerArray and LoadBalancerArrayOutput values. 443 // You can construct a concrete instance of `LoadBalancerArrayInput` via: 444 // 445 // LoadBalancerArray{ LoadBalancerArgs{...} } 446 type LoadBalancerArrayInput interface { 447 pulumi.Input 448 449 ToLoadBalancerArrayOutput() LoadBalancerArrayOutput 450 ToLoadBalancerArrayOutputWithContext(context.Context) LoadBalancerArrayOutput 451 } 452 453 type LoadBalancerArray []LoadBalancerInput 454 455 func (LoadBalancerArray) ElementType() reflect.Type { 456 return reflect.TypeOf((*[]*LoadBalancer)(nil)).Elem() 457 } 458 459 func (i LoadBalancerArray) ToLoadBalancerArrayOutput() LoadBalancerArrayOutput { 460 return i.ToLoadBalancerArrayOutputWithContext(context.Background()) 461 } 462 463 func (i LoadBalancerArray) ToLoadBalancerArrayOutputWithContext(ctx context.Context) LoadBalancerArrayOutput { 464 return pulumi.ToOutputWithContext(ctx, i).(LoadBalancerArrayOutput) 465 } 466 467 // LoadBalancerMapInput is an input type that accepts LoadBalancerMap and LoadBalancerMapOutput values. 468 // You can construct a concrete instance of `LoadBalancerMapInput` via: 469 // 470 // LoadBalancerMap{ "key": LoadBalancerArgs{...} } 471 type LoadBalancerMapInput interface { 472 pulumi.Input 473 474 ToLoadBalancerMapOutput() LoadBalancerMapOutput 475 ToLoadBalancerMapOutputWithContext(context.Context) LoadBalancerMapOutput 476 } 477 478 type LoadBalancerMap map[string]LoadBalancerInput 479 480 func (LoadBalancerMap) ElementType() reflect.Type { 481 return reflect.TypeOf((*map[string]*LoadBalancer)(nil)).Elem() 482 } 483 484 func (i LoadBalancerMap) ToLoadBalancerMapOutput() LoadBalancerMapOutput { 485 return i.ToLoadBalancerMapOutputWithContext(context.Background()) 486 } 487 488 func (i LoadBalancerMap) ToLoadBalancerMapOutputWithContext(ctx context.Context) LoadBalancerMapOutput { 489 return pulumi.ToOutputWithContext(ctx, i).(LoadBalancerMapOutput) 490 } 491 492 type LoadBalancerOutput struct{ *pulumi.OutputState } 493 494 func (LoadBalancerOutput) ElementType() reflect.Type { 495 return reflect.TypeOf((**LoadBalancer)(nil)).Elem() 496 } 497 498 func (o LoadBalancerOutput) ToLoadBalancerOutput() LoadBalancerOutput { 499 return o 500 } 501 502 func (o LoadBalancerOutput) ToLoadBalancerOutputWithContext(ctx context.Context) LoadBalancerOutput { 503 return o 504 } 505 506 // An Access Logs block. Access Logs documented below. 507 func (o LoadBalancerOutput) AccessLogs() LoadBalancerAccessLogsPtrOutput { 508 return o.ApplyT(func(v *LoadBalancer) LoadBalancerAccessLogsPtrOutput { return v.AccessLogs }).(LoadBalancerAccessLogsPtrOutput) 509 } 510 511 // The ARN of the ELB 512 func (o LoadBalancerOutput) Arn() pulumi.StringOutput { 513 return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 514 } 515 516 // The AZ's to serve traffic in. 517 func (o LoadBalancerOutput) AvailabilityZones() pulumi.StringArrayOutput { 518 return o.ApplyT(func(v *LoadBalancer) pulumi.StringArrayOutput { return v.AvailabilityZones }).(pulumi.StringArrayOutput) 519 } 520 521 // Boolean to enable connection draining. Default: `false` 522 func (o LoadBalancerOutput) ConnectionDraining() pulumi.BoolPtrOutput { 523 return o.ApplyT(func(v *LoadBalancer) pulumi.BoolPtrOutput { return v.ConnectionDraining }).(pulumi.BoolPtrOutput) 524 } 525 526 // The time in seconds to allow for connections to drain. Default: `300` 527 func (o LoadBalancerOutput) ConnectionDrainingTimeout() pulumi.IntPtrOutput { 528 return o.ApplyT(func(v *LoadBalancer) pulumi.IntPtrOutput { return v.ConnectionDrainingTimeout }).(pulumi.IntPtrOutput) 529 } 530 531 // Enable cross-zone load balancing. Default: `true` 532 func (o LoadBalancerOutput) CrossZoneLoadBalancing() pulumi.BoolPtrOutput { 533 return o.ApplyT(func(v *LoadBalancer) pulumi.BoolPtrOutput { return v.CrossZoneLoadBalancing }).(pulumi.BoolPtrOutput) 534 } 535 536 // 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`. 537 func (o LoadBalancerOutput) DesyncMitigationMode() pulumi.StringPtrOutput { 538 return o.ApplyT(func(v *LoadBalancer) pulumi.StringPtrOutput { return v.DesyncMitigationMode }).(pulumi.StringPtrOutput) 539 } 540 541 // The DNS name of the ELB 542 func (o LoadBalancerOutput) DnsName() pulumi.StringOutput { 543 return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.DnsName }).(pulumi.StringOutput) 544 } 545 546 // A healthCheck block. Health Check documented below. 547 func (o LoadBalancerOutput) HealthCheck() LoadBalancerHealthCheckOutput { 548 return o.ApplyT(func(v *LoadBalancer) LoadBalancerHealthCheckOutput { return v.HealthCheck }).(LoadBalancerHealthCheckOutput) 549 } 550 551 // The time in seconds that the connection is allowed to be idle. Default: `60` 552 func (o LoadBalancerOutput) IdleTimeout() pulumi.IntPtrOutput { 553 return o.ApplyT(func(v *LoadBalancer) pulumi.IntPtrOutput { return v.IdleTimeout }).(pulumi.IntPtrOutput) 554 } 555 556 // A list of instance ids to place in the ELB pool. 557 func (o LoadBalancerOutput) Instances() pulumi.StringArrayOutput { 558 return o.ApplyT(func(v *LoadBalancer) pulumi.StringArrayOutput { return v.Instances }).(pulumi.StringArrayOutput) 559 } 560 561 // If true, ELB will be an internal ELB. 562 func (o LoadBalancerOutput) Internal() pulumi.BoolOutput { 563 return o.ApplyT(func(v *LoadBalancer) pulumi.BoolOutput { return v.Internal }).(pulumi.BoolOutput) 564 } 565 566 // A list of listener blocks. Listeners documented below. 567 func (o LoadBalancerOutput) Listeners() LoadBalancerListenerArrayOutput { 568 return o.ApplyT(func(v *LoadBalancer) LoadBalancerListenerArrayOutput { return v.Listeners }).(LoadBalancerListenerArrayOutput) 569 } 570 571 // The name of the ELB. By default generated by this provider. 572 func (o LoadBalancerOutput) Name() pulumi.StringOutput { 573 return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 574 } 575 576 // Creates a unique name beginning with the specified 577 // prefix. Conflicts with `name`. 578 func (o LoadBalancerOutput) NamePrefix() pulumi.StringOutput { 579 return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.NamePrefix }).(pulumi.StringOutput) 580 } 581 582 // A list of security group IDs to assign to the ELB. 583 // Only valid if creating an ELB within a VPC 584 func (o LoadBalancerOutput) SecurityGroups() pulumi.StringArrayOutput { 585 return o.ApplyT(func(v *LoadBalancer) pulumi.StringArrayOutput { return v.SecurityGroups }).(pulumi.StringArrayOutput) 586 } 587 588 // The name of the security group that you can use as 589 // part of your inbound rules for your load balancer's back-end application 590 // instances. Use this for Classic or Default VPC only. 591 func (o LoadBalancerOutput) SourceSecurityGroup() pulumi.StringOutput { 592 return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.SourceSecurityGroup }).(pulumi.StringOutput) 593 } 594 595 // The ID of the security group that you can use as 596 // part of your inbound rules for your load balancer's back-end application 597 // instances. Only available on ELBs launched in a VPC. 598 func (o LoadBalancerOutput) SourceSecurityGroupId() pulumi.StringOutput { 599 return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.SourceSecurityGroupId }).(pulumi.StringOutput) 600 } 601 602 // A list of subnet IDs to attach to the ELB. When an update to subnets will remove all current subnets, this will force a new resource. 603 func (o LoadBalancerOutput) Subnets() pulumi.StringArrayOutput { 604 return o.ApplyT(func(v *LoadBalancer) pulumi.StringArrayOutput { return v.Subnets }).(pulumi.StringArrayOutput) 605 } 606 607 // 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. 608 // 609 // Exactly one of `availabilityZones` or `subnets` must be specified: this 610 // determines if the ELB exists in a VPC or in EC2-classic. 611 func (o LoadBalancerOutput) Tags() pulumi.StringMapOutput { 612 return o.ApplyT(func(v *LoadBalancer) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 613 } 614 615 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 616 // 617 // Deprecated: Please use `tags` instead. 618 func (o LoadBalancerOutput) TagsAll() pulumi.StringMapOutput { 619 return o.ApplyT(func(v *LoadBalancer) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 620 } 621 622 // The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record) 623 func (o LoadBalancerOutput) ZoneId() pulumi.StringOutput { 624 return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.ZoneId }).(pulumi.StringOutput) 625 } 626 627 type LoadBalancerArrayOutput struct{ *pulumi.OutputState } 628 629 func (LoadBalancerArrayOutput) ElementType() reflect.Type { 630 return reflect.TypeOf((*[]*LoadBalancer)(nil)).Elem() 631 } 632 633 func (o LoadBalancerArrayOutput) ToLoadBalancerArrayOutput() LoadBalancerArrayOutput { 634 return o 635 } 636 637 func (o LoadBalancerArrayOutput) ToLoadBalancerArrayOutputWithContext(ctx context.Context) LoadBalancerArrayOutput { 638 return o 639 } 640 641 func (o LoadBalancerArrayOutput) Index(i pulumi.IntInput) LoadBalancerOutput { 642 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LoadBalancer { 643 return vs[0].([]*LoadBalancer)[vs[1].(int)] 644 }).(LoadBalancerOutput) 645 } 646 647 type LoadBalancerMapOutput struct{ *pulumi.OutputState } 648 649 func (LoadBalancerMapOutput) ElementType() reflect.Type { 650 return reflect.TypeOf((*map[string]*LoadBalancer)(nil)).Elem() 651 } 652 653 func (o LoadBalancerMapOutput) ToLoadBalancerMapOutput() LoadBalancerMapOutput { 654 return o 655 } 656 657 func (o LoadBalancerMapOutput) ToLoadBalancerMapOutputWithContext(ctx context.Context) LoadBalancerMapOutput { 658 return o 659 } 660 661 func (o LoadBalancerMapOutput) MapIndex(k pulumi.StringInput) LoadBalancerOutput { 662 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LoadBalancer { 663 return vs[0].(map[string]*LoadBalancer)[vs[1].(string)] 664 }).(LoadBalancerOutput) 665 } 666 667 func init() { 668 pulumi.RegisterInputType(reflect.TypeOf((*LoadBalancerInput)(nil)).Elem(), &LoadBalancer{}) 669 pulumi.RegisterInputType(reflect.TypeOf((*LoadBalancerArrayInput)(nil)).Elem(), LoadBalancerArray{}) 670 pulumi.RegisterInputType(reflect.TypeOf((*LoadBalancerMapInput)(nil)).Elem(), LoadBalancerMap{}) 671 pulumi.RegisterOutputType(LoadBalancerOutput{}) 672 pulumi.RegisterOutputType(LoadBalancerArrayOutput{}) 673 pulumi.RegisterOutputType(LoadBalancerMapOutput{}) 674 }