AwsElasticloadbalancingAlbArgs

interface AwsElasticloadbalancingAlbArgs extends Omit<aws.lb.LoadBalancerArgs, 'desyncMitigationMode' | 'dropInvalidHeaderFields' | 'enableDeletionProtection' | 'enableWafFailOpen' | 'internal' | 'loadBalancerType' | 'name' | 'namePrefix' | 'tags'> { accessLogs?: Input<LoadBalancerAccessLogs | undefined>; clientKeepAlive?: Input<number | undefined>; connectionLogs?: Input<LoadBalancerConnectionLogs | undefined>; customerOwnedIpv4Pool?: Input<string | undefined>; dnsRecordClientRoutingPolicy?: Input<string | undefined>; enableCrossZoneLoadBalancing?: Input<boolean | undefined>; enableHttp2?: Input<boolean | undefined>; enablePrefixForIpv6SourceNat?: Input<string | undefined>; enableTlsVersionAndCipherSuiteHeaders?: Input<boolean | undefined>; enableXffClientPort?: Input<boolean | undefined>; enableZonalShift?: Input<boolean | undefined>; enforceSecurityGroupInboundRulesOnPrivateLinkTraffic?: Input<string | undefined>; healthCheckLogs?: Input<LoadBalancerHealthCheckLogs | undefined>; idleTimeout?: Input<number | undefined>; internetFacing?: boolean; ipAddressType?: Input<string | undefined>; ipamPools?: Input<LoadBalancerIpamPools | undefined>; listeners?: Record<string, AwsElasticloadbalancingListenerArgs>; minimumLoadBalancerCapacity?: Input<LoadBalancerMinimumLoadBalancerCapacity | undefined>; name: string; preserveHostHeader?: Input<boolean | undefined>; region?: Input<string | undefined>; secondaryIpsAutoAssignedPerSubnet?: Input<number | undefined>; securityGroups?: Input<Input<string>[] | undefined>; subnetMappings?: Input<Input<LoadBalancerSubnetMapping>[] | undefined>; subnets?: Input<Input<string>[] | undefined>; tags?: Input<Record<string, Input<string>>>; xffHeaderProcessingMode?: Input<string | undefined>; }

ALB capability input.

Remarks

The component always creates an application load balancer (loadBalancerType = 'application') and keeps it private by default.

Example

CODE
const alb = {
  name: 'platform',
  internetFacing: false,
  subnets: ['subnet-1', 'subnet-2'],
  securityGroups: ['sg-123'],
  listeners: {
    https: {
      port: 443,
      protocol: 'HTTPS',
      certificate: { type: 'existing', arn: 'arn:aws:acm:...:certificate/abc123' },
      defaultActions: [{ type: 'forward', targetGroup }],
    },
  },
};

Hierarchy

  • LoadBalancerArgs, "desyncMitigationMode" | "dropInvalidHeaderFields" | "enableDeletionProtection" | "enableWafFailOpen" | "internal" | "loadBalancerType" | "name" | "namePrefix" | "tags">
  • AwsElasticloadbalancingAlbArgs

Properties

accessLogs: Input<LoadBalancerAccessLogs | undefined>

Inherited from accessLogs

Access Logs block. See below.

clientKeepAlive: Input<number | undefined>

Inherited from clientKeepAlive

Client keep alive value in seconds. The valid range is 60-604800 seconds. The default is 3600 seconds.

connectionLogs: Input<LoadBalancerConnectionLogs | undefined>

Inherited from connectionLogs

Connection Logs block. See below. Only valid for Load Balancers of type application.

customerOwnedIpv4Pool: Input<string | undefined>

Inherited from customerOwnedIpv4Pool

ID of the customer owned ipv4 pool to use for this load balancer.

dnsRecordClientRoutingPolicy: Input<string | undefined>

Inherited from dnsRecordClientRoutingPolicy

How traffic is distributed among the load balancer Availability Zones. Possible values are anyAvailabilityZone (default), availabilityZoneAffinity, or partialAvailabilityZoneAffinity. See Availability Zone DNS affinity for additional details. Only valid for network type load balancers.

enableCrossZoneLoadBalancing: Input<boolean | undefined>

Inherited from enableCrossZoneLoadBalancing

If true, cross-zone load balancing of the load balancer will be enabled. For network and gateway type load balancers, this feature is disabled by default (false). For application load balancer this feature is always enabled (true) and cannot be disabled. Defaults to false.

enableHttp2: Input<boolean | undefined>

Inherited from enableHttp2

Whether HTTP/2 is enabled in application load balancers. Defaults to true.

enablePrefixForIpv6SourceNat: Input<string | undefined>

Inherited from enablePrefixForIpv6SourceNat

Whether to use an IPv6 prefix from each subnet for source NAT. ipAddressType must be dualstack. Valid values: on, off.

enableTlsVersionAndCipherSuiteHeaders: Input<boolean | undefined>

Inherited from enableTlsVersionAndCipherSuiteHeaders

Whether the two headers (x-amzn-tls-version and x-amzn-tls-cipher-suite), which contain information about the negotiated TLS version and cipher suite, are added to the client request before sending it to the target. Only valid for Load Balancers of type application. Defaults to false

enableXffClientPort: Input<boolean | undefined>

Inherited from enableXffClientPort

Whether the X-Forwarded-For header should preserve the source port that the client used to connect to the load balancer in application load balancers. Defaults to false.

enableZonalShift: Input<boolean | undefined>

Inherited from enableZonalShift

Whether zonal shift is enabled. Defaults to false.

enforceSecurityGroupInboundRulesOnPrivateLinkTraffic: Input<string | undefined>

Inherited from enforceSecurityGroupInboundRulesOnPrivateLinkTraffic

Whether inbound security group rules are enforced for traffic originating from a PrivateLink. Only valid for Load Balancers of type network. The possible values are on and off.

healthCheckLogs: Input<LoadBalancerHealthCheckLogs | undefined>

Inherited from healthCheckLogs

Health Check Logs block. See below. Only valid for Load Balancers of type application.

idleTimeout: Input<number | undefined>

Inherited from idleTimeout

Time in seconds that the connection is allowed to be idle. Only valid for Load Balancers of type application. Default: 60.

internetFacing: boolean

Public/private mode switch. Defaults to private (false).

ipAddressType: Input<string | undefined>

Inherited from ipAddressType

Type of IP addresses used by the subnets for your load balancer. The possible values depend upon the load balancer type: ipv4 (all load balancer types), dualstack (all load balancer types), and dualstack-without-public-ipv4 (type application only).

ipamPools: Input<LoadBalancerIpamPools | undefined>

Inherited from ipamPools

. The IPAM pools to use with the load balancer. Only valid for Load Balancers of type application. See ipamPools for more information.

listeners: Record<string, AwsElasticloadbalancingListenerArgs>

Listeners created under the ALB capability boundary.

minimumLoadBalancerCapacity: Input<LoadBalancerMinimumLoadBalancerCapacity | undefined>

Inherited from minimumLoadBalancerCapacity

Minimum capacity for a load balancer. Only valid for Load Balancers of type application or network.

name: string

Required ALB purpose used for naming style 2 and logical identity derivation.

preserveHostHeader: Input<boolean | undefined>

Inherited from preserveHostHeader

Whether the Application Load Balancer should preserve the Host header in the HTTP request and send it to the target without any change. Defaults to false.

region: Input<string | undefined>

Inherited from region

Region where this resource will be managed. Defaults to the Region set in the provider configuration.

secondaryIpsAutoAssignedPerSubnet: Input<number | undefined>

Inherited from secondaryIpsAutoAssignedPerSubnet

The number of secondary IP addresses to configure for your load balancer nodes. Only valid for Load Balancers of type network. The valid range is 0-7. When decreased, this will force a recreation of the resource. Default: 0.

securityGroups: Input<Input<string>[] | undefined>

Inherited from securityGroups

List of security group IDs to assign to the LB. Only valid for Load Balancers of type application or network. For load balancers of type network security groups cannot be added if none are currently present, and cannot all be removed once added. If either of these conditions are met, this will force a recreation of the resource.

subnetMappings: Input<Input<LoadBalancerSubnetMapping>[] | undefined>

Inherited from subnetMappings

Subnet mapping block. See below. For Load Balancers of type network subnet mappings can only be added.

subnets: Input<Input<string>[] | undefined>

Inherited from subnets

List of subnet IDs to attach to the LB. For Load Balancers of type network subnets can only be added (see Availability Zones), deleting a subnet for load balancers of type network will force a recreation of the resource.

tags: Input<Record<string, Input<string>>>

Additional tags merged with default project/environment tags.

xffHeaderProcessingMode: Input<string | undefined>

Inherited from xffHeaderProcessingMode

Determines how the load balancer modifies the X-Forwarded-For header in the HTTP request before sending the request to the target. The possible values are append, preserve, and remove. Only valid for Load Balancers of type application. The default is append.

NOTE: Please note that internal LBs can only use ipv4 as the ipAddressType. You can only change to dualstack ipAddressType if the selected subnets are IPv6 enabled.

NOTE: Please note that one of either subnets or subnetMapping is required.