LoadBalancer
A resource of the AWS provider, version 0.3.0, in its Load Balancing group. Import it with:
import LoadBalancer from "aws/loadbalancing"Example
resource LoadBalancer example {
name = "example-value"
type = "application"
scheme = "internet-facing"
subnets = "..."
securityGroups = "..."
ipAddressType = "ipv4"
deletionProtection = false
crossZoneLoadBalancing = true
enableHttp2 = true
idleTimeout = 60
accessLogsEnabled = false
accessLogsBucket = "example-value"
accessLogsPrefix = "example-value"
tags = "..."
}Properties
Set by your code in the resource block. A required one must be set; any other you leave out takes the value under Default, if it has one.
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | string | — | No | The name of the load balancer. Must be unique within your AWS account |
type | string | "application" | No | The type of load balancer Allowed: "application", "network", "gateway" |
scheme | string | "internet-facing" | No | The scheme for the load balancer Allowed: "internet-facing", "internal" |
subnets | any[] | — | No | The subnet IDs. At least two in different Availability Zones |
securityGroups | any[] | — | No | The security group IDs. Required for ALB, not applicable for NLB |
ipAddressType | string | "ipv4" | No | The IP address type Allowed: "ipv4", "dualstack" |
deletionProtection | boolean | false | No | Enable deletion protection |
crossZoneLoadBalancing | boolean | — | No | Enable cross-zone load balancing |
enableHttp2 | boolean | true | No | Enable HTTP/2 support (ALB only) |
idleTimeout | number | 60 | No | Idle timeout in seconds (ALB only) |
accessLogsEnabled | boolean | false | No | Enable access logs |
accessLogsBucket | string | — | No | S3 bucket for access logs |
accessLogsPrefix | string | — | No | S3 bucket prefix for access logs |
tags | object | — | No | Tags to apply to the load balancer |
Set by AWS after the resource is created: your code can read them but not set them. An importable one identifies an existing resource.
| Name | Type | Importable | Description |
|---|---|---|---|
arn | string | Yes | The Amazon Resource Name (ARN) of the load balancer |
dnsName | string | No | The DNS name of the load balancer |
canonicalHostedZoneId | string | No | The canonical hosted zone ID of the load balancer |
vpcId | string | No | The VPC ID of the load balancer |
state | string | No | The current state of the load balancer |
availabilityZones | any[] | No | The Availability Zones for the load balancer |