Skip to main content
Providers

Listener

A resource of the AWS provider, version 0.3.0, in its Load Balancing group. Import it with:

import Listener from "aws/loadbalancing"

Example

resource Listener example {
    loadBalancerArn       = "example-value"
    port                  = 3.14
    protocol              = "HTTP"
    certificateArn        = "example-value"
    sslPolicy             = "example-value"
    alpnPolicy            = "example-value"
    defaultTargetGroupArn = "example-value"
    defaultActionType     = "forward"
    redirectConfig        = "..."
    fixedResponseConfig   = "..."
    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.

NameTypeDefaultRequiredDescription
loadBalancerArnstring—NoThe ARN of the load balancer
portnumber—NoThe port on which the listener listens
protocolstring—NoThe protocol for the listener Allowed: "HTTP", "HTTPS", "TCP", "TLS", "UDP", "TCP_UDP", "GENEVE"
certificateArnstring—NoThe ARN of the default SSL server certificate (HTTPS/TLS only)
sslPolicystring—NoThe SSL policy for HTTPS/TLS listeners
alpnPolicystring—NoThe ALPN policy for TLS listeners (NLB only)
defaultTargetGroupArnstring—NoThe ARN of the default target group for forward action
defaultActionTypestring"forward"NoThe default action type Allowed: "forward", "redirect", "fixed-response"
redirectConfigany—NoRedirect configuration when defaultActionType is 'redirect'
fixedResponseConfigany—NoFixed response configuration when defaultActionType is 'fixed-response'
tagsobject—NoTags to apply to the listener

Set by AWS after the resource is created: your code can read them but not set them. An importable one identifies an existing resource.

NameTypeImportableDescription
arnstringYesThe ARN of the listener

On this page