aws.elb.LoadBalancer
Explore with Pulumi AI
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
instancesdefined 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
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
// Create a new load balancer
const bar = new aws.elb.LoadBalancer("bar", {
    name: "foobar-elb",
    availabilityZones: [
        "us-west-2a",
        "us-west-2b",
        "us-west-2c",
    ],
    accessLogs: {
        bucket: "foo",
        bucketPrefix: "bar",
        interval: 60,
    },
    listeners: [
        {
            instancePort: 8000,
            instanceProtocol: "http",
            lbPort: 80,
            lbProtocol: "http",
        },
        {
            instancePort: 8000,
            instanceProtocol: "http",
            lbPort: 443,
            lbProtocol: "https",
            sslCertificateId: "arn:aws:iam::123456789012:server-certificate/certName",
        },
    ],
    healthCheck: {
        healthyThreshold: 2,
        unhealthyThreshold: 2,
        timeout: 3,
        target: "HTTP:8000/",
        interval: 30,
    },
    instances: [foo.id],
    crossZoneLoadBalancing: true,
    idleTimeout: 400,
    connectionDraining: true,
    connectionDrainingTimeout: 400,
    tags: {
        Name: "foobar-elb",
    },
});
import pulumi
import pulumi_aws as aws
# Create a new load balancer
bar = aws.elb.LoadBalancer("bar",
    name="foobar-elb",
    availability_zones=[
        "us-west-2a",
        "us-west-2b",
        "us-west-2c",
    ],
    access_logs={
        "bucket": "foo",
        "bucket_prefix": "bar",
        "interval": 60,
    },
    listeners=[
        {
            "instance_port": 8000,
            "instance_protocol": "http",
            "lb_port": 80,
            "lb_protocol": "http",
        },
        {
            "instance_port": 8000,
            "instance_protocol": "http",
            "lb_port": 443,
            "lb_protocol": "https",
            "ssl_certificate_id": "arn:aws:iam::123456789012:server-certificate/certName",
        },
    ],
    health_check={
        "healthy_threshold": 2,
        "unhealthy_threshold": 2,
        "timeout": 3,
        "target": "HTTP:8000/",
        "interval": 30,
    },
    instances=[foo["id"]],
    cross_zone_load_balancing=True,
    idle_timeout=400,
    connection_draining=True,
    connection_draining_timeout=400,
    tags={
        "Name": "foobar-elb",
    })
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elb"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Create a new load balancer
		_, err := elb.NewLoadBalancer(ctx, "bar", &elb.LoadBalancerArgs{
			Name: pulumi.String("foobar-elb"),
			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{
				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
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    // Create a new load balancer
    var bar = new Aws.Elb.LoadBalancer("bar", new()
    {
        Name = "foobar-elb",
        AvailabilityZones = new[]
        {
            "us-west-2a",
            "us-west-2b",
            "us-west-2c",
        },
        AccessLogs = new Aws.Elb.Inputs.LoadBalancerAccessLogsArgs
        {
            Bucket = "foo",
            BucketPrefix = "bar",
            Interval = 60,
        },
        Listeners = new[]
        {
            new Aws.Elb.Inputs.LoadBalancerListenerArgs
            {
                InstancePort = 8000,
                InstanceProtocol = "http",
                LbPort = 80,
                LbProtocol = "http",
            },
            new Aws.Elb.Inputs.LoadBalancerListenerArgs
            {
                InstancePort = 8000,
                InstanceProtocol = "http",
                LbPort = 443,
                LbProtocol = "https",
                SslCertificateId = "arn:aws:iam::123456789012:server-certificate/certName",
            },
        },
        HealthCheck = new Aws.Elb.Inputs.LoadBalancerHealthCheckArgs
        {
            HealthyThreshold = 2,
            UnhealthyThreshold = 2,
            Timeout = 3,
            Target = "HTTP:8000/",
            Interval = 30,
        },
        Instances = new[]
        {
            foo.Id,
        },
        CrossZoneLoadBalancing = true,
        IdleTimeout = 400,
        ConnectionDraining = true,
        ConnectionDrainingTimeout = 400,
        Tags = 
        {
            { "Name", "foobar-elb" },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.elb.LoadBalancer;
import com.pulumi.aws.elb.LoadBalancerArgs;
import com.pulumi.aws.elb.inputs.LoadBalancerAccessLogsArgs;
import com.pulumi.aws.elb.inputs.LoadBalancerListenerArgs;
import com.pulumi.aws.elb.inputs.LoadBalancerHealthCheckArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        // Create a new load balancer
        var bar = new LoadBalancer("bar", LoadBalancerArgs.builder()
            .name("foobar-elb")
            .availabilityZones(            
                "us-west-2a",
                "us-west-2b",
                "us-west-2c")
            .accessLogs(LoadBalancerAccessLogsArgs.builder()
                .bucket("foo")
                .bucketPrefix("bar")
                .interval(60)
                .build())
            .listeners(            
                LoadBalancerListenerArgs.builder()
                    .instancePort(8000)
                    .instanceProtocol("http")
                    .lbPort(80)
                    .lbProtocol("http")
                    .build(),
                LoadBalancerListenerArgs.builder()
                    .instancePort(8000)
                    .instanceProtocol("http")
                    .lbPort(443)
                    .lbProtocol("https")
                    .sslCertificateId("arn:aws:iam::123456789012:server-certificate/certName")
                    .build())
            .healthCheck(LoadBalancerHealthCheckArgs.builder()
                .healthyThreshold(2)
                .unhealthyThreshold(2)
                .timeout(3)
                .target("HTTP:8000/")
                .interval(30)
                .build())
            .instances(foo.id())
            .crossZoneLoadBalancing(true)
            .idleTimeout(400)
            .connectionDraining(true)
            .connectionDrainingTimeout(400)
            .tags(Map.of("Name", "foobar-elb"))
            .build());
    }
}
resources:
  # Create a new load balancer
  bar:
    type: aws:elb:LoadBalancer
    properties:
      name: foobar-elb
      availabilityZones:
        - us-west-2a
        - us-west-2b
        - us-west-2c
      accessLogs:
        bucket: foo
        bucketPrefix: bar
        interval: 60
      listeners:
        - instancePort: 8000
          instanceProtocol: http
          lbPort: 80
          lbProtocol: http
        - instancePort: 8000
          instanceProtocol: http
          lbPort: 443
          lbProtocol: https
          sslCertificateId: arn:aws:iam::123456789012:server-certificate/certName
      healthCheck:
        healthyThreshold: 2
        unhealthyThreshold: 2
        timeout: 3
        target: HTTP:8000/
        interval: 30
      instances:
        - ${foo.id}
      crossZoneLoadBalancing: true
      idleTimeout: 400
      connectionDraining: true
      connectionDrainingTimeout: 400
      tags:
        Name: foobar-elb
Note on ECDSA Key Algorithm
If the ARN of the ssl_certificate_id 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.
Create LoadBalancer Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LoadBalancer(name: string, args: LoadBalancerArgs, opts?: CustomResourceOptions);@overload
def LoadBalancer(resource_name: str,
                 args: LoadBalancerArgs,
                 opts: Optional[ResourceOptions] = None)
@overload
def LoadBalancer(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 listeners: Optional[Sequence[LoadBalancerListenerArgs]] = None,
                 instances: Optional[Sequence[str]] = None,
                 idle_timeout: Optional[int] = None,
                 connection_draining_timeout: Optional[int] = None,
                 cross_zone_load_balancing: Optional[bool] = None,
                 internal: Optional[bool] = None,
                 health_check: Optional[LoadBalancerHealthCheckArgs] = None,
                 connection_draining: Optional[bool] = None,
                 access_logs: Optional[LoadBalancerAccessLogsArgs] = None,
                 desync_mitigation_mode: Optional[str] = None,
                 availability_zones: Optional[Sequence[str]] = None,
                 name: Optional[str] = None,
                 name_prefix: Optional[str] = None,
                 security_groups: Optional[Sequence[str]] = None,
                 source_security_group: Optional[str] = None,
                 subnets: Optional[Sequence[str]] = None,
                 tags: Optional[Mapping[str, str]] = None)func NewLoadBalancer(ctx *Context, name string, args LoadBalancerArgs, opts ...ResourceOption) (*LoadBalancer, error)public LoadBalancer(string name, LoadBalancerArgs args, CustomResourceOptions? opts = null)
public LoadBalancer(String name, LoadBalancerArgs args)
public LoadBalancer(String name, LoadBalancerArgs args, CustomResourceOptions options)
type: aws:elb:LoadBalancer
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args LoadBalancerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args LoadBalancerArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args LoadBalancerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LoadBalancerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LoadBalancerArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var awsLoadBalancerResource = new Aws.Elb.LoadBalancer("awsLoadBalancerResource", new()
{
    Listeners = new[]
    {
        new Aws.Elb.Inputs.LoadBalancerListenerArgs
        {
            InstancePort = 0,
            InstanceProtocol = "string",
            LbPort = 0,
            LbProtocol = "string",
            SslCertificateId = "string",
        },
    },
    Instances = new[]
    {
        "string",
    },
    IdleTimeout = 0,
    ConnectionDrainingTimeout = 0,
    CrossZoneLoadBalancing = false,
    Internal = false,
    HealthCheck = new Aws.Elb.Inputs.LoadBalancerHealthCheckArgs
    {
        HealthyThreshold = 0,
        Interval = 0,
        Target = "string",
        Timeout = 0,
        UnhealthyThreshold = 0,
    },
    ConnectionDraining = false,
    AccessLogs = new Aws.Elb.Inputs.LoadBalancerAccessLogsArgs
    {
        Bucket = "string",
        BucketPrefix = "string",
        Enabled = false,
        Interval = 0,
    },
    DesyncMitigationMode = "string",
    AvailabilityZones = new[]
    {
        "string",
    },
    Name = "string",
    NamePrefix = "string",
    SecurityGroups = new[]
    {
        "string",
    },
    SourceSecurityGroup = "string",
    Subnets = new[]
    {
        "string",
    },
    Tags = 
    {
        { "string", "string" },
    },
});
example, err := elb.NewLoadBalancer(ctx, "awsLoadBalancerResource", &elb.LoadBalancerArgs{
	Listeners: elb.LoadBalancerListenerArray{
		&elb.LoadBalancerListenerArgs{
			InstancePort:     pulumi.Int(0),
			InstanceProtocol: pulumi.String("string"),
			LbPort:           pulumi.Int(0),
			LbProtocol:       pulumi.String("string"),
			SslCertificateId: pulumi.String("string"),
		},
	},
	Instances: pulumi.StringArray{
		pulumi.String("string"),
	},
	IdleTimeout:               pulumi.Int(0),
	ConnectionDrainingTimeout: pulumi.Int(0),
	CrossZoneLoadBalancing:    pulumi.Bool(false),
	Internal:                  pulumi.Bool(false),
	HealthCheck: &elb.LoadBalancerHealthCheckArgs{
		HealthyThreshold:   pulumi.Int(0),
		Interval:           pulumi.Int(0),
		Target:             pulumi.String("string"),
		Timeout:            pulumi.Int(0),
		UnhealthyThreshold: pulumi.Int(0),
	},
	ConnectionDraining: pulumi.Bool(false),
	AccessLogs: &elb.LoadBalancerAccessLogsArgs{
		Bucket:       pulumi.String("string"),
		BucketPrefix: pulumi.String("string"),
		Enabled:      pulumi.Bool(false),
		Interval:     pulumi.Int(0),
	},
	DesyncMitigationMode: pulumi.String("string"),
	AvailabilityZones: pulumi.StringArray{
		pulumi.String("string"),
	},
	Name:       pulumi.String("string"),
	NamePrefix: pulumi.String("string"),
	SecurityGroups: pulumi.StringArray{
		pulumi.String("string"),
	},
	SourceSecurityGroup: pulumi.String("string"),
	Subnets: pulumi.StringArray{
		pulumi.String("string"),
	},
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
var awsLoadBalancerResource = new LoadBalancer("awsLoadBalancerResource", LoadBalancerArgs.builder()
    .listeners(LoadBalancerListenerArgs.builder()
        .instancePort(0)
        .instanceProtocol("string")
        .lbPort(0)
        .lbProtocol("string")
        .sslCertificateId("string")
        .build())
    .instances("string")
    .idleTimeout(0)
    .connectionDrainingTimeout(0)
    .crossZoneLoadBalancing(false)
    .internal(false)
    .healthCheck(LoadBalancerHealthCheckArgs.builder()
        .healthyThreshold(0)
        .interval(0)
        .target("string")
        .timeout(0)
        .unhealthyThreshold(0)
        .build())
    .connectionDraining(false)
    .accessLogs(LoadBalancerAccessLogsArgs.builder()
        .bucket("string")
        .bucketPrefix("string")
        .enabled(false)
        .interval(0)
        .build())
    .desyncMitigationMode("string")
    .availabilityZones("string")
    .name("string")
    .namePrefix("string")
    .securityGroups("string")
    .sourceSecurityGroup("string")
    .subnets("string")
    .tags(Map.of("string", "string"))
    .build());
aws_load_balancer_resource = aws.elb.LoadBalancer("awsLoadBalancerResource",
    listeners=[{
        "instance_port": 0,
        "instance_protocol": "string",
        "lb_port": 0,
        "lb_protocol": "string",
        "ssl_certificate_id": "string",
    }],
    instances=["string"],
    idle_timeout=0,
    connection_draining_timeout=0,
    cross_zone_load_balancing=False,
    internal=False,
    health_check={
        "healthy_threshold": 0,
        "interval": 0,
        "target": "string",
        "timeout": 0,
        "unhealthy_threshold": 0,
    },
    connection_draining=False,
    access_logs={
        "bucket": "string",
        "bucket_prefix": "string",
        "enabled": False,
        "interval": 0,
    },
    desync_mitigation_mode="string",
    availability_zones=["string"],
    name="string",
    name_prefix="string",
    security_groups=["string"],
    source_security_group="string",
    subnets=["string"],
    tags={
        "string": "string",
    })
const awsLoadBalancerResource = new aws.elb.LoadBalancer("awsLoadBalancerResource", {
    listeners: [{
        instancePort: 0,
        instanceProtocol: "string",
        lbPort: 0,
        lbProtocol: "string",
        sslCertificateId: "string",
    }],
    instances: ["string"],
    idleTimeout: 0,
    connectionDrainingTimeout: 0,
    crossZoneLoadBalancing: false,
    internal: false,
    healthCheck: {
        healthyThreshold: 0,
        interval: 0,
        target: "string",
        timeout: 0,
        unhealthyThreshold: 0,
    },
    connectionDraining: false,
    accessLogs: {
        bucket: "string",
        bucketPrefix: "string",
        enabled: false,
        interval: 0,
    },
    desyncMitigationMode: "string",
    availabilityZones: ["string"],
    name: "string",
    namePrefix: "string",
    securityGroups: ["string"],
    sourceSecurityGroup: "string",
    subnets: ["string"],
    tags: {
        string: "string",
    },
});
type: aws:elb:LoadBalancer
properties:
    accessLogs:
        bucket: string
        bucketPrefix: string
        enabled: false
        interval: 0
    availabilityZones:
        - string
    connectionDraining: false
    connectionDrainingTimeout: 0
    crossZoneLoadBalancing: false
    desyncMitigationMode: string
    healthCheck:
        healthyThreshold: 0
        interval: 0
        target: string
        timeout: 0
        unhealthyThreshold: 0
    idleTimeout: 0
    instances:
        - string
    internal: false
    listeners:
        - instancePort: 0
          instanceProtocol: string
          lbPort: 0
          lbProtocol: string
          sslCertificateId: string
    name: string
    namePrefix: string
    securityGroups:
        - string
    sourceSecurityGroup: string
    subnets:
        - string
    tags:
        string: string
LoadBalancer Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The LoadBalancer resource accepts the following input properties:
- Listeners
List<LoadBalancer Listener> 
- A list of listener blocks. Listeners documented below.
- AccessLogs LoadBalancer Access Logs 
- An Access Logs block. Access Logs documented below.
- AvailabilityZones List<string>
- The AZ's to serve traffic in.
- ConnectionDraining bool
- Boolean to enable connection draining. Default: false
- ConnectionDraining intTimeout 
- The time in seconds to allow for connections to drain. Default: 300
- CrossZone boolLoad Balancing 
- Enable cross-zone load balancing. Default: true
- DesyncMitigation stringMode 
- 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.
- HealthCheck LoadBalancer Health Check 
- A health_check block. Health Check documented below.
- IdleTimeout int
- The time in seconds that the connection is allowed to be idle. Default: 60
- Instances List<string>
- A list of instance ids to place in the ELB pool.
- Internal bool
- If true, ELB will be an internal ELB.
- Name string
- The name of the ELB. By default generated by this provider.
- NamePrefix string
- Creates a unique name beginning with the specified
prefix. Conflicts with name.
- SecurityGroups List<string>
- A list of security group IDs to assign to the ELB. Only valid if creating an ELB within a VPC
- SourceSecurity stringGroup 
- 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.
- Subnets List<string>
- 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.
- Dictionary<string, string>
- A map of tags to assign to the resource. If configured with a provider - default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.- Exactly one of - availability_zonesor- subnetsmust be specified: this determines if the ELB exists in a VPC or in EC2-classic.
- Listeners
[]LoadBalancer Listener Args 
- A list of listener blocks. Listeners documented below.
- AccessLogs LoadBalancer Access Logs Args 
- An Access Logs block. Access Logs documented below.
- AvailabilityZones []string
- The AZ's to serve traffic in.
- ConnectionDraining bool
- Boolean to enable connection draining. Default: false
- ConnectionDraining intTimeout 
- The time in seconds to allow for connections to drain. Default: 300
- CrossZone boolLoad Balancing 
- Enable cross-zone load balancing. Default: true
- DesyncMitigation stringMode 
- 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.
- HealthCheck LoadBalancer Health Check Args 
- A health_check block. Health Check documented below.
- IdleTimeout int
- The time in seconds that the connection is allowed to be idle. Default: 60
- Instances []string
- A list of instance ids to place in the ELB pool.
- Internal bool
- If true, ELB will be an internal ELB.
- Name string
- The name of the ELB. By default generated by this provider.
- NamePrefix string
- Creates a unique name beginning with the specified
prefix. Conflicts with name.
- SecurityGroups []string
- A list of security group IDs to assign to the ELB. Only valid if creating an ELB within a VPC
- SourceSecurity stringGroup 
- 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.
- Subnets []string
- 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.
- map[string]string
- A map of tags to assign to the resource. If configured with a provider - default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.- Exactly one of - availability_zonesor- subnetsmust be specified: this determines if the ELB exists in a VPC or in EC2-classic.
- listeners
List<LoadBalancer Listener> 
- A list of listener blocks. Listeners documented below.
- accessLogs LoadBalancer Access Logs 
- An Access Logs block. Access Logs documented below.
- availabilityZones List<String>
- The AZ's to serve traffic in.
- connectionDraining Boolean
- Boolean to enable connection draining. Default: false
- connectionDraining IntegerTimeout 
- The time in seconds to allow for connections to drain. Default: 300
- crossZone BooleanLoad Balancing 
- Enable cross-zone load balancing. Default: true
- desyncMitigation StringMode 
- 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.
- healthCheck LoadBalancer Health Check 
- A health_check block. Health Check documented below.
- idleTimeout Integer
- The time in seconds that the connection is allowed to be idle. Default: 60
- instances List<String>
- A list of instance ids to place in the ELB pool.
- internal Boolean
- If true, ELB will be an internal ELB.
- name String
- The name of the ELB. By default generated by this provider.
- namePrefix String
- Creates a unique name beginning with the specified
prefix. Conflicts with name.
- securityGroups List<String>
- A list of security group IDs to assign to the ELB. Only valid if creating an ELB within a VPC
- sourceSecurity StringGroup 
- 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.
- subnets List<String>
- 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.
- Map<String,String>
- A map of tags to assign to the resource. If configured with a provider - default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.- Exactly one of - availability_zonesor- subnetsmust be specified: this determines if the ELB exists in a VPC or in EC2-classic.
- listeners
LoadBalancer Listener[] 
- A list of listener blocks. Listeners documented below.
- accessLogs LoadBalancer Access Logs 
- An Access Logs block. Access Logs documented below.
- availabilityZones string[]
- The AZ's to serve traffic in.
- connectionDraining boolean
- Boolean to enable connection draining. Default: false
- connectionDraining numberTimeout 
- The time in seconds to allow for connections to drain. Default: 300
- crossZone booleanLoad Balancing 
- Enable cross-zone load balancing. Default: true
- desyncMitigation stringMode 
- 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.
- healthCheck LoadBalancer Health Check 
- A health_check block. Health Check documented below.
- idleTimeout number
- The time in seconds that the connection is allowed to be idle. Default: 60
- instances string[]
- A list of instance ids to place in the ELB pool.
- internal boolean
- If true, ELB will be an internal ELB.
- name string
- The name of the ELB. By default generated by this provider.
- namePrefix string
- Creates a unique name beginning with the specified
prefix. Conflicts with name.
- securityGroups string[]
- A list of security group IDs to assign to the ELB. Only valid if creating an ELB within a VPC
- sourceSecurity stringGroup 
- 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.
- subnets string[]
- 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.
- {[key: string]: string}
- A map of tags to assign to the resource. If configured with a provider - default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.- Exactly one of - availability_zonesor- subnetsmust be specified: this determines if the ELB exists in a VPC or in EC2-classic.
- listeners
Sequence[LoadBalancer Listener Args] 
- A list of listener blocks. Listeners documented below.
- access_logs LoadBalancer Access Logs Args 
- An Access Logs block. Access Logs documented below.
- availability_zones Sequence[str]
- The AZ's to serve traffic in.
- connection_draining bool
- Boolean to enable connection draining. Default: false
- connection_draining_ inttimeout 
- The time in seconds to allow for connections to drain. Default: 300
- cross_zone_ boolload_ balancing 
- Enable cross-zone load balancing. Default: true
- desync_mitigation_ strmode 
- 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.
- health_check LoadBalancer Health Check Args 
- A health_check block. Health Check documented below.
- idle_timeout int
- The time in seconds that the connection is allowed to be idle. Default: 60
- instances Sequence[str]
- A list of instance ids to place in the ELB pool.
- internal bool
- If true, ELB will be an internal ELB.
- name str
- The name of the ELB. By default generated by this provider.
- name_prefix str
- Creates a unique name beginning with the specified
prefix. Conflicts with name.
- security_groups Sequence[str]
- A list of security group IDs to assign to the ELB. Only valid if creating an ELB within a VPC
- source_security_ strgroup 
- 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.
- subnets Sequence[str]
- 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.
- Mapping[str, str]
- A map of tags to assign to the resource. If configured with a provider - default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.- Exactly one of - availability_zonesor- subnetsmust be specified: this determines if the ELB exists in a VPC or in EC2-classic.
- listeners List<Property Map>
- A list of listener blocks. Listeners documented below.
- accessLogs Property Map
- An Access Logs block. Access Logs documented below.
- availabilityZones List<String>
- The AZ's to serve traffic in.
- connectionDraining Boolean
- Boolean to enable connection draining. Default: false
- connectionDraining NumberTimeout 
- The time in seconds to allow for connections to drain. Default: 300
- crossZone BooleanLoad Balancing 
- Enable cross-zone load balancing. Default: true
- desyncMitigation StringMode 
- 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.
- healthCheck Property Map
- A health_check block. Health Check documented below.
- idleTimeout Number
- The time in seconds that the connection is allowed to be idle. Default: 60
- instances List<String>
- A list of instance ids to place in the ELB pool.
- internal Boolean
- If true, ELB will be an internal ELB.
- name String
- The name of the ELB. By default generated by this provider.
- namePrefix String
- Creates a unique name beginning with the specified
prefix. Conflicts with name.
- securityGroups List<String>
- A list of security group IDs to assign to the ELB. Only valid if creating an ELB within a VPC
- sourceSecurity StringGroup 
- 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.
- subnets List<String>
- 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.
- Map<String>
- A map of tags to assign to the resource. If configured with a provider - default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.- Exactly one of - availability_zonesor- subnetsmust be specified: this determines if the ELB exists in a VPC or in EC2-classic.
Outputs
All input properties are implicitly available as output properties. Additionally, the LoadBalancer resource produces the following output properties:
- Arn string
- The ARN of the ELB
- DnsName string
- The DNS name of the ELB
- Id string
- The provider-assigned unique ID for this managed resource.
- SourceSecurity stringGroup Id 
- 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.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- ZoneId string
- The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record)
- Arn string
- The ARN of the ELB
- DnsName string
- The DNS name of the ELB
- Id string
- The provider-assigned unique ID for this managed resource.
- SourceSecurity stringGroup Id 
- 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.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- ZoneId string
- The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record)
- arn String
- The ARN of the ELB
- dnsName String
- The DNS name of the ELB
- id String
- The provider-assigned unique ID for this managed resource.
- sourceSecurity StringGroup Id 
- 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.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- zoneId String
- The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record)
- arn string
- The ARN of the ELB
- dnsName string
- The DNS name of the ELB
- id string
- The provider-assigned unique ID for this managed resource.
- sourceSecurity stringGroup Id 
- 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.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- zoneId string
- The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record)
- arn str
- The ARN of the ELB
- dns_name str
- The DNS name of the ELB
- id str
- The provider-assigned unique ID for this managed resource.
- source_security_ strgroup_ id 
- 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.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- zone_id str
- The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record)
- arn String
- The ARN of the ELB
- dnsName String
- The DNS name of the ELB
- id String
- The provider-assigned unique ID for this managed resource.
- sourceSecurity StringGroup Id 
- 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.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- zoneId String
- The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record)
Look up Existing LoadBalancer Resource
Get an existing LoadBalancer resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: LoadBalancerState, opts?: CustomResourceOptions): LoadBalancer@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        access_logs: Optional[LoadBalancerAccessLogsArgs] = None,
        arn: Optional[str] = None,
        availability_zones: Optional[Sequence[str]] = None,
        connection_draining: Optional[bool] = None,
        connection_draining_timeout: Optional[int] = None,
        cross_zone_load_balancing: Optional[bool] = None,
        desync_mitigation_mode: Optional[str] = None,
        dns_name: Optional[str] = None,
        health_check: Optional[LoadBalancerHealthCheckArgs] = None,
        idle_timeout: Optional[int] = None,
        instances: Optional[Sequence[str]] = None,
        internal: Optional[bool] = None,
        listeners: Optional[Sequence[LoadBalancerListenerArgs]] = None,
        name: Optional[str] = None,
        name_prefix: Optional[str] = None,
        security_groups: Optional[Sequence[str]] = None,
        source_security_group: Optional[str] = None,
        source_security_group_id: Optional[str] = None,
        subnets: Optional[Sequence[str]] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None,
        zone_id: Optional[str] = None) -> LoadBalancerfunc GetLoadBalancer(ctx *Context, name string, id IDInput, state *LoadBalancerState, opts ...ResourceOption) (*LoadBalancer, error)public static LoadBalancer Get(string name, Input<string> id, LoadBalancerState? state, CustomResourceOptions? opts = null)public static LoadBalancer get(String name, Output<String> id, LoadBalancerState state, CustomResourceOptions options)resources:  _:    type: aws:elb:LoadBalancer    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- AccessLogs LoadBalancer Access Logs 
- An Access Logs block. Access Logs documented below.
- Arn string
- The ARN of the ELB
- AvailabilityZones List<string>
- The AZ's to serve traffic in.
- ConnectionDraining bool
- Boolean to enable connection draining. Default: false
- ConnectionDraining intTimeout 
- The time in seconds to allow for connections to drain. Default: 300
- CrossZone boolLoad Balancing 
- Enable cross-zone load balancing. Default: true
- DesyncMitigation stringMode 
- 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.
- DnsName string
- The DNS name of the ELB
- HealthCheck LoadBalancer Health Check 
- A health_check block. Health Check documented below.
- IdleTimeout int
- The time in seconds that the connection is allowed to be idle. Default: 60
- Instances List<string>
- A list of instance ids to place in the ELB pool.
- Internal bool
- If true, ELB will be an internal ELB.
- Listeners
List<LoadBalancer Listener> 
- A list of listener blocks. Listeners documented below.
- Name string
- The name of the ELB. By default generated by this provider.
- NamePrefix string
- Creates a unique name beginning with the specified
prefix. Conflicts with name.
- SecurityGroups List<string>
- A list of security group IDs to assign to the ELB. Only valid if creating an ELB within a VPC
- SourceSecurity stringGroup 
- 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.
- SourceSecurity stringGroup Id 
- 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.
- Subnets List<string>
- 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.
- Dictionary<string, string>
- A map of tags to assign to the resource. If configured with a provider - default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.- Exactly one of - availability_zonesor- subnetsmust be specified: this determines if the ELB exists in a VPC or in EC2-classic.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- ZoneId string
- The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record)
- AccessLogs LoadBalancer Access Logs Args 
- An Access Logs block. Access Logs documented below.
- Arn string
- The ARN of the ELB
- AvailabilityZones []string
- The AZ's to serve traffic in.
- ConnectionDraining bool
- Boolean to enable connection draining. Default: false
- ConnectionDraining intTimeout 
- The time in seconds to allow for connections to drain. Default: 300
- CrossZone boolLoad Balancing 
- Enable cross-zone load balancing. Default: true
- DesyncMitigation stringMode 
- 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.
- DnsName string
- The DNS name of the ELB
- HealthCheck LoadBalancer Health Check Args 
- A health_check block. Health Check documented below.
- IdleTimeout int
- The time in seconds that the connection is allowed to be idle. Default: 60
- Instances []string
- A list of instance ids to place in the ELB pool.
- Internal bool
- If true, ELB will be an internal ELB.
- Listeners
[]LoadBalancer Listener Args 
- A list of listener blocks. Listeners documented below.
- Name string
- The name of the ELB. By default generated by this provider.
- NamePrefix string
- Creates a unique name beginning with the specified
prefix. Conflicts with name.
- SecurityGroups []string
- A list of security group IDs to assign to the ELB. Only valid if creating an ELB within a VPC
- SourceSecurity stringGroup 
- 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.
- SourceSecurity stringGroup Id 
- 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.
- Subnets []string
- 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.
- map[string]string
- A map of tags to assign to the resource. If configured with a provider - default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.- Exactly one of - availability_zonesor- subnetsmust be specified: this determines if the ELB exists in a VPC or in EC2-classic.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- ZoneId string
- The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record)
- accessLogs LoadBalancer Access Logs 
- An Access Logs block. Access Logs documented below.
- arn String
- The ARN of the ELB
- availabilityZones List<String>
- The AZ's to serve traffic in.
- connectionDraining Boolean
- Boolean to enable connection draining. Default: false
- connectionDraining IntegerTimeout 
- The time in seconds to allow for connections to drain. Default: 300
- crossZone BooleanLoad Balancing 
- Enable cross-zone load balancing. Default: true
- desyncMitigation StringMode 
- 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.
- dnsName String
- The DNS name of the ELB
- healthCheck LoadBalancer Health Check 
- A health_check block. Health Check documented below.
- idleTimeout Integer
- The time in seconds that the connection is allowed to be idle. Default: 60
- instances List<String>
- A list of instance ids to place in the ELB pool.
- internal Boolean
- If true, ELB will be an internal ELB.
- listeners
List<LoadBalancer Listener> 
- A list of listener blocks. Listeners documented below.
- name String
- The name of the ELB. By default generated by this provider.
- namePrefix String
- Creates a unique name beginning with the specified
prefix. Conflicts with name.
- securityGroups List<String>
- A list of security group IDs to assign to the ELB. Only valid if creating an ELB within a VPC
- sourceSecurity StringGroup 
- 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.
- sourceSecurity StringGroup Id 
- 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.
- subnets List<String>
- 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.
- Map<String,String>
- A map of tags to assign to the resource. If configured with a provider - default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.- Exactly one of - availability_zonesor- subnetsmust be specified: this determines if the ELB exists in a VPC or in EC2-classic.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- zoneId String
- The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record)
- accessLogs LoadBalancer Access Logs 
- An Access Logs block. Access Logs documented below.
- arn string
- The ARN of the ELB
- availabilityZones string[]
- The AZ's to serve traffic in.
- connectionDraining boolean
- Boolean to enable connection draining. Default: false
- connectionDraining numberTimeout 
- The time in seconds to allow for connections to drain. Default: 300
- crossZone booleanLoad Balancing 
- Enable cross-zone load balancing. Default: true
- desyncMitigation stringMode 
- 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.
- dnsName string
- The DNS name of the ELB
- healthCheck LoadBalancer Health Check 
- A health_check block. Health Check documented below.
- idleTimeout number
- The time in seconds that the connection is allowed to be idle. Default: 60
- instances string[]
- A list of instance ids to place in the ELB pool.
- internal boolean
- If true, ELB will be an internal ELB.
- listeners
LoadBalancer Listener[] 
- A list of listener blocks. Listeners documented below.
- name string
- The name of the ELB. By default generated by this provider.
- namePrefix string
- Creates a unique name beginning with the specified
prefix. Conflicts with name.
- securityGroups string[]
- A list of security group IDs to assign to the ELB. Only valid if creating an ELB within a VPC
- sourceSecurity stringGroup 
- 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.
- sourceSecurity stringGroup Id 
- 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.
- subnets string[]
- 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.
- {[key: string]: string}
- A map of tags to assign to the resource. If configured with a provider - default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.- Exactly one of - availability_zonesor- subnetsmust be specified: this determines if the ELB exists in a VPC or in EC2-classic.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- zoneId string
- The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record)
- access_logs LoadBalancer Access Logs Args 
- An Access Logs block. Access Logs documented below.
- arn str
- The ARN of the ELB
- availability_zones Sequence[str]
- The AZ's to serve traffic in.
- connection_draining bool
- Boolean to enable connection draining. Default: false
- connection_draining_ inttimeout 
- The time in seconds to allow for connections to drain. Default: 300
- cross_zone_ boolload_ balancing 
- Enable cross-zone load balancing. Default: true
- desync_mitigation_ strmode 
- 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.
- dns_name str
- The DNS name of the ELB
- health_check LoadBalancer Health Check Args 
- A health_check block. Health Check documented below.
- idle_timeout int
- The time in seconds that the connection is allowed to be idle. Default: 60
- instances Sequence[str]
- A list of instance ids to place in the ELB pool.
- internal bool
- If true, ELB will be an internal ELB.
- listeners
Sequence[LoadBalancer Listener Args] 
- A list of listener blocks. Listeners documented below.
- name str
- The name of the ELB. By default generated by this provider.
- name_prefix str
- Creates a unique name beginning with the specified
prefix. Conflicts with name.
- security_groups Sequence[str]
- A list of security group IDs to assign to the ELB. Only valid if creating an ELB within a VPC
- source_security_ strgroup 
- 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.
- source_security_ strgroup_ id 
- 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.
- subnets Sequence[str]
- 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.
- Mapping[str, str]
- A map of tags to assign to the resource. If configured with a provider - default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.- Exactly one of - availability_zonesor- subnetsmust be specified: this determines if the ELB exists in a VPC or in EC2-classic.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- zone_id str
- The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record)
- accessLogs Property Map
- An Access Logs block. Access Logs documented below.
- arn String
- The ARN of the ELB
- availabilityZones List<String>
- The AZ's to serve traffic in.
- connectionDraining Boolean
- Boolean to enable connection draining. Default: false
- connectionDraining NumberTimeout 
- The time in seconds to allow for connections to drain. Default: 300
- crossZone BooleanLoad Balancing 
- Enable cross-zone load balancing. Default: true
- desyncMitigation StringMode 
- 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.
- dnsName String
- The DNS name of the ELB
- healthCheck Property Map
- A health_check block. Health Check documented below.
- idleTimeout Number
- The time in seconds that the connection is allowed to be idle. Default: 60
- instances List<String>
- A list of instance ids to place in the ELB pool.
- internal Boolean
- If true, ELB will be an internal ELB.
- listeners List<Property Map>
- A list of listener blocks. Listeners documented below.
- name String
- The name of the ELB. By default generated by this provider.
- namePrefix String
- Creates a unique name beginning with the specified
prefix. Conflicts with name.
- securityGroups List<String>
- A list of security group IDs to assign to the ELB. Only valid if creating an ELB within a VPC
- sourceSecurity StringGroup 
- 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.
- sourceSecurity StringGroup Id 
- 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.
- subnets List<String>
- 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.
- Map<String>
- A map of tags to assign to the resource. If configured with a provider - default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.- Exactly one of - availability_zonesor- subnetsmust be specified: this determines if the ELB exists in a VPC or in EC2-classic.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- zoneId String
- The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record)
Supporting Types
LoadBalancerAccessLogs, LoadBalancerAccessLogsArgs        
- Bucket string
- The S3 bucket name to store the logs in.
- BucketPrefix string
- The S3 bucket prefix. Logs are stored in the root if not configured.
- Enabled bool
- Boolean to enable / disable access_logs. Default istrue
- Interval int
- The publishing interval in minutes. Valid values: 5and60. Default:60
- Bucket string
- The S3 bucket name to store the logs in.
- BucketPrefix string
- The S3 bucket prefix. Logs are stored in the root if not configured.
- Enabled bool
- Boolean to enable / disable access_logs. Default istrue
- Interval int
- The publishing interval in minutes. Valid values: 5and60. Default:60
- bucket String
- The S3 bucket name to store the logs in.
- bucketPrefix String
- The S3 bucket prefix. Logs are stored in the root if not configured.
- enabled Boolean
- Boolean to enable / disable access_logs. Default istrue
- interval Integer
- The publishing interval in minutes. Valid values: 5and60. Default:60
- bucket string
- The S3 bucket name to store the logs in.
- bucketPrefix string
- The S3 bucket prefix. Logs are stored in the root if not configured.
- enabled boolean
- Boolean to enable / disable access_logs. Default istrue
- interval number
- The publishing interval in minutes. Valid values: 5and60. Default:60
- bucket str
- The S3 bucket name to store the logs in.
- bucket_prefix str
- The S3 bucket prefix. Logs are stored in the root if not configured.
- enabled bool
- Boolean to enable / disable access_logs. Default istrue
- interval int
- The publishing interval in minutes. Valid values: 5and60. Default:60
- bucket String
- The S3 bucket name to store the logs in.
- bucketPrefix String
- The S3 bucket prefix. Logs are stored in the root if not configured.
- enabled Boolean
- Boolean to enable / disable access_logs. Default istrue
- interval Number
- The publishing interval in minutes. Valid values: 5and60. Default:60
LoadBalancerHealthCheck, LoadBalancerHealthCheckArgs        
- HealthyThreshold int
- The number of checks before the instance is declared healthy.
- Interval int
- The interval between checks.
- Target string
- The target of the check. Valid pattern is "${PROTOCOL}:${PORT}${PATH}", where PROTOCOL
values are:- HTTP,- HTTPS- PORT and PATH are required
- TCP,- SSL- PORT is required, PATH is not supported
 
- Timeout int
- The length of time before the check times out.
- UnhealthyThreshold int
- The number of checks before the instance is declared unhealthy.
- HealthyThreshold int
- The number of checks before the instance is declared healthy.
- Interval int
- The interval between checks.
- Target string
- The target of the check. Valid pattern is "${PROTOCOL}:${PORT}${PATH}", where PROTOCOL
values are:- HTTP,- HTTPS- PORT and PATH are required
- TCP,- SSL- PORT is required, PATH is not supported
 
- Timeout int
- The length of time before the check times out.
- UnhealthyThreshold int
- The number of checks before the instance is declared unhealthy.
- healthyThreshold Integer
- The number of checks before the instance is declared healthy.
- interval Integer
- The interval between checks.
- target String
- The target of the check. Valid pattern is "${PROTOCOL}:${PORT}${PATH}", where PROTOCOL
values are:- HTTP,- HTTPS- PORT and PATH are required
- TCP,- SSL- PORT is required, PATH is not supported
 
- timeout Integer
- The length of time before the check times out.
- unhealthyThreshold Integer
- The number of checks before the instance is declared unhealthy.
- healthyThreshold number
- The number of checks before the instance is declared healthy.
- interval number
- The interval between checks.
- target string
- The target of the check. Valid pattern is "${PROTOCOL}:${PORT}${PATH}", where PROTOCOL
values are:- HTTP,- HTTPS- PORT and PATH are required
- TCP,- SSL- PORT is required, PATH is not supported
 
- timeout number
- The length of time before the check times out.
- unhealthyThreshold number
- The number of checks before the instance is declared unhealthy.
- healthy_threshold int
- The number of checks before the instance is declared healthy.
- interval int
- The interval between checks.
- target str
- The target of the check. Valid pattern is "${PROTOCOL}:${PORT}${PATH}", where PROTOCOL
values are:- HTTP,- HTTPS- PORT and PATH are required
- TCP,- SSL- PORT is required, PATH is not supported
 
- timeout int
- The length of time before the check times out.
- unhealthy_threshold int
- The number of checks before the instance is declared unhealthy.
- healthyThreshold Number
- The number of checks before the instance is declared healthy.
- interval Number
- The interval between checks.
- target String
- The target of the check. Valid pattern is "${PROTOCOL}:${PORT}${PATH}", where PROTOCOL
values are:- HTTP,- HTTPS- PORT and PATH are required
- TCP,- SSL- PORT is required, PATH is not supported
 
- timeout Number
- The length of time before the check times out.
- unhealthyThreshold Number
- The number of checks before the instance is declared unhealthy.
LoadBalancerListener, LoadBalancerListenerArgs      
- InstancePort int
- The port on the instance to route to
- InstanceProtocol string
- The protocol to use to the instance. Valid
values are HTTP,HTTPS,TCP, orSSL
- LbPort int
- The port to listen on for the load balancer
- LbProtocol string
- The protocol to listen on. Valid values are HTTP,HTTPS,TCP, orSSL
- SslCertificate stringId 
- The ARN of an SSL certificate you have
uploaded to AWS IAM. Note ECDSA-specific restrictions below. Only valid when lb_protocolis either HTTPS or SSL
- InstancePort int
- The port on the instance to route to
- InstanceProtocol string
- The protocol to use to the instance. Valid
values are HTTP,HTTPS,TCP, orSSL
- LbPort int
- The port to listen on for the load balancer
- LbProtocol string
- The protocol to listen on. Valid values are HTTP,HTTPS,TCP, orSSL
- SslCertificate stringId 
- The ARN of an SSL certificate you have
uploaded to AWS IAM. Note ECDSA-specific restrictions below. Only valid when lb_protocolis either HTTPS or SSL
- instancePort Integer
- The port on the instance to route to
- instanceProtocol String
- The protocol to use to the instance. Valid
values are HTTP,HTTPS,TCP, orSSL
- lbPort Integer
- The port to listen on for the load balancer
- lbProtocol String
- The protocol to listen on. Valid values are HTTP,HTTPS,TCP, orSSL
- sslCertificate StringId 
- The ARN of an SSL certificate you have
uploaded to AWS IAM. Note ECDSA-specific restrictions below. Only valid when lb_protocolis either HTTPS or SSL
- instancePort number
- The port on the instance to route to
- instanceProtocol string
- The protocol to use to the instance. Valid
values are HTTP,HTTPS,TCP, orSSL
- lbPort number
- The port to listen on for the load balancer
- lbProtocol string
- The protocol to listen on. Valid values are HTTP,HTTPS,TCP, orSSL
- sslCertificate stringId 
- The ARN of an SSL certificate you have
uploaded to AWS IAM. Note ECDSA-specific restrictions below. Only valid when lb_protocolis either HTTPS or SSL
- instance_port int
- The port on the instance to route to
- instance_protocol str
- The protocol to use to the instance. Valid
values are HTTP,HTTPS,TCP, orSSL
- lb_port int
- The port to listen on for the load balancer
- lb_protocol str
- The protocol to listen on. Valid values are HTTP,HTTPS,TCP, orSSL
- ssl_certificate_ strid 
- The ARN of an SSL certificate you have
uploaded to AWS IAM. Note ECDSA-specific restrictions below. Only valid when lb_protocolis either HTTPS or SSL
- instancePort Number
- The port on the instance to route to
- instanceProtocol String
- The protocol to use to the instance. Valid
values are HTTP,HTTPS,TCP, orSSL
- lbPort Number
- The port to listen on for the load balancer
- lbProtocol String
- The protocol to listen on. Valid values are HTTP,HTTPS,TCP, orSSL
- sslCertificate StringId 
- The ARN of an SSL certificate you have
uploaded to AWS IAM. Note ECDSA-specific restrictions below. Only valid when lb_protocolis either HTTPS or SSL
Import
Using pulumi import, import ELBs using the name. For example:
$ pulumi import aws:elb/loadBalancer:LoadBalancer bar elb-production-12345
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.