Documentation ¶
Index ¶
- type ApplicationLoadBalancer
- type ApplicationLoadBalancerArgs
- type ApplicationLoadBalancerArray
- func (ApplicationLoadBalancerArray) ElementType() reflect.Type
- func (i ApplicationLoadBalancerArray) ToApplicationLoadBalancerArrayOutput() ApplicationLoadBalancerArrayOutput
- func (i ApplicationLoadBalancerArray) ToApplicationLoadBalancerArrayOutputWithContext(ctx context.Context) ApplicationLoadBalancerArrayOutput
- type ApplicationLoadBalancerArrayInput
- type ApplicationLoadBalancerArrayOutput
- func (ApplicationLoadBalancerArrayOutput) ElementType() reflect.Type
- func (o ApplicationLoadBalancerArrayOutput) Index(i pulumi.IntInput) ApplicationLoadBalancerOutput
- func (o ApplicationLoadBalancerArrayOutput) ToApplicationLoadBalancerArrayOutput() ApplicationLoadBalancerArrayOutput
- func (o ApplicationLoadBalancerArrayOutput) ToApplicationLoadBalancerArrayOutputWithContext(ctx context.Context) ApplicationLoadBalancerArrayOutput
- type ApplicationLoadBalancerInput
- type ApplicationLoadBalancerMap
- func (ApplicationLoadBalancerMap) ElementType() reflect.Type
- func (i ApplicationLoadBalancerMap) ToApplicationLoadBalancerMapOutput() ApplicationLoadBalancerMapOutput
- func (i ApplicationLoadBalancerMap) ToApplicationLoadBalancerMapOutputWithContext(ctx context.Context) ApplicationLoadBalancerMapOutput
- type ApplicationLoadBalancerMapInput
- type ApplicationLoadBalancerMapOutput
- func (ApplicationLoadBalancerMapOutput) ElementType() reflect.Type
- func (o ApplicationLoadBalancerMapOutput) MapIndex(k pulumi.StringInput) ApplicationLoadBalancerOutput
- func (o ApplicationLoadBalancerMapOutput) ToApplicationLoadBalancerMapOutput() ApplicationLoadBalancerMapOutput
- func (o ApplicationLoadBalancerMapOutput) ToApplicationLoadBalancerMapOutputWithContext(ctx context.Context) ApplicationLoadBalancerMapOutput
- type ApplicationLoadBalancerOutput
- func (o ApplicationLoadBalancerOutput) DefaultSecurityGroup() ec2.SecurityGroupOutput
- func (o ApplicationLoadBalancerOutput) DefaultTargetGroup() lb.TargetGroupOutput
- func (ApplicationLoadBalancerOutput) ElementType() reflect.Type
- func (o ApplicationLoadBalancerOutput) Listeners() lb.ListenerArrayOutput
- func (o ApplicationLoadBalancerOutput) LoadBalancer() lb.LoadBalancerOutput
- func (o ApplicationLoadBalancerOutput) ToApplicationLoadBalancerOutput() ApplicationLoadBalancerOutput
- func (o ApplicationLoadBalancerOutput) ToApplicationLoadBalancerOutputWithContext(ctx context.Context) ApplicationLoadBalancerOutput
- func (o ApplicationLoadBalancerOutput) VpcId() pulumi.StringPtrOutput
- type Listener
- type ListenerArgs
- func (ListenerArgs) ElementType() reflect.Type
- func (i ListenerArgs) ToListenerOutput() ListenerOutput
- func (i ListenerArgs) ToListenerOutputWithContext(ctx context.Context) ListenerOutput
- func (i ListenerArgs) ToListenerPtrOutput() ListenerPtrOutput
- func (i ListenerArgs) ToListenerPtrOutputWithContext(ctx context.Context) ListenerPtrOutput
- type ListenerArray
- type ListenerArrayInput
- type ListenerArrayOutput
- type ListenerInput
- type ListenerOutput
- func (o ListenerOutput) AlpnPolicy() pulumi.StringPtrOutput
- func (o ListenerOutput) CertificateArn() pulumi.StringPtrOutput
- func (o ListenerOutput) DefaultActions() lb.ListenerDefaultActionArrayOutput
- func (ListenerOutput) ElementType() reflect.Type
- func (o ListenerOutput) MutualAuthentication() lb.ListenerMutualAuthenticationPtrOutput
- func (o ListenerOutput) Port() pulumi.IntPtrOutput
- func (o ListenerOutput) Protocol() pulumi.StringPtrOutput
- func (o ListenerOutput) SslPolicy() pulumi.StringPtrOutput
- func (o ListenerOutput) Tags() pulumi.StringMapOutput
- func (o ListenerOutput) TcpIdleTimeoutSeconds() pulumi.IntPtrOutput
- func (o ListenerOutput) ToListenerOutput() ListenerOutput
- func (o ListenerOutput) ToListenerOutputWithContext(ctx context.Context) ListenerOutput
- func (o ListenerOutput) ToListenerPtrOutput() ListenerPtrOutput
- func (o ListenerOutput) ToListenerPtrOutputWithContext(ctx context.Context) ListenerPtrOutput
- type ListenerPtrInput
- type ListenerPtrOutput
- func (o ListenerPtrOutput) AlpnPolicy() pulumi.StringPtrOutput
- func (o ListenerPtrOutput) CertificateArn() pulumi.StringPtrOutput
- func (o ListenerPtrOutput) DefaultActions() lb.ListenerDefaultActionArrayOutput
- func (o ListenerPtrOutput) Elem() ListenerOutput
- func (ListenerPtrOutput) ElementType() reflect.Type
- func (o ListenerPtrOutput) MutualAuthentication() lb.ListenerMutualAuthenticationPtrOutput
- func (o ListenerPtrOutput) Port() pulumi.IntPtrOutput
- func (o ListenerPtrOutput) Protocol() pulumi.StringPtrOutput
- func (o ListenerPtrOutput) SslPolicy() pulumi.StringPtrOutput
- func (o ListenerPtrOutput) Tags() pulumi.StringMapOutput
- func (o ListenerPtrOutput) TcpIdleTimeoutSeconds() pulumi.IntPtrOutput
- func (o ListenerPtrOutput) ToListenerPtrOutput() ListenerPtrOutput
- func (o ListenerPtrOutput) ToListenerPtrOutputWithContext(ctx context.Context) ListenerPtrOutput
- type NetworkLoadBalancer
- type NetworkLoadBalancerArgs
- type NetworkLoadBalancerArray
- type NetworkLoadBalancerArrayInput
- type NetworkLoadBalancerArrayOutput
- func (NetworkLoadBalancerArrayOutput) ElementType() reflect.Type
- func (o NetworkLoadBalancerArrayOutput) Index(i pulumi.IntInput) NetworkLoadBalancerOutput
- func (o NetworkLoadBalancerArrayOutput) ToNetworkLoadBalancerArrayOutput() NetworkLoadBalancerArrayOutput
- func (o NetworkLoadBalancerArrayOutput) ToNetworkLoadBalancerArrayOutputWithContext(ctx context.Context) NetworkLoadBalancerArrayOutput
- type NetworkLoadBalancerInput
- type NetworkLoadBalancerMap
- type NetworkLoadBalancerMapInput
- type NetworkLoadBalancerMapOutput
- func (NetworkLoadBalancerMapOutput) ElementType() reflect.Type
- func (o NetworkLoadBalancerMapOutput) MapIndex(k pulumi.StringInput) NetworkLoadBalancerOutput
- func (o NetworkLoadBalancerMapOutput) ToNetworkLoadBalancerMapOutput() NetworkLoadBalancerMapOutput
- func (o NetworkLoadBalancerMapOutput) ToNetworkLoadBalancerMapOutputWithContext(ctx context.Context) NetworkLoadBalancerMapOutput
- type NetworkLoadBalancerOutput
- func (o NetworkLoadBalancerOutput) DefaultTargetGroup() lb.TargetGroupOutput
- func (NetworkLoadBalancerOutput) ElementType() reflect.Type
- func (o NetworkLoadBalancerOutput) Listeners() lb.ListenerArrayOutput
- func (o NetworkLoadBalancerOutput) LoadBalancer() lb.LoadBalancerOutput
- func (o NetworkLoadBalancerOutput) ToNetworkLoadBalancerOutput() NetworkLoadBalancerOutput
- func (o NetworkLoadBalancerOutput) ToNetworkLoadBalancerOutputWithContext(ctx context.Context) NetworkLoadBalancerOutput
- func (o NetworkLoadBalancerOutput) VpcId() pulumi.StringPtrOutput
- type TargetGroup
- type TargetGroupArgs
- func (TargetGroupArgs) ElementType() reflect.Type
- func (i TargetGroupArgs) ToTargetGroupOutput() TargetGroupOutput
- func (i TargetGroupArgs) ToTargetGroupOutputWithContext(ctx context.Context) TargetGroupOutput
- func (i TargetGroupArgs) ToTargetGroupPtrOutput() TargetGroupPtrOutput
- func (i TargetGroupArgs) ToTargetGroupPtrOutputWithContext(ctx context.Context) TargetGroupPtrOutput
- type TargetGroupAttachment
- type TargetGroupAttachmentArgs
- type TargetGroupAttachmentArray
- func (TargetGroupAttachmentArray) ElementType() reflect.Type
- func (i TargetGroupAttachmentArray) ToTargetGroupAttachmentArrayOutput() TargetGroupAttachmentArrayOutput
- func (i TargetGroupAttachmentArray) ToTargetGroupAttachmentArrayOutputWithContext(ctx context.Context) TargetGroupAttachmentArrayOutput
- type TargetGroupAttachmentArrayInput
- type TargetGroupAttachmentArrayOutput
- func (TargetGroupAttachmentArrayOutput) ElementType() reflect.Type
- func (o TargetGroupAttachmentArrayOutput) Index(i pulumi.IntInput) TargetGroupAttachmentOutput
- func (o TargetGroupAttachmentArrayOutput) ToTargetGroupAttachmentArrayOutput() TargetGroupAttachmentArrayOutput
- func (o TargetGroupAttachmentArrayOutput) ToTargetGroupAttachmentArrayOutputWithContext(ctx context.Context) TargetGroupAttachmentArrayOutput
- type TargetGroupAttachmentInput
- type TargetGroupAttachmentMap
- type TargetGroupAttachmentMapInput
- type TargetGroupAttachmentMapOutput
- func (TargetGroupAttachmentMapOutput) ElementType() reflect.Type
- func (o TargetGroupAttachmentMapOutput) MapIndex(k pulumi.StringInput) TargetGroupAttachmentOutput
- func (o TargetGroupAttachmentMapOutput) ToTargetGroupAttachmentMapOutput() TargetGroupAttachmentMapOutput
- func (o TargetGroupAttachmentMapOutput) ToTargetGroupAttachmentMapOutputWithContext(ctx context.Context) TargetGroupAttachmentMapOutput
- type TargetGroupAttachmentOutput
- func (TargetGroupAttachmentOutput) ElementType() reflect.Type
- func (o TargetGroupAttachmentOutput) LambdaPermission() lambda.PermissionOutput
- func (o TargetGroupAttachmentOutput) TargetGroupAttachment() lb.TargetGroupAttachmentOutput
- func (o TargetGroupAttachmentOutput) ToTargetGroupAttachmentOutput() TargetGroupAttachmentOutput
- func (o TargetGroupAttachmentOutput) ToTargetGroupAttachmentOutputWithContext(ctx context.Context) TargetGroupAttachmentOutput
- type TargetGroupInput
- type TargetGroupOutput
- func (o TargetGroupOutput) ConnectionTermination() pulumi.BoolPtrOutput
- func (o TargetGroupOutput) DeregistrationDelay() pulumi.IntPtrOutput
- func (TargetGroupOutput) ElementType() reflect.Type
- func (o TargetGroupOutput) HealthCheck() lb.TargetGroupHealthCheckPtrOutput
- func (o TargetGroupOutput) IpAddressType() pulumi.StringPtrOutput
- func (o TargetGroupOutput) LambdaMultiValueHeadersEnabled() pulumi.BoolPtrOutput
- func (o TargetGroupOutput) LoadBalancingAlgorithmType() pulumi.StringPtrOutput
- func (o TargetGroupOutput) LoadBalancingAnomalyMitigation() pulumi.StringPtrOutput
- func (o TargetGroupOutput) LoadBalancingCrossZoneEnabled() pulumi.StringPtrOutput
- func (o TargetGroupOutput) Name() pulumi.StringPtrOutput
- func (o TargetGroupOutput) NamePrefix() pulumi.StringPtrOutput
- func (o TargetGroupOutput) Port() pulumi.IntPtrOutput
- func (o TargetGroupOutput) PreserveClientIp() pulumi.StringPtrOutput
- func (o TargetGroupOutput) Protocol() pulumi.StringPtrOutput
- func (o TargetGroupOutput) ProtocolVersion() pulumi.StringPtrOutput
- func (o TargetGroupOutput) ProxyProtocolV2() pulumi.BoolPtrOutput
- func (o TargetGroupOutput) SlowStart() pulumi.IntPtrOutput
- func (o TargetGroupOutput) Stickiness() lb.TargetGroupStickinessPtrOutput
- func (o TargetGroupOutput) Tags() pulumi.StringMapOutput
- func (o TargetGroupOutput) TargetFailovers() lb.TargetGroupTargetFailoverArrayOutput
- func (o TargetGroupOutput) TargetGroupHealth() lb.TargetGroupTargetGroupHealthPtrOutput
- func (o TargetGroupOutput) TargetHealthStates() lb.TargetGroupTargetHealthStateArrayOutput
- func (o TargetGroupOutput) TargetType() pulumi.StringPtrOutput
- func (o TargetGroupOutput) ToTargetGroupOutput() TargetGroupOutput
- func (o TargetGroupOutput) ToTargetGroupOutputWithContext(ctx context.Context) TargetGroupOutput
- func (o TargetGroupOutput) ToTargetGroupPtrOutput() TargetGroupPtrOutput
- func (o TargetGroupOutput) ToTargetGroupPtrOutputWithContext(ctx context.Context) TargetGroupPtrOutput
- func (o TargetGroupOutput) VpcId() pulumi.StringPtrOutput
- type TargetGroupPtrInput
- type TargetGroupPtrOutput
- func (o TargetGroupPtrOutput) ConnectionTermination() pulumi.BoolPtrOutput
- func (o TargetGroupPtrOutput) DeregistrationDelay() pulumi.IntPtrOutput
- func (o TargetGroupPtrOutput) Elem() TargetGroupOutput
- func (TargetGroupPtrOutput) ElementType() reflect.Type
- func (o TargetGroupPtrOutput) HealthCheck() lb.TargetGroupHealthCheckPtrOutput
- func (o TargetGroupPtrOutput) IpAddressType() pulumi.StringPtrOutput
- func (o TargetGroupPtrOutput) LambdaMultiValueHeadersEnabled() pulumi.BoolPtrOutput
- func (o TargetGroupPtrOutput) LoadBalancingAlgorithmType() pulumi.StringPtrOutput
- func (o TargetGroupPtrOutput) LoadBalancingAnomalyMitigation() pulumi.StringPtrOutput
- func (o TargetGroupPtrOutput) LoadBalancingCrossZoneEnabled() pulumi.StringPtrOutput
- func (o TargetGroupPtrOutput) Name() pulumi.StringPtrOutput
- func (o TargetGroupPtrOutput) NamePrefix() pulumi.StringPtrOutput
- func (o TargetGroupPtrOutput) Port() pulumi.IntPtrOutput
- func (o TargetGroupPtrOutput) PreserveClientIp() pulumi.StringPtrOutput
- func (o TargetGroupPtrOutput) Protocol() pulumi.StringPtrOutput
- func (o TargetGroupPtrOutput) ProtocolVersion() pulumi.StringPtrOutput
- func (o TargetGroupPtrOutput) ProxyProtocolV2() pulumi.BoolPtrOutput
- func (o TargetGroupPtrOutput) SlowStart() pulumi.IntPtrOutput
- func (o TargetGroupPtrOutput) Stickiness() lb.TargetGroupStickinessPtrOutput
- func (o TargetGroupPtrOutput) Tags() pulumi.StringMapOutput
- func (o TargetGroupPtrOutput) TargetFailovers() lb.TargetGroupTargetFailoverArrayOutput
- func (o TargetGroupPtrOutput) TargetGroupHealth() lb.TargetGroupTargetGroupHealthPtrOutput
- func (o TargetGroupPtrOutput) TargetHealthStates() lb.TargetGroupTargetHealthStateArrayOutput
- func (o TargetGroupPtrOutput) TargetType() pulumi.StringPtrOutput
- func (o TargetGroupPtrOutput) ToTargetGroupPtrOutput() TargetGroupPtrOutput
- func (o TargetGroupPtrOutput) ToTargetGroupPtrOutputWithContext(ctx context.Context) TargetGroupPtrOutput
- func (o TargetGroupPtrOutput) VpcId() pulumi.StringPtrOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplicationLoadBalancer ¶
type ApplicationLoadBalancer struct { pulumi.ResourceState // Default security group, if auto-created DefaultSecurityGroup ec2.SecurityGroupOutput `pulumi:"defaultSecurityGroup"` // Default target group, if auto-created DefaultTargetGroup lb.TargetGroupOutput `pulumi:"defaultTargetGroup"` // Listeners created as part of this load balancer Listeners lb.ListenerArrayOutput `pulumi:"listeners"` // Underlying Load Balancer resource LoadBalancer lb.LoadBalancerOutput `pulumi:"loadBalancer"` // Id of the VPC in which this load balancer is operating VpcId pulumi.StringPtrOutput `pulumi:"vpcId"` }
Provides an Application Load Balancer resource with listeners, default target group and default security group.
func NewApplicationLoadBalancer ¶
func NewApplicationLoadBalancer(ctx *pulumi.Context, name string, args *ApplicationLoadBalancerArgs, opts ...pulumi.ResourceOption) (*ApplicationLoadBalancer, error)
NewApplicationLoadBalancer registers a new resource with the given unique name, arguments, and options.
func (*ApplicationLoadBalancer) ElementType ¶
func (*ApplicationLoadBalancer) ElementType() reflect.Type
func (*ApplicationLoadBalancer) ToApplicationLoadBalancerOutput ¶
func (i *ApplicationLoadBalancer) ToApplicationLoadBalancerOutput() ApplicationLoadBalancerOutput
func (*ApplicationLoadBalancer) ToApplicationLoadBalancerOutputWithContext ¶
func (i *ApplicationLoadBalancer) ToApplicationLoadBalancerOutputWithContext(ctx context.Context) ApplicationLoadBalancerOutput
type ApplicationLoadBalancerArgs ¶
type ApplicationLoadBalancerArgs struct { // Access Logs block. See below. AccessLogs lb.LoadBalancerAccessLogsPtrInput // Client keep alive value in seconds. The valid range is 60-604800 seconds. The default is 3600 seconds. ClientKeepAlive pulumi.IntPtrInput // Connection Logs block. See below. Only valid for Load Balancers of type `application`. ConnectionLogs lb.LoadBalancerConnectionLogsPtrInput // ID of the customer owned ipv4 pool to use for this load balancer. CustomerOwnedIpv4Pool pulumi.StringPtrInput // Options for creating a default security group if [securityGroups] not specified. DefaultSecurityGroup *awsx.DefaultSecurityGroupArgs // Options creating a default target group. DefaultTargetGroup *TargetGroupArgs // Port to use to connect with the target. Valid values are ports 1-65535. Defaults to 80. DefaultTargetGroupPort pulumi.IntPtrInput // 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`. DesyncMitigationMode pulumi.StringPtrInput // How traffic is distributed among the load balancer Availability Zones. Possible values are `any_availability_zone` (default), `availability_zone_affinity`, or `partial_availability_zone_affinity`. See [Availability Zone DNS affinity](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#zonal-dns-affinity) for additional details. Only valid for `network` type load balancers. DnsRecordClientRoutingPolicy pulumi.StringPtrInput // Whether HTTP headers with header fields that are not valid are removed by the load balancer (true) or routed to targets (false). The default is false. Elastic Load Balancing requires that message header names contain only alphanumeric characters and hyphens. Only valid for Load Balancers of type `application`. DropInvalidHeaderFields pulumi.BoolPtrInput // If true, deletion of the load balancer will be disabled via the AWS API. This will prevent this provider from deleting the load balancer. Defaults to `false`. EnableDeletionProtection pulumi.BoolPtrInput // Whether HTTP/2 is enabled in `application` load balancers. Defaults to `true`. EnableHttp2 pulumi.BoolPtrInput // 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` EnableTlsVersionAndCipherSuiteHeaders pulumi.BoolPtrInput // Whether to allow a WAF-enabled load balancer to route requests to targets if it is unable to forward the request to AWS WAF. Defaults to `false`. EnableWafFailOpen pulumi.BoolPtrInput // 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`. EnableXffClientPort pulumi.BoolPtrInput // Whether zonal shift is enabled. Defaults to `false`. EnableZonalShift pulumi.BoolPtrInput // 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`. EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic pulumi.StringPtrInput // Time in seconds that the connection is allowed to be idle. Only valid for Load Balancers of type `application`. Default: 60. IdleTimeout pulumi.IntPtrInput // If true, the LB will be internal. Defaults to `false`. Internal pulumi.BoolPtrInput // 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). IpAddressType pulumi.StringPtrInput // A listener to create. Only one of [listener] and [listeners] can be specified. Listener *ListenerArgs // List of listeners to create. Only one of [listener] and [listeners] can be specified. Listeners []ListenerArgs // Name of the LB. This name must be unique within your AWS account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen. If not specified, this provider will autogenerate a name beginning with `tf-lb`. Name pulumi.StringPtrInput // Creates a unique name beginning with the specified prefix. Conflicts with `name`. NamePrefix pulumi.StringPtrInput // 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`. PreserveHostHeader pulumi.BoolPtrInput // 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. SecurityGroups pulumi.StringArrayInput // List of subnet IDs to attach to the LB. For Load Balancers of type `network` subnets can only be added (see [Availability Zones](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#availability-zones)), deleting a subnet for load balancers of type `network` will force a recreation of the resource. SubnetIds pulumi.StringArrayInput // Subnet mapping block. See below. For Load Balancers of type `network` subnet mappings can only be added. SubnetMappings lb.LoadBalancerSubnetMappingArrayInput // A list of subnets to attach to the LB. Only one of [subnets], [subnetIds] or [subnetMappings] can be specified Subnets ec2.SubnetArrayInput // Map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. Tags pulumi.StringMapInput // 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`. XffHeaderProcessingMode pulumi.StringPtrInput }
The set of arguments for constructing a ApplicationLoadBalancer resource.
func (ApplicationLoadBalancerArgs) ElementType ¶
func (ApplicationLoadBalancerArgs) ElementType() reflect.Type
type ApplicationLoadBalancerArray ¶
type ApplicationLoadBalancerArray []ApplicationLoadBalancerInput
func (ApplicationLoadBalancerArray) ElementType ¶
func (ApplicationLoadBalancerArray) ElementType() reflect.Type
func (ApplicationLoadBalancerArray) ToApplicationLoadBalancerArrayOutput ¶
func (i ApplicationLoadBalancerArray) ToApplicationLoadBalancerArrayOutput() ApplicationLoadBalancerArrayOutput
func (ApplicationLoadBalancerArray) ToApplicationLoadBalancerArrayOutputWithContext ¶
func (i ApplicationLoadBalancerArray) ToApplicationLoadBalancerArrayOutputWithContext(ctx context.Context) ApplicationLoadBalancerArrayOutput
type ApplicationLoadBalancerArrayInput ¶
type ApplicationLoadBalancerArrayInput interface { pulumi.Input ToApplicationLoadBalancerArrayOutput() ApplicationLoadBalancerArrayOutput ToApplicationLoadBalancerArrayOutputWithContext(context.Context) ApplicationLoadBalancerArrayOutput }
ApplicationLoadBalancerArrayInput is an input type that accepts ApplicationLoadBalancerArray and ApplicationLoadBalancerArrayOutput values. You can construct a concrete instance of `ApplicationLoadBalancerArrayInput` via:
ApplicationLoadBalancerArray{ ApplicationLoadBalancerArgs{...} }
type ApplicationLoadBalancerArrayOutput ¶
type ApplicationLoadBalancerArrayOutput struct{ *pulumi.OutputState }
func (ApplicationLoadBalancerArrayOutput) ElementType ¶
func (ApplicationLoadBalancerArrayOutput) ElementType() reflect.Type
func (ApplicationLoadBalancerArrayOutput) Index ¶
func (o ApplicationLoadBalancerArrayOutput) Index(i pulumi.IntInput) ApplicationLoadBalancerOutput
func (ApplicationLoadBalancerArrayOutput) ToApplicationLoadBalancerArrayOutput ¶
func (o ApplicationLoadBalancerArrayOutput) ToApplicationLoadBalancerArrayOutput() ApplicationLoadBalancerArrayOutput
func (ApplicationLoadBalancerArrayOutput) ToApplicationLoadBalancerArrayOutputWithContext ¶
func (o ApplicationLoadBalancerArrayOutput) ToApplicationLoadBalancerArrayOutputWithContext(ctx context.Context) ApplicationLoadBalancerArrayOutput
type ApplicationLoadBalancerInput ¶
type ApplicationLoadBalancerInput interface { pulumi.Input ToApplicationLoadBalancerOutput() ApplicationLoadBalancerOutput ToApplicationLoadBalancerOutputWithContext(ctx context.Context) ApplicationLoadBalancerOutput }
type ApplicationLoadBalancerMap ¶
type ApplicationLoadBalancerMap map[string]ApplicationLoadBalancerInput
func (ApplicationLoadBalancerMap) ElementType ¶
func (ApplicationLoadBalancerMap) ElementType() reflect.Type
func (ApplicationLoadBalancerMap) ToApplicationLoadBalancerMapOutput ¶
func (i ApplicationLoadBalancerMap) ToApplicationLoadBalancerMapOutput() ApplicationLoadBalancerMapOutput
func (ApplicationLoadBalancerMap) ToApplicationLoadBalancerMapOutputWithContext ¶
func (i ApplicationLoadBalancerMap) ToApplicationLoadBalancerMapOutputWithContext(ctx context.Context) ApplicationLoadBalancerMapOutput
type ApplicationLoadBalancerMapInput ¶
type ApplicationLoadBalancerMapInput interface { pulumi.Input ToApplicationLoadBalancerMapOutput() ApplicationLoadBalancerMapOutput ToApplicationLoadBalancerMapOutputWithContext(context.Context) ApplicationLoadBalancerMapOutput }
ApplicationLoadBalancerMapInput is an input type that accepts ApplicationLoadBalancerMap and ApplicationLoadBalancerMapOutput values. You can construct a concrete instance of `ApplicationLoadBalancerMapInput` via:
ApplicationLoadBalancerMap{ "key": ApplicationLoadBalancerArgs{...} }
type ApplicationLoadBalancerMapOutput ¶
type ApplicationLoadBalancerMapOutput struct{ *pulumi.OutputState }
func (ApplicationLoadBalancerMapOutput) ElementType ¶
func (ApplicationLoadBalancerMapOutput) ElementType() reflect.Type
func (ApplicationLoadBalancerMapOutput) MapIndex ¶
func (o ApplicationLoadBalancerMapOutput) MapIndex(k pulumi.StringInput) ApplicationLoadBalancerOutput
func (ApplicationLoadBalancerMapOutput) ToApplicationLoadBalancerMapOutput ¶
func (o ApplicationLoadBalancerMapOutput) ToApplicationLoadBalancerMapOutput() ApplicationLoadBalancerMapOutput
func (ApplicationLoadBalancerMapOutput) ToApplicationLoadBalancerMapOutputWithContext ¶
func (o ApplicationLoadBalancerMapOutput) ToApplicationLoadBalancerMapOutputWithContext(ctx context.Context) ApplicationLoadBalancerMapOutput
type ApplicationLoadBalancerOutput ¶
type ApplicationLoadBalancerOutput struct{ *pulumi.OutputState }
func (ApplicationLoadBalancerOutput) DefaultSecurityGroup ¶
func (o ApplicationLoadBalancerOutput) DefaultSecurityGroup() ec2.SecurityGroupOutput
Default security group, if auto-created
func (ApplicationLoadBalancerOutput) DefaultTargetGroup ¶
func (o ApplicationLoadBalancerOutput) DefaultTargetGroup() lb.TargetGroupOutput
Default target group, if auto-created
func (ApplicationLoadBalancerOutput) ElementType ¶
func (ApplicationLoadBalancerOutput) ElementType() reflect.Type
func (ApplicationLoadBalancerOutput) Listeners ¶
func (o ApplicationLoadBalancerOutput) Listeners() lb.ListenerArrayOutput
Listeners created as part of this load balancer
func (ApplicationLoadBalancerOutput) LoadBalancer ¶
func (o ApplicationLoadBalancerOutput) LoadBalancer() lb.LoadBalancerOutput
Underlying Load Balancer resource
func (ApplicationLoadBalancerOutput) ToApplicationLoadBalancerOutput ¶
func (o ApplicationLoadBalancerOutput) ToApplicationLoadBalancerOutput() ApplicationLoadBalancerOutput
func (ApplicationLoadBalancerOutput) ToApplicationLoadBalancerOutputWithContext ¶
func (o ApplicationLoadBalancerOutput) ToApplicationLoadBalancerOutputWithContext(ctx context.Context) ApplicationLoadBalancerOutput
func (ApplicationLoadBalancerOutput) VpcId ¶
func (o ApplicationLoadBalancerOutput) VpcId() pulumi.StringPtrOutput
Id of the VPC in which this load balancer is operating
type Listener ¶
type Listener struct { // Name of the Application-Layer Protocol Negotiation (ALPN) policy. Can be set if `protocol` is `TLS`. Valid values are `HTTP1Only`, `HTTP2Only`, `HTTP2Optional`, `HTTP2Preferred`, and `None`. AlpnPolicy *string `pulumi:"alpnPolicy"` // ARN of the default SSL server certificate. Exactly one certificate is required if the protocol is HTTPS. For adding additional SSL certificates, see the `aws.lb.ListenerCertificate` resource. CertificateArn *string `pulumi:"certificateArn"` // Configuration block for default actions. See below. DefaultActions []lb.ListenerDefaultAction `pulumi:"defaultActions"` // The mutual authentication configuration information. See below. MutualAuthentication *lb.ListenerMutualAuthentication `pulumi:"mutualAuthentication"` // Port on which the load balancer is listening. Not valid for Gateway Load Balancers. Port *int `pulumi:"port"` // Protocol for connections from clients to the load balancer. For Application Load Balancers, valid values are `HTTP` and `HTTPS`, with a default of `HTTP`. For Network Load Balancers, valid values are `TCP`, `TLS`, `UDP`, and `TCP_UDP`. Not valid to use `UDP` or `TCP_UDP` if dual-stack mode is enabled. Not valid for Gateway Load Balancers. Protocol *string `pulumi:"protocol"` // Name of the SSL Policy for the listener. Required if `protocol` is `HTTPS` or `TLS`. Default is `ELBSecurityPolicy-2016-08`. SslPolicy *string `pulumi:"sslPolicy"` // A map of tags to assign to the resource. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. // // > **Note::** When a `Name` key is specified in the map, the AWS Console maps the value to the `Name Tag` column value inside the `Listener Rules` table within a specific load balancer listener page. Otherwise, the value resolves to `Default`. Tags map[string]string `pulumi:"tags"` // TCP idle timeout value in seconds. Can only be set if protocol is `TCP` on Network Load Balancer, or with a Gateway Load Balancer. Not supported for Application Load Balancers. Valid values are between `60` and `6000` inclusive. Default: `350`. TcpIdleTimeoutSeconds *int `pulumi:"tcpIdleTimeoutSeconds"` }
Provides a Load Balancer Listener resource.
> **Note:** `aws.alb.Listener` is known as `aws.lb.Listener`. The functionality is identical.
## Example Usage
### Forward Action
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { frontEnd, err := lb.NewLoadBalancer(ctx, "front_end", nil) if err != nil { return err } frontEndTargetGroup, err := lb.NewTargetGroup(ctx, "front_end", nil) if err != nil { return err } _, err = lb.NewListener(ctx, "front_end", &lb.ListenerArgs{ LoadBalancerArn: frontEnd.Arn, Port: pulumi.Int(443), Protocol: pulumi.String("HTTPS"), SslPolicy: pulumi.String("ELBSecurityPolicy-2016-08"), CertificateArn: pulumi.String("arn:aws:iam::187416307283:server-certificate/test_cert_rab3wuqwgja25ct3n4jdj2tzu4"), DefaultActions: lb.ListenerDefaultActionArray{ &lb.ListenerDefaultActionArgs{ Type: pulumi.String("forward"), TargetGroupArn: frontEndTargetGroup.Arn, }, }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
To a NLB:
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := lb.NewListener(ctx, "front_end", &lb.ListenerArgs{ LoadBalancerArn: pulumi.Any(frontEndAwsLb.Arn), Port: pulumi.Int(443), Protocol: pulumi.String("TLS"), SslPolicy: pulumi.String("ELBSecurityPolicy-2016-08"), CertificateArn: pulumi.String("arn:aws:iam::187416307283:server-certificate/test_cert_rab3wuqwgja25ct3n4jdj2tzu4"), AlpnPolicy: pulumi.String("HTTP2Preferred"), DefaultActions: lb.ListenerDefaultActionArray{ &lb.ListenerDefaultActionArgs{ Type: pulumi.String("forward"), TargetGroupArn: pulumi.Any(frontEndAwsLbTargetGroup.Arn), }, }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Redirect Action
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { frontEnd, err := lb.NewLoadBalancer(ctx, "front_end", nil) if err != nil { return err } _, err = lb.NewListener(ctx, "front_end", &lb.ListenerArgs{ LoadBalancerArn: frontEnd.Arn, Port: pulumi.Int(80), Protocol: pulumi.String("HTTP"), DefaultActions: lb.ListenerDefaultActionArray{ &lb.ListenerDefaultActionArgs{ Type: pulumi.String("redirect"), Redirect: &lb.ListenerDefaultActionRedirectArgs{ Port: pulumi.String("443"), Protocol: pulumi.String("HTTPS"), StatusCode: pulumi.String("HTTP_301"), }, }, }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Fixed-response Action
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { frontEnd, err := lb.NewLoadBalancer(ctx, "front_end", nil) if err != nil { return err } _, err = lb.NewListener(ctx, "front_end", &lb.ListenerArgs{ LoadBalancerArn: frontEnd.Arn, Port: pulumi.Int(80), Protocol: pulumi.String("HTTP"), DefaultActions: lb.ListenerDefaultActionArray{ &lb.ListenerDefaultActionArgs{ Type: pulumi.String("fixed-response"), FixedResponse: &lb.ListenerDefaultActionFixedResponseArgs{ ContentType: pulumi.String("text/plain"), MessageBody: pulumi.String("Fixed response content"), StatusCode: pulumi.String("200"), }, }, }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Authenticate-cognito Action
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cognito" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { frontEnd, err := lb.NewLoadBalancer(ctx, "front_end", nil) if err != nil { return err } frontEndTargetGroup, err := lb.NewTargetGroup(ctx, "front_end", nil) if err != nil { return err } pool, err := cognito.NewUserPool(ctx, "pool", nil) if err != nil { return err } client, err := cognito.NewUserPoolClient(ctx, "client", nil) if err != nil { return err } domain, err := cognito.NewUserPoolDomain(ctx, "domain", nil) if err != nil { return err } _, err = lb.NewListener(ctx, "front_end", &lb.ListenerArgs{ LoadBalancerArn: frontEnd.Arn, Port: pulumi.Int(80), Protocol: pulumi.String("HTTP"), DefaultActions: lb.ListenerDefaultActionArray{ &lb.ListenerDefaultActionArgs{ Type: pulumi.String("authenticate-cognito"), AuthenticateCognito: &lb.ListenerDefaultActionAuthenticateCognitoArgs{ UserPoolArn: pool.Arn, UserPoolClientId: client.ID(), UserPoolDomain: domain.Domain, }, }, &lb.ListenerDefaultActionArgs{ Type: pulumi.String("forward"), TargetGroupArn: frontEndTargetGroup.Arn, }, }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Authenticate-OIDC Action
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { frontEnd, err := lb.NewLoadBalancer(ctx, "front_end", nil) if err != nil { return err } frontEndTargetGroup, err := lb.NewTargetGroup(ctx, "front_end", nil) if err != nil { return err } _, err = lb.NewListener(ctx, "front_end", &lb.ListenerArgs{ LoadBalancerArn: frontEnd.Arn, Port: pulumi.Int(80), Protocol: pulumi.String("HTTP"), DefaultActions: lb.ListenerDefaultActionArray{ &lb.ListenerDefaultActionArgs{ Type: pulumi.String("authenticate-oidc"), AuthenticateOidc: &lb.ListenerDefaultActionAuthenticateOidcArgs{ AuthorizationEndpoint: pulumi.String("https://example.com/authorization_endpoint"), ClientId: pulumi.String("client_id"), ClientSecret: pulumi.String("client_secret"), Issuer: pulumi.String("https://example.com"), TokenEndpoint: pulumi.String("https://example.com/token_endpoint"), UserInfoEndpoint: pulumi.String("https://example.com/user_info_endpoint"), }, }, &lb.ListenerDefaultActionArgs{ Type: pulumi.String("forward"), TargetGroupArn: frontEndTargetGroup.Arn, }, }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Gateway Load Balancer Listener
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { example, err := lb.NewLoadBalancer(ctx, "example", &lb.LoadBalancerArgs{ LoadBalancerType: pulumi.String("gateway"), Name: pulumi.String("example"), SubnetMappings: lb.LoadBalancerSubnetMappingArray{ &lb.LoadBalancerSubnetMappingArgs{ SubnetId: pulumi.Any(exampleAwsSubnet.Id), }, }, }) if err != nil { return err } exampleTargetGroup, err := lb.NewTargetGroup(ctx, "example", &lb.TargetGroupArgs{ Name: pulumi.String("example"), Port: pulumi.Int(6081), Protocol: pulumi.String("GENEVE"), VpcId: pulumi.Any(exampleAwsVpc.Id), HealthCheck: &lb.TargetGroupHealthCheckArgs{ Port: pulumi.String("80"), Protocol: pulumi.String("HTTP"), }, }) if err != nil { return err } _, err = lb.NewListener(ctx, "example", &lb.ListenerArgs{ LoadBalancerArn: example.ID(), DefaultActions: lb.ListenerDefaultActionArray{ &lb.ListenerDefaultActionArgs{ TargetGroupArn: exampleTargetGroup.ID(), Type: pulumi.String("forward"), }, }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Mutual TLS Authentication
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { example, err := lb.NewLoadBalancer(ctx, "example", &lb.LoadBalancerArgs{ LoadBalancerType: pulumi.String("application"), }) if err != nil { return err } exampleTargetGroup, err := lb.NewTargetGroup(ctx, "example", nil) if err != nil { return err } _, err = lb.NewListener(ctx, "example", &lb.ListenerArgs{ LoadBalancerArn: example.ID(), DefaultActions: lb.ListenerDefaultActionArray{ &lb.ListenerDefaultActionArgs{ TargetGroupArn: exampleTargetGroup.ID(), Type: pulumi.String("forward"), }, }, MutualAuthentication: &lb.ListenerMutualAuthenticationArgs{ Mode: pulumi.String("verify"), TrustStoreArn: pulumi.String("..."), }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
## Import
Using `pulumi import`, import listeners using their ARN. For example:
```sh $ pulumi import aws:lb/listener:Listener front_end arn:aws:elasticloadbalancing:us-west-2:187416307283:listener/app/front-end-alb/8e4497da625e2d8a/9ab28ade35828f96 ```
type ListenerArgs ¶
type ListenerArgs struct { // Name of the Application-Layer Protocol Negotiation (ALPN) policy. Can be set if `protocol` is `TLS`. Valid values are `HTTP1Only`, `HTTP2Only`, `HTTP2Optional`, `HTTP2Preferred`, and `None`. AlpnPolicy pulumi.StringPtrInput `pulumi:"alpnPolicy"` // ARN of the default SSL server certificate. Exactly one certificate is required if the protocol is HTTPS. For adding additional SSL certificates, see the `aws.lb.ListenerCertificate` resource. CertificateArn pulumi.StringPtrInput `pulumi:"certificateArn"` // Configuration block for default actions. See below. DefaultActions lb.ListenerDefaultActionArrayInput `pulumi:"defaultActions"` // The mutual authentication configuration information. See below. MutualAuthentication lb.ListenerMutualAuthenticationPtrInput `pulumi:"mutualAuthentication"` // Port on which the load balancer is listening. Not valid for Gateway Load Balancers. Port pulumi.IntPtrInput `pulumi:"port"` // Protocol for connections from clients to the load balancer. For Application Load Balancers, valid values are `HTTP` and `HTTPS`, with a default of `HTTP`. For Network Load Balancers, valid values are `TCP`, `TLS`, `UDP`, and `TCP_UDP`. Not valid to use `UDP` or `TCP_UDP` if dual-stack mode is enabled. Not valid for Gateway Load Balancers. Protocol pulumi.StringPtrInput `pulumi:"protocol"` // Name of the SSL Policy for the listener. Required if `protocol` is `HTTPS` or `TLS`. Default is `ELBSecurityPolicy-2016-08`. SslPolicy pulumi.StringPtrInput `pulumi:"sslPolicy"` // A map of tags to assign to the resource. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. // // > **Note::** When a `Name` key is specified in the map, the AWS Console maps the value to the `Name Tag` column value inside the `Listener Rules` table within a specific load balancer listener page. Otherwise, the value resolves to `Default`. Tags pulumi.StringMapInput `pulumi:"tags"` // TCP idle timeout value in seconds. Can only be set if protocol is `TCP` on Network Load Balancer, or with a Gateway Load Balancer. Not supported for Application Load Balancers. Valid values are between `60` and `6000` inclusive. Default: `350`. TcpIdleTimeoutSeconds pulumi.IntPtrInput `pulumi:"tcpIdleTimeoutSeconds"` }
Provides a Load Balancer Listener resource.
> **Note:** `aws.alb.Listener` is known as `aws.lb.Listener`. The functionality is identical.
## Example Usage
### Forward Action
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { frontEnd, err := lb.NewLoadBalancer(ctx, "front_end", nil) if err != nil { return err } frontEndTargetGroup, err := lb.NewTargetGroup(ctx, "front_end", nil) if err != nil { return err } _, err = lb.NewListener(ctx, "front_end", &lb.ListenerArgs{ LoadBalancerArn: frontEnd.Arn, Port: pulumi.Int(443), Protocol: pulumi.String("HTTPS"), SslPolicy: pulumi.String("ELBSecurityPolicy-2016-08"), CertificateArn: pulumi.String("arn:aws:iam::187416307283:server-certificate/test_cert_rab3wuqwgja25ct3n4jdj2tzu4"), DefaultActions: lb.ListenerDefaultActionArray{ &lb.ListenerDefaultActionArgs{ Type: pulumi.String("forward"), TargetGroupArn: frontEndTargetGroup.Arn, }, }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
To a NLB:
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := lb.NewListener(ctx, "front_end", &lb.ListenerArgs{ LoadBalancerArn: pulumi.Any(frontEndAwsLb.Arn), Port: pulumi.Int(443), Protocol: pulumi.String("TLS"), SslPolicy: pulumi.String("ELBSecurityPolicy-2016-08"), CertificateArn: pulumi.String("arn:aws:iam::187416307283:server-certificate/test_cert_rab3wuqwgja25ct3n4jdj2tzu4"), AlpnPolicy: pulumi.String("HTTP2Preferred"), DefaultActions: lb.ListenerDefaultActionArray{ &lb.ListenerDefaultActionArgs{ Type: pulumi.String("forward"), TargetGroupArn: pulumi.Any(frontEndAwsLbTargetGroup.Arn), }, }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Redirect Action
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { frontEnd, err := lb.NewLoadBalancer(ctx, "front_end", nil) if err != nil { return err } _, err = lb.NewListener(ctx, "front_end", &lb.ListenerArgs{ LoadBalancerArn: frontEnd.Arn, Port: pulumi.Int(80), Protocol: pulumi.String("HTTP"), DefaultActions: lb.ListenerDefaultActionArray{ &lb.ListenerDefaultActionArgs{ Type: pulumi.String("redirect"), Redirect: &lb.ListenerDefaultActionRedirectArgs{ Port: pulumi.String("443"), Protocol: pulumi.String("HTTPS"), StatusCode: pulumi.String("HTTP_301"), }, }, }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Fixed-response Action
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { frontEnd, err := lb.NewLoadBalancer(ctx, "front_end", nil) if err != nil { return err } _, err = lb.NewListener(ctx, "front_end", &lb.ListenerArgs{ LoadBalancerArn: frontEnd.Arn, Port: pulumi.Int(80), Protocol: pulumi.String("HTTP"), DefaultActions: lb.ListenerDefaultActionArray{ &lb.ListenerDefaultActionArgs{ Type: pulumi.String("fixed-response"), FixedResponse: &lb.ListenerDefaultActionFixedResponseArgs{ ContentType: pulumi.String("text/plain"), MessageBody: pulumi.String("Fixed response content"), StatusCode: pulumi.String("200"), }, }, }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Authenticate-cognito Action
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cognito" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { frontEnd, err := lb.NewLoadBalancer(ctx, "front_end", nil) if err != nil { return err } frontEndTargetGroup, err := lb.NewTargetGroup(ctx, "front_end", nil) if err != nil { return err } pool, err := cognito.NewUserPool(ctx, "pool", nil) if err != nil { return err } client, err := cognito.NewUserPoolClient(ctx, "client", nil) if err != nil { return err } domain, err := cognito.NewUserPoolDomain(ctx, "domain", nil) if err != nil { return err } _, err = lb.NewListener(ctx, "front_end", &lb.ListenerArgs{ LoadBalancerArn: frontEnd.Arn, Port: pulumi.Int(80), Protocol: pulumi.String("HTTP"), DefaultActions: lb.ListenerDefaultActionArray{ &lb.ListenerDefaultActionArgs{ Type: pulumi.String("authenticate-cognito"), AuthenticateCognito: &lb.ListenerDefaultActionAuthenticateCognitoArgs{ UserPoolArn: pool.Arn, UserPoolClientId: client.ID(), UserPoolDomain: domain.Domain, }, }, &lb.ListenerDefaultActionArgs{ Type: pulumi.String("forward"), TargetGroupArn: frontEndTargetGroup.Arn, }, }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Authenticate-OIDC Action
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { frontEnd, err := lb.NewLoadBalancer(ctx, "front_end", nil) if err != nil { return err } frontEndTargetGroup, err := lb.NewTargetGroup(ctx, "front_end", nil) if err != nil { return err } _, err = lb.NewListener(ctx, "front_end", &lb.ListenerArgs{ LoadBalancerArn: frontEnd.Arn, Port: pulumi.Int(80), Protocol: pulumi.String("HTTP"), DefaultActions: lb.ListenerDefaultActionArray{ &lb.ListenerDefaultActionArgs{ Type: pulumi.String("authenticate-oidc"), AuthenticateOidc: &lb.ListenerDefaultActionAuthenticateOidcArgs{ AuthorizationEndpoint: pulumi.String("https://example.com/authorization_endpoint"), ClientId: pulumi.String("client_id"), ClientSecret: pulumi.String("client_secret"), Issuer: pulumi.String("https://example.com"), TokenEndpoint: pulumi.String("https://example.com/token_endpoint"), UserInfoEndpoint: pulumi.String("https://example.com/user_info_endpoint"), }, }, &lb.ListenerDefaultActionArgs{ Type: pulumi.String("forward"), TargetGroupArn: frontEndTargetGroup.Arn, }, }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Gateway Load Balancer Listener
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { example, err := lb.NewLoadBalancer(ctx, "example", &lb.LoadBalancerArgs{ LoadBalancerType: pulumi.String("gateway"), Name: pulumi.String("example"), SubnetMappings: lb.LoadBalancerSubnetMappingArray{ &lb.LoadBalancerSubnetMappingArgs{ SubnetId: pulumi.Any(exampleAwsSubnet.Id), }, }, }) if err != nil { return err } exampleTargetGroup, err := lb.NewTargetGroup(ctx, "example", &lb.TargetGroupArgs{ Name: pulumi.String("example"), Port: pulumi.Int(6081), Protocol: pulumi.String("GENEVE"), VpcId: pulumi.Any(exampleAwsVpc.Id), HealthCheck: &lb.TargetGroupHealthCheckArgs{ Port: pulumi.String("80"), Protocol: pulumi.String("HTTP"), }, }) if err != nil { return err } _, err = lb.NewListener(ctx, "example", &lb.ListenerArgs{ LoadBalancerArn: example.ID(), DefaultActions: lb.ListenerDefaultActionArray{ &lb.ListenerDefaultActionArgs{ TargetGroupArn: exampleTargetGroup.ID(), Type: pulumi.String("forward"), }, }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Mutual TLS Authentication
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { example, err := lb.NewLoadBalancer(ctx, "example", &lb.LoadBalancerArgs{ LoadBalancerType: pulumi.String("application"), }) if err != nil { return err } exampleTargetGroup, err := lb.NewTargetGroup(ctx, "example", nil) if err != nil { return err } _, err = lb.NewListener(ctx, "example", &lb.ListenerArgs{ LoadBalancerArn: example.ID(), DefaultActions: lb.ListenerDefaultActionArray{ &lb.ListenerDefaultActionArgs{ TargetGroupArn: exampleTargetGroup.ID(), Type: pulumi.String("forward"), }, }, MutualAuthentication: &lb.ListenerMutualAuthenticationArgs{ Mode: pulumi.String("verify"), TrustStoreArn: pulumi.String("..."), }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
## Import
Using `pulumi import`, import listeners using their ARN. For example:
```sh $ pulumi import aws:lb/listener:Listener front_end arn:aws:elasticloadbalancing:us-west-2:187416307283:listener/app/front-end-alb/8e4497da625e2d8a/9ab28ade35828f96 ```
func (ListenerArgs) ElementType ¶
func (ListenerArgs) ElementType() reflect.Type
func (ListenerArgs) ToListenerOutput ¶
func (i ListenerArgs) ToListenerOutput() ListenerOutput
func (ListenerArgs) ToListenerOutputWithContext ¶
func (i ListenerArgs) ToListenerOutputWithContext(ctx context.Context) ListenerOutput
func (ListenerArgs) ToListenerPtrOutput ¶
func (i ListenerArgs) ToListenerPtrOutput() ListenerPtrOutput
func (ListenerArgs) ToListenerPtrOutputWithContext ¶
func (i ListenerArgs) ToListenerPtrOutputWithContext(ctx context.Context) ListenerPtrOutput
type ListenerArray ¶
type ListenerArray []ListenerInput
func (ListenerArray) ElementType ¶
func (ListenerArray) ElementType() reflect.Type
func (ListenerArray) ToListenerArrayOutput ¶
func (i ListenerArray) ToListenerArrayOutput() ListenerArrayOutput
func (ListenerArray) ToListenerArrayOutputWithContext ¶
func (i ListenerArray) ToListenerArrayOutputWithContext(ctx context.Context) ListenerArrayOutput
type ListenerArrayInput ¶
type ListenerArrayInput interface { pulumi.Input ToListenerArrayOutput() ListenerArrayOutput ToListenerArrayOutputWithContext(context.Context) ListenerArrayOutput }
ListenerArrayInput is an input type that accepts ListenerArray and ListenerArrayOutput values. You can construct a concrete instance of `ListenerArrayInput` via:
ListenerArray{ ListenerArgs{...} }
type ListenerArrayOutput ¶
type ListenerArrayOutput struct{ *pulumi.OutputState }
func (ListenerArrayOutput) ElementType ¶
func (ListenerArrayOutput) ElementType() reflect.Type
func (ListenerArrayOutput) Index ¶
func (o ListenerArrayOutput) Index(i pulumi.IntInput) ListenerOutput
func (ListenerArrayOutput) ToListenerArrayOutput ¶
func (o ListenerArrayOutput) ToListenerArrayOutput() ListenerArrayOutput
func (ListenerArrayOutput) ToListenerArrayOutputWithContext ¶
func (o ListenerArrayOutput) ToListenerArrayOutputWithContext(ctx context.Context) ListenerArrayOutput
type ListenerInput ¶
type ListenerInput interface { pulumi.Input ToListenerOutput() ListenerOutput ToListenerOutputWithContext(context.Context) ListenerOutput }
ListenerInput is an input type that accepts ListenerArgs and ListenerOutput values. You can construct a concrete instance of `ListenerInput` via:
ListenerArgs{...}
type ListenerOutput ¶
type ListenerOutput struct{ *pulumi.OutputState }
Provides a Load Balancer Listener resource.
> **Note:** `aws.alb.Listener` is known as `aws.lb.Listener`. The functionality is identical.
## Example Usage
### Forward Action
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { frontEnd, err := lb.NewLoadBalancer(ctx, "front_end", nil) if err != nil { return err } frontEndTargetGroup, err := lb.NewTargetGroup(ctx, "front_end", nil) if err != nil { return err } _, err = lb.NewListener(ctx, "front_end", &lb.ListenerArgs{ LoadBalancerArn: frontEnd.Arn, Port: pulumi.Int(443), Protocol: pulumi.String("HTTPS"), SslPolicy: pulumi.String("ELBSecurityPolicy-2016-08"), CertificateArn: pulumi.String("arn:aws:iam::187416307283:server-certificate/test_cert_rab3wuqwgja25ct3n4jdj2tzu4"), DefaultActions: lb.ListenerDefaultActionArray{ &lb.ListenerDefaultActionArgs{ Type: pulumi.String("forward"), TargetGroupArn: frontEndTargetGroup.Arn, }, }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
To a NLB:
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := lb.NewListener(ctx, "front_end", &lb.ListenerArgs{ LoadBalancerArn: pulumi.Any(frontEndAwsLb.Arn), Port: pulumi.Int(443), Protocol: pulumi.String("TLS"), SslPolicy: pulumi.String("ELBSecurityPolicy-2016-08"), CertificateArn: pulumi.String("arn:aws:iam::187416307283:server-certificate/test_cert_rab3wuqwgja25ct3n4jdj2tzu4"), AlpnPolicy: pulumi.String("HTTP2Preferred"), DefaultActions: lb.ListenerDefaultActionArray{ &lb.ListenerDefaultActionArgs{ Type: pulumi.String("forward"), TargetGroupArn: pulumi.Any(frontEndAwsLbTargetGroup.Arn), }, }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Redirect Action
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { frontEnd, err := lb.NewLoadBalancer(ctx, "front_end", nil) if err != nil { return err } _, err = lb.NewListener(ctx, "front_end", &lb.ListenerArgs{ LoadBalancerArn: frontEnd.Arn, Port: pulumi.Int(80), Protocol: pulumi.String("HTTP"), DefaultActions: lb.ListenerDefaultActionArray{ &lb.ListenerDefaultActionArgs{ Type: pulumi.String("redirect"), Redirect: &lb.ListenerDefaultActionRedirectArgs{ Port: pulumi.String("443"), Protocol: pulumi.String("HTTPS"), StatusCode: pulumi.String("HTTP_301"), }, }, }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Fixed-response Action
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { frontEnd, err := lb.NewLoadBalancer(ctx, "front_end", nil) if err != nil { return err } _, err = lb.NewListener(ctx, "front_end", &lb.ListenerArgs{ LoadBalancerArn: frontEnd.Arn, Port: pulumi.Int(80), Protocol: pulumi.String("HTTP"), DefaultActions: lb.ListenerDefaultActionArray{ &lb.ListenerDefaultActionArgs{ Type: pulumi.String("fixed-response"), FixedResponse: &lb.ListenerDefaultActionFixedResponseArgs{ ContentType: pulumi.String("text/plain"), MessageBody: pulumi.String("Fixed response content"), StatusCode: pulumi.String("200"), }, }, }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Authenticate-cognito Action
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cognito" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { frontEnd, err := lb.NewLoadBalancer(ctx, "front_end", nil) if err != nil { return err } frontEndTargetGroup, err := lb.NewTargetGroup(ctx, "front_end", nil) if err != nil { return err } pool, err := cognito.NewUserPool(ctx, "pool", nil) if err != nil { return err } client, err := cognito.NewUserPoolClient(ctx, "client", nil) if err != nil { return err } domain, err := cognito.NewUserPoolDomain(ctx, "domain", nil) if err != nil { return err } _, err = lb.NewListener(ctx, "front_end", &lb.ListenerArgs{ LoadBalancerArn: frontEnd.Arn, Port: pulumi.Int(80), Protocol: pulumi.String("HTTP"), DefaultActions: lb.ListenerDefaultActionArray{ &lb.ListenerDefaultActionArgs{ Type: pulumi.String("authenticate-cognito"), AuthenticateCognito: &lb.ListenerDefaultActionAuthenticateCognitoArgs{ UserPoolArn: pool.Arn, UserPoolClientId: client.ID(), UserPoolDomain: domain.Domain, }, }, &lb.ListenerDefaultActionArgs{ Type: pulumi.String("forward"), TargetGroupArn: frontEndTargetGroup.Arn, }, }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Authenticate-OIDC Action
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { frontEnd, err := lb.NewLoadBalancer(ctx, "front_end", nil) if err != nil { return err } frontEndTargetGroup, err := lb.NewTargetGroup(ctx, "front_end", nil) if err != nil { return err } _, err = lb.NewListener(ctx, "front_end", &lb.ListenerArgs{ LoadBalancerArn: frontEnd.Arn, Port: pulumi.Int(80), Protocol: pulumi.String("HTTP"), DefaultActions: lb.ListenerDefaultActionArray{ &lb.ListenerDefaultActionArgs{ Type: pulumi.String("authenticate-oidc"), AuthenticateOidc: &lb.ListenerDefaultActionAuthenticateOidcArgs{ AuthorizationEndpoint: pulumi.String("https://example.com/authorization_endpoint"), ClientId: pulumi.String("client_id"), ClientSecret: pulumi.String("client_secret"), Issuer: pulumi.String("https://example.com"), TokenEndpoint: pulumi.String("https://example.com/token_endpoint"), UserInfoEndpoint: pulumi.String("https://example.com/user_info_endpoint"), }, }, &lb.ListenerDefaultActionArgs{ Type: pulumi.String("forward"), TargetGroupArn: frontEndTargetGroup.Arn, }, }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Gateway Load Balancer Listener
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { example, err := lb.NewLoadBalancer(ctx, "example", &lb.LoadBalancerArgs{ LoadBalancerType: pulumi.String("gateway"), Name: pulumi.String("example"), SubnetMappings: lb.LoadBalancerSubnetMappingArray{ &lb.LoadBalancerSubnetMappingArgs{ SubnetId: pulumi.Any(exampleAwsSubnet.Id), }, }, }) if err != nil { return err } exampleTargetGroup, err := lb.NewTargetGroup(ctx, "example", &lb.TargetGroupArgs{ Name: pulumi.String("example"), Port: pulumi.Int(6081), Protocol: pulumi.String("GENEVE"), VpcId: pulumi.Any(exampleAwsVpc.Id), HealthCheck: &lb.TargetGroupHealthCheckArgs{ Port: pulumi.String("80"), Protocol: pulumi.String("HTTP"), }, }) if err != nil { return err } _, err = lb.NewListener(ctx, "example", &lb.ListenerArgs{ LoadBalancerArn: example.ID(), DefaultActions: lb.ListenerDefaultActionArray{ &lb.ListenerDefaultActionArgs{ TargetGroupArn: exampleTargetGroup.ID(), Type: pulumi.String("forward"), }, }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Mutual TLS Authentication
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { example, err := lb.NewLoadBalancer(ctx, "example", &lb.LoadBalancerArgs{ LoadBalancerType: pulumi.String("application"), }) if err != nil { return err } exampleTargetGroup, err := lb.NewTargetGroup(ctx, "example", nil) if err != nil { return err } _, err = lb.NewListener(ctx, "example", &lb.ListenerArgs{ LoadBalancerArn: example.ID(), DefaultActions: lb.ListenerDefaultActionArray{ &lb.ListenerDefaultActionArgs{ TargetGroupArn: exampleTargetGroup.ID(), Type: pulumi.String("forward"), }, }, MutualAuthentication: &lb.ListenerMutualAuthenticationArgs{ Mode: pulumi.String("verify"), TrustStoreArn: pulumi.String("..."), }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
## Import
Using `pulumi import`, import listeners using their ARN. For example:
```sh $ pulumi import aws:lb/listener:Listener front_end arn:aws:elasticloadbalancing:us-west-2:187416307283:listener/app/front-end-alb/8e4497da625e2d8a/9ab28ade35828f96 ```
func (ListenerOutput) AlpnPolicy ¶
func (o ListenerOutput) AlpnPolicy() pulumi.StringPtrOutput
Name of the Application-Layer Protocol Negotiation (ALPN) policy. Can be set if `protocol` is `TLS`. Valid values are `HTTP1Only`, `HTTP2Only`, `HTTP2Optional`, `HTTP2Preferred`, and `None`.
func (ListenerOutput) CertificateArn ¶
func (o ListenerOutput) CertificateArn() pulumi.StringPtrOutput
ARN of the default SSL server certificate. Exactly one certificate is required if the protocol is HTTPS. For adding additional SSL certificates, see the `aws.lb.ListenerCertificate` resource.
func (ListenerOutput) DefaultActions ¶
func (o ListenerOutput) DefaultActions() lb.ListenerDefaultActionArrayOutput
Configuration block for default actions. See below.
func (ListenerOutput) ElementType ¶
func (ListenerOutput) ElementType() reflect.Type
func (ListenerOutput) MutualAuthentication ¶ added in v2.9.0
func (o ListenerOutput) MutualAuthentication() lb.ListenerMutualAuthenticationPtrOutput
The mutual authentication configuration information. See below.
func (ListenerOutput) Port ¶
func (o ListenerOutput) Port() pulumi.IntPtrOutput
Port on which the load balancer is listening. Not valid for Gateway Load Balancers.
func (ListenerOutput) Protocol ¶
func (o ListenerOutput) Protocol() pulumi.StringPtrOutput
Protocol for connections from clients to the load balancer. For Application Load Balancers, valid values are `HTTP` and `HTTPS`, with a default of `HTTP`. For Network Load Balancers, valid values are `TCP`, `TLS`, `UDP`, and `TCP_UDP`. Not valid to use `UDP` or `TCP_UDP` if dual-stack mode is enabled. Not valid for Gateway Load Balancers.
func (ListenerOutput) SslPolicy ¶
func (o ListenerOutput) SslPolicy() pulumi.StringPtrOutput
Name of the SSL Policy for the listener. Required if `protocol` is `HTTPS` or `TLS`. Default is `ELBSecurityPolicy-2016-08`.
func (ListenerOutput) Tags ¶
func (o ListenerOutput) Tags() pulumi.StringMapOutput
A map of tags to assign to the resource. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
> **Note::** When a `Name` key is specified in the map, the AWS Console maps the value to the `Name Tag` column value inside the `Listener Rules` table within a specific load balancer listener page. Otherwise, the value resolves to `Default`.
func (ListenerOutput) TcpIdleTimeoutSeconds ¶ added in v2.17.0
func (o ListenerOutput) TcpIdleTimeoutSeconds() pulumi.IntPtrOutput
TCP idle timeout value in seconds. Can only be set if protocol is `TCP` on Network Load Balancer, or with a Gateway Load Balancer. Not supported for Application Load Balancers. Valid values are between `60` and `6000` inclusive. Default: `350`.
func (ListenerOutput) ToListenerOutput ¶
func (o ListenerOutput) ToListenerOutput() ListenerOutput
func (ListenerOutput) ToListenerOutputWithContext ¶
func (o ListenerOutput) ToListenerOutputWithContext(ctx context.Context) ListenerOutput
func (ListenerOutput) ToListenerPtrOutput ¶
func (o ListenerOutput) ToListenerPtrOutput() ListenerPtrOutput
func (ListenerOutput) ToListenerPtrOutputWithContext ¶
func (o ListenerOutput) ToListenerPtrOutputWithContext(ctx context.Context) ListenerPtrOutput
type ListenerPtrInput ¶
type ListenerPtrInput interface { pulumi.Input ToListenerPtrOutput() ListenerPtrOutput ToListenerPtrOutputWithContext(context.Context) ListenerPtrOutput }
ListenerPtrInput is an input type that accepts ListenerArgs, ListenerPtr and ListenerPtrOutput values. You can construct a concrete instance of `ListenerPtrInput` via:
ListenerArgs{...} or: nil
func ListenerPtr ¶
func ListenerPtr(v *ListenerArgs) ListenerPtrInput
type ListenerPtrOutput ¶
type ListenerPtrOutput struct{ *pulumi.OutputState }
func (ListenerPtrOutput) AlpnPolicy ¶
func (o ListenerPtrOutput) AlpnPolicy() pulumi.StringPtrOutput
Name of the Application-Layer Protocol Negotiation (ALPN) policy. Can be set if `protocol` is `TLS`. Valid values are `HTTP1Only`, `HTTP2Only`, `HTTP2Optional`, `HTTP2Preferred`, and `None`.
func (ListenerPtrOutput) CertificateArn ¶
func (o ListenerPtrOutput) CertificateArn() pulumi.StringPtrOutput
ARN of the default SSL server certificate. Exactly one certificate is required if the protocol is HTTPS. For adding additional SSL certificates, see the `aws.lb.ListenerCertificate` resource.
func (ListenerPtrOutput) DefaultActions ¶
func (o ListenerPtrOutput) DefaultActions() lb.ListenerDefaultActionArrayOutput
Configuration block for default actions. See below.
func (ListenerPtrOutput) Elem ¶
func (o ListenerPtrOutput) Elem() ListenerOutput
func (ListenerPtrOutput) ElementType ¶
func (ListenerPtrOutput) ElementType() reflect.Type
func (ListenerPtrOutput) MutualAuthentication ¶ added in v2.9.0
func (o ListenerPtrOutput) MutualAuthentication() lb.ListenerMutualAuthenticationPtrOutput
The mutual authentication configuration information. See below.
func (ListenerPtrOutput) Port ¶
func (o ListenerPtrOutput) Port() pulumi.IntPtrOutput
Port on which the load balancer is listening. Not valid for Gateway Load Balancers.
func (ListenerPtrOutput) Protocol ¶
func (o ListenerPtrOutput) Protocol() pulumi.StringPtrOutput
Protocol for connections from clients to the load balancer. For Application Load Balancers, valid values are `HTTP` and `HTTPS`, with a default of `HTTP`. For Network Load Balancers, valid values are `TCP`, `TLS`, `UDP`, and `TCP_UDP`. Not valid to use `UDP` or `TCP_UDP` if dual-stack mode is enabled. Not valid for Gateway Load Balancers.
func (ListenerPtrOutput) SslPolicy ¶
func (o ListenerPtrOutput) SslPolicy() pulumi.StringPtrOutput
Name of the SSL Policy for the listener. Required if `protocol` is `HTTPS` or `TLS`. Default is `ELBSecurityPolicy-2016-08`.
func (ListenerPtrOutput) Tags ¶
func (o ListenerPtrOutput) Tags() pulumi.StringMapOutput
A map of tags to assign to the resource. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
> **Note::** When a `Name` key is specified in the map, the AWS Console maps the value to the `Name Tag` column value inside the `Listener Rules` table within a specific load balancer listener page. Otherwise, the value resolves to `Default`.
func (ListenerPtrOutput) TcpIdleTimeoutSeconds ¶ added in v2.17.0
func (o ListenerPtrOutput) TcpIdleTimeoutSeconds() pulumi.IntPtrOutput
TCP idle timeout value in seconds. Can only be set if protocol is `TCP` on Network Load Balancer, or with a Gateway Load Balancer. Not supported for Application Load Balancers. Valid values are between `60` and `6000` inclusive. Default: `350`.
func (ListenerPtrOutput) ToListenerPtrOutput ¶
func (o ListenerPtrOutput) ToListenerPtrOutput() ListenerPtrOutput
func (ListenerPtrOutput) ToListenerPtrOutputWithContext ¶
func (o ListenerPtrOutput) ToListenerPtrOutputWithContext(ctx context.Context) ListenerPtrOutput
type NetworkLoadBalancer ¶
type NetworkLoadBalancer struct { pulumi.ResourceState // Default target group, if auto-created DefaultTargetGroup lb.TargetGroupOutput `pulumi:"defaultTargetGroup"` // Listeners created as part of this load balancer Listeners lb.ListenerArrayOutput `pulumi:"listeners"` // Underlying Load Balancer resource LoadBalancer lb.LoadBalancerOutput `pulumi:"loadBalancer"` // Id of the VPC in which this load balancer is operating VpcId pulumi.StringPtrOutput `pulumi:"vpcId"` }
Provides a Network Load Balancer resource with listeners and default target group.
func NewNetworkLoadBalancer ¶
func NewNetworkLoadBalancer(ctx *pulumi.Context, name string, args *NetworkLoadBalancerArgs, opts ...pulumi.ResourceOption) (*NetworkLoadBalancer, error)
NewNetworkLoadBalancer registers a new resource with the given unique name, arguments, and options.
func (*NetworkLoadBalancer) ElementType ¶
func (*NetworkLoadBalancer) ElementType() reflect.Type
func (*NetworkLoadBalancer) ToNetworkLoadBalancerOutput ¶
func (i *NetworkLoadBalancer) ToNetworkLoadBalancerOutput() NetworkLoadBalancerOutput
func (*NetworkLoadBalancer) ToNetworkLoadBalancerOutputWithContext ¶
func (i *NetworkLoadBalancer) ToNetworkLoadBalancerOutputWithContext(ctx context.Context) NetworkLoadBalancerOutput
type NetworkLoadBalancerArgs ¶
type NetworkLoadBalancerArgs struct { // Access Logs block. See below. AccessLogs lb.LoadBalancerAccessLogsPtrInput // Client keep alive value in seconds. The valid range is 60-604800 seconds. The default is 3600 seconds. ClientKeepAlive pulumi.IntPtrInput // Connection Logs block. See below. Only valid for Load Balancers of type `application`. ConnectionLogs lb.LoadBalancerConnectionLogsPtrInput // ID of the customer owned ipv4 pool to use for this load balancer. CustomerOwnedIpv4Pool pulumi.StringPtrInput // Options creating a default target group. DefaultTargetGroup *TargetGroupArgs // Port to use to connect with the target. Valid values are ports 1-65535. Defaults to 80. DefaultTargetGroupPort pulumi.IntPtrInput // 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`. DesyncMitigationMode pulumi.StringPtrInput // How traffic is distributed among the load balancer Availability Zones. Possible values are `any_availability_zone` (default), `availability_zone_affinity`, or `partial_availability_zone_affinity`. See [Availability Zone DNS affinity](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#zonal-dns-affinity) for additional details. Only valid for `network` type load balancers. DnsRecordClientRoutingPolicy pulumi.StringPtrInput // Whether HTTP headers with header fields that are not valid are removed by the load balancer (true) or routed to targets (false). The default is false. Elastic Load Balancing requires that message header names contain only alphanumeric characters and hyphens. Only valid for Load Balancers of type `application`. DropInvalidHeaderFields pulumi.BoolPtrInput // 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`. EnableCrossZoneLoadBalancing pulumi.BoolPtrInput // If true, deletion of the load balancer will be disabled via the AWS API. This will prevent this provider from deleting the load balancer. Defaults to `false`. EnableDeletionProtection pulumi.BoolPtrInput // 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` EnableTlsVersionAndCipherSuiteHeaders pulumi.BoolPtrInput // Whether to allow a WAF-enabled load balancer to route requests to targets if it is unable to forward the request to AWS WAF. Defaults to `false`. EnableWafFailOpen pulumi.BoolPtrInput // 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`. EnableXffClientPort pulumi.BoolPtrInput // Whether zonal shift is enabled. Defaults to `false`. EnableZonalShift pulumi.BoolPtrInput // 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`. EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic pulumi.StringPtrInput // Time in seconds that the connection is allowed to be idle. Only valid for Load Balancers of type `application`. Default: 60. IdleTimeout pulumi.IntPtrInput // If true, the LB will be internal. Defaults to `false`. Internal pulumi.BoolPtrInput // 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). IpAddressType pulumi.StringPtrInput // A listener to create. Only one of [listener] and [listeners] can be specified. Listener *ListenerArgs // List of listeners to create. Only one of [listener] and [listeners] can be specified. Listeners []ListenerArgs // Name of the LB. This name must be unique within your AWS account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen. If not specified, this provider will autogenerate a name beginning with `tf-lb`. Name pulumi.StringPtrInput // Creates a unique name beginning with the specified prefix. Conflicts with `name`. NamePrefix pulumi.StringPtrInput // 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`. PreserveHostHeader pulumi.BoolPtrInput // 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. SecurityGroups pulumi.StringArrayInput // List of subnet IDs to attach to the LB. For Load Balancers of type `network` subnets can only be added (see [Availability Zones](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#availability-zones)), deleting a subnet for load balancers of type `network` will force a recreation of the resource. SubnetIds pulumi.StringArrayInput // Subnet mapping block. See below. For Load Balancers of type `network` subnet mappings can only be added. SubnetMappings lb.LoadBalancerSubnetMappingArrayInput // A list of subnets to attach to the LB. Only one of [subnets], [subnetIds] or [subnetMappings] can be specified Subnets ec2.SubnetArrayInput // Map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. Tags pulumi.StringMapInput // 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`. XffHeaderProcessingMode pulumi.StringPtrInput }
The set of arguments for constructing a NetworkLoadBalancer resource.
func (NetworkLoadBalancerArgs) ElementType ¶
func (NetworkLoadBalancerArgs) ElementType() reflect.Type
type NetworkLoadBalancerArray ¶
type NetworkLoadBalancerArray []NetworkLoadBalancerInput
func (NetworkLoadBalancerArray) ElementType ¶
func (NetworkLoadBalancerArray) ElementType() reflect.Type
func (NetworkLoadBalancerArray) ToNetworkLoadBalancerArrayOutput ¶
func (i NetworkLoadBalancerArray) ToNetworkLoadBalancerArrayOutput() NetworkLoadBalancerArrayOutput
func (NetworkLoadBalancerArray) ToNetworkLoadBalancerArrayOutputWithContext ¶
func (i NetworkLoadBalancerArray) ToNetworkLoadBalancerArrayOutputWithContext(ctx context.Context) NetworkLoadBalancerArrayOutput
type NetworkLoadBalancerArrayInput ¶
type NetworkLoadBalancerArrayInput interface { pulumi.Input ToNetworkLoadBalancerArrayOutput() NetworkLoadBalancerArrayOutput ToNetworkLoadBalancerArrayOutputWithContext(context.Context) NetworkLoadBalancerArrayOutput }
NetworkLoadBalancerArrayInput is an input type that accepts NetworkLoadBalancerArray and NetworkLoadBalancerArrayOutput values. You can construct a concrete instance of `NetworkLoadBalancerArrayInput` via:
NetworkLoadBalancerArray{ NetworkLoadBalancerArgs{...} }
type NetworkLoadBalancerArrayOutput ¶
type NetworkLoadBalancerArrayOutput struct{ *pulumi.OutputState }
func (NetworkLoadBalancerArrayOutput) ElementType ¶
func (NetworkLoadBalancerArrayOutput) ElementType() reflect.Type
func (NetworkLoadBalancerArrayOutput) Index ¶
func (o NetworkLoadBalancerArrayOutput) Index(i pulumi.IntInput) NetworkLoadBalancerOutput
func (NetworkLoadBalancerArrayOutput) ToNetworkLoadBalancerArrayOutput ¶
func (o NetworkLoadBalancerArrayOutput) ToNetworkLoadBalancerArrayOutput() NetworkLoadBalancerArrayOutput
func (NetworkLoadBalancerArrayOutput) ToNetworkLoadBalancerArrayOutputWithContext ¶
func (o NetworkLoadBalancerArrayOutput) ToNetworkLoadBalancerArrayOutputWithContext(ctx context.Context) NetworkLoadBalancerArrayOutput
type NetworkLoadBalancerInput ¶
type NetworkLoadBalancerInput interface { pulumi.Input ToNetworkLoadBalancerOutput() NetworkLoadBalancerOutput ToNetworkLoadBalancerOutputWithContext(ctx context.Context) NetworkLoadBalancerOutput }
type NetworkLoadBalancerMap ¶
type NetworkLoadBalancerMap map[string]NetworkLoadBalancerInput
func (NetworkLoadBalancerMap) ElementType ¶
func (NetworkLoadBalancerMap) ElementType() reflect.Type
func (NetworkLoadBalancerMap) ToNetworkLoadBalancerMapOutput ¶
func (i NetworkLoadBalancerMap) ToNetworkLoadBalancerMapOutput() NetworkLoadBalancerMapOutput
func (NetworkLoadBalancerMap) ToNetworkLoadBalancerMapOutputWithContext ¶
func (i NetworkLoadBalancerMap) ToNetworkLoadBalancerMapOutputWithContext(ctx context.Context) NetworkLoadBalancerMapOutput
type NetworkLoadBalancerMapInput ¶
type NetworkLoadBalancerMapInput interface { pulumi.Input ToNetworkLoadBalancerMapOutput() NetworkLoadBalancerMapOutput ToNetworkLoadBalancerMapOutputWithContext(context.Context) NetworkLoadBalancerMapOutput }
NetworkLoadBalancerMapInput is an input type that accepts NetworkLoadBalancerMap and NetworkLoadBalancerMapOutput values. You can construct a concrete instance of `NetworkLoadBalancerMapInput` via:
NetworkLoadBalancerMap{ "key": NetworkLoadBalancerArgs{...} }
type NetworkLoadBalancerMapOutput ¶
type NetworkLoadBalancerMapOutput struct{ *pulumi.OutputState }
func (NetworkLoadBalancerMapOutput) ElementType ¶
func (NetworkLoadBalancerMapOutput) ElementType() reflect.Type
func (NetworkLoadBalancerMapOutput) MapIndex ¶
func (o NetworkLoadBalancerMapOutput) MapIndex(k pulumi.StringInput) NetworkLoadBalancerOutput
func (NetworkLoadBalancerMapOutput) ToNetworkLoadBalancerMapOutput ¶
func (o NetworkLoadBalancerMapOutput) ToNetworkLoadBalancerMapOutput() NetworkLoadBalancerMapOutput
func (NetworkLoadBalancerMapOutput) ToNetworkLoadBalancerMapOutputWithContext ¶
func (o NetworkLoadBalancerMapOutput) ToNetworkLoadBalancerMapOutputWithContext(ctx context.Context) NetworkLoadBalancerMapOutput
type NetworkLoadBalancerOutput ¶
type NetworkLoadBalancerOutput struct{ *pulumi.OutputState }
func (NetworkLoadBalancerOutput) DefaultTargetGroup ¶
func (o NetworkLoadBalancerOutput) DefaultTargetGroup() lb.TargetGroupOutput
Default target group, if auto-created
func (NetworkLoadBalancerOutput) ElementType ¶
func (NetworkLoadBalancerOutput) ElementType() reflect.Type
func (NetworkLoadBalancerOutput) Listeners ¶
func (o NetworkLoadBalancerOutput) Listeners() lb.ListenerArrayOutput
Listeners created as part of this load balancer
func (NetworkLoadBalancerOutput) LoadBalancer ¶
func (o NetworkLoadBalancerOutput) LoadBalancer() lb.LoadBalancerOutput
Underlying Load Balancer resource
func (NetworkLoadBalancerOutput) ToNetworkLoadBalancerOutput ¶
func (o NetworkLoadBalancerOutput) ToNetworkLoadBalancerOutput() NetworkLoadBalancerOutput
func (NetworkLoadBalancerOutput) ToNetworkLoadBalancerOutputWithContext ¶
func (o NetworkLoadBalancerOutput) ToNetworkLoadBalancerOutputWithContext(ctx context.Context) NetworkLoadBalancerOutput
func (NetworkLoadBalancerOutput) VpcId ¶
func (o NetworkLoadBalancerOutput) VpcId() pulumi.StringPtrOutput
Id of the VPC in which this load balancer is operating
type TargetGroup ¶
type TargetGroup struct { // Whether to terminate connections at the end of the deregistration timeout on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#deregistration-delay) for more information. Default is `false`. ConnectionTermination *bool `pulumi:"connectionTermination"` // Amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds. DeregistrationDelay *int `pulumi:"deregistrationDelay"` // Health Check configuration block. Detailed below. HealthCheck *lb.TargetGroupHealthCheck `pulumi:"healthCheck"` // The type of IP addresses used by the target group, only supported when target type is set to `ip`. Possible values are `ipv4` or `ipv6`. IpAddressType *string `pulumi:"ipAddressType"` // Whether the request and response headers exchanged between the load balancer and the Lambda function include arrays of values or strings. Only applies when `target_type` is `lambda`. Default is `false`. LambdaMultiValueHeadersEnabled *bool `pulumi:"lambdaMultiValueHeadersEnabled"` // Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is `round_robin`, `least_outstanding_requests`, or `weighted_random`. The default is `round_robin`. LoadBalancingAlgorithmType *string `pulumi:"loadBalancingAlgorithmType"` // Determines whether to enable target anomaly mitigation. Target anomaly mitigation is only supported by the `weighted_random` load balancing algorithm type. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#automatic-target-weights) for more information. The value is `"on"` or `"off"`. The default is `"off"`. LoadBalancingAnomalyMitigation *string `pulumi:"loadBalancingAnomalyMitigation"` // Indicates whether cross zone load balancing is enabled. The value is `"true"`, `"false"` or `"use_load_balancer_configuration"`. The default is `"use_load_balancer_configuration"`. LoadBalancingCrossZoneEnabled *string `pulumi:"loadBalancingCrossZoneEnabled"` // Name of the target group. If omitted, this provider will assign a random, unique name. This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen. Name *string `pulumi:"name"` // Creates a unique name beginning with the specified prefix. Conflicts with `name`. Cannot be longer than 6 characters. NamePrefix *string `pulumi:"namePrefix"` // Port on which targets receive traffic, unless overridden when registering a specific target. Required when `target_type` is `instance`, `ip` or `alb`. Does not apply when `target_type` is `lambda`. Port *int `pulumi:"port"` // Whether client IP preservation is enabled. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#client-ip-preservation) for more information. PreserveClientIp *string `pulumi:"preserveClientIp"` // Protocol to use for routing traffic to the targets. // Should be one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, or `UDP`. // Required when `target_type` is `instance`, `ip`, or `alb`. // Does not apply when `target_type` is `lambda`. Protocol *string `pulumi:"protocol"` // Only applicable when `protocol` is `HTTP` or `HTTPS`. The protocol version. Specify `GRPC` to send requests to targets using gRPC. Specify `HTTP2` to send requests to targets using HTTP/2. The default is `HTTP1`, which sends requests to targets using HTTP/1.1 ProtocolVersion *string `pulumi:"protocolVersion"` // Whether to enable support for proxy protocol v2 on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#proxy-protocol) for more information. Default is `false`. ProxyProtocolV2 *bool `pulumi:"proxyProtocolV2"` // Amount time for targets to warm up before the load balancer sends them a full share of requests. The range is 30-900 seconds or 0 to disable. The default value is 0 seconds. SlowStart *int `pulumi:"slowStart"` // Stickiness configuration block. Detailed below. Stickiness *lb.TargetGroupStickiness `pulumi:"stickiness"` // Map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. Tags map[string]string `pulumi:"tags"` // Target failover block. Only applicable for Gateway Load Balancer target groups. See target_failover for more information. TargetFailovers []lb.TargetGroupTargetFailover `pulumi:"targetFailovers"` // Target health requirements block. See target_group_health for more information. TargetGroupHealth *lb.TargetGroupTargetGroupHealth `pulumi:"targetGroupHealth"` // Target health state block. Only applicable for Network Load Balancer target groups when `protocol` is `TCP` or `TLS`. See target_health_state for more information. TargetHealthStates []lb.TargetGroupTargetHealthState `pulumi:"targetHealthStates"` // Type of target that you must specify when registering targets with this target group. // See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTargetGroup.html) for supported values. // The default is `instance`. // // Note that you can't specify targets for a target group using both instance IDs and IP addresses. // // If the target type is `ip`, specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can't specify publicly routable IP addresses. // // Network Load Balancers do not support the `lambda` target type. // // Application Load Balancers do not support the `alb` target type. TargetType *string `pulumi:"targetType"` // Identifier of the VPC in which to create the target group. Required when `target_type` is `instance`, `ip` or `alb`. Does not apply when `target_type` is `lambda`. VpcId *string `pulumi:"vpcId"` }
Provides a Target Group resource for use with Load Balancer resources.
> **Note:** `aws.alb.TargetGroup` is known as `aws.lb.TargetGroup`. The functionality is identical.
## Example Usage
### Instance Target Group
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { main, err := ec2.NewVpc(ctx, "main", &ec2.VpcArgs{ CidrBlock: pulumi.String("10.0.0.0/16"), }) if err != nil { return err } _, err = lb.NewTargetGroup(ctx, "test", &lb.TargetGroupArgs{ Name: pulumi.String("tf-example-lb-tg"), Port: pulumi.Int(80), Protocol: pulumi.String("HTTP"), VpcId: main.ID(), }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### IP Target Group
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { main, err := ec2.NewVpc(ctx, "main", &ec2.VpcArgs{ CidrBlock: pulumi.String("10.0.0.0/16"), }) if err != nil { return err } _, err = lb.NewTargetGroup(ctx, "ip-example", &lb.TargetGroupArgs{ Name: pulumi.String("tf-example-lb-tg"), Port: pulumi.Int(80), Protocol: pulumi.String("HTTP"), TargetType: pulumi.String("ip"), VpcId: main.ID(), }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Lambda Target Group
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := lb.NewTargetGroup(ctx, "lambda-example", &lb.TargetGroupArgs{ Name: pulumi.String("tf-example-lb-tg"), TargetType: pulumi.String("lambda"), }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### ALB Target Group
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := lb.NewTargetGroup(ctx, "alb-example", &lb.TargetGroupArgs{ Name: pulumi.String("tf-example-lb-alb-tg"), TargetType: pulumi.String("alb"), Port: pulumi.Int(80), Protocol: pulumi.String("TCP"), VpcId: pulumi.Any(main.Id), }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Target group with unhealthy connection termination disabled
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := lb.NewTargetGroup(ctx, "tcp-example", &lb.TargetGroupArgs{ Name: pulumi.String("tf-example-lb-nlb-tg"), Port: pulumi.Int(25), Protocol: pulumi.String("TCP"), VpcId: pulumi.Any(main.Id), TargetHealthStates: lb.TargetGroupTargetHealthStateArray{ &lb.TargetGroupTargetHealthStateArgs{ EnableUnhealthyConnectionTermination: pulumi.Bool(false), }, }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Target group with health requirements
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := lb.NewTargetGroup(ctx, "tcp-example", &lb.TargetGroupArgs{ Name: pulumi.String("tf-example-lb-nlb-tg"), Port: pulumi.Int(80), Protocol: pulumi.String("TCP"), VpcId: pulumi.Any(main.Id), TargetGroupHealth: &lb.TargetGroupTargetGroupHealthArgs{ DnsFailover: &lb.TargetGroupTargetGroupHealthDnsFailoverArgs{ MinimumHealthyTargetsCount: pulumi.String("1"), MinimumHealthyTargetsPercentage: pulumi.String("off"), }, UnhealthyStateRouting: &lb.TargetGroupTargetGroupHealthUnhealthyStateRoutingArgs{ MinimumHealthyTargetsCount: pulumi.Int(1), MinimumHealthyTargetsPercentage: pulumi.String("off"), }, }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
## Import
Using `pulumi import`, import Target Groups using their ARN. For example:
```sh $ pulumi import aws:lb/targetGroup:TargetGroup app_front_end arn:aws:elasticloadbalancing:us-west-2:187416307283:targetgroup/app-front-end/20cfe21448b66314 ```
type TargetGroupArgs ¶
type TargetGroupArgs struct { // Whether to terminate connections at the end of the deregistration timeout on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#deregistration-delay) for more information. Default is `false`. ConnectionTermination pulumi.BoolPtrInput `pulumi:"connectionTermination"` // Amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds. DeregistrationDelay pulumi.IntPtrInput `pulumi:"deregistrationDelay"` // Health Check configuration block. Detailed below. HealthCheck lb.TargetGroupHealthCheckPtrInput `pulumi:"healthCheck"` // The type of IP addresses used by the target group, only supported when target type is set to `ip`. Possible values are `ipv4` or `ipv6`. IpAddressType pulumi.StringPtrInput `pulumi:"ipAddressType"` // Whether the request and response headers exchanged between the load balancer and the Lambda function include arrays of values or strings. Only applies when `target_type` is `lambda`. Default is `false`. LambdaMultiValueHeadersEnabled pulumi.BoolPtrInput `pulumi:"lambdaMultiValueHeadersEnabled"` // Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is `round_robin`, `least_outstanding_requests`, or `weighted_random`. The default is `round_robin`. LoadBalancingAlgorithmType pulumi.StringPtrInput `pulumi:"loadBalancingAlgorithmType"` // Determines whether to enable target anomaly mitigation. Target anomaly mitigation is only supported by the `weighted_random` load balancing algorithm type. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#automatic-target-weights) for more information. The value is `"on"` or `"off"`. The default is `"off"`. LoadBalancingAnomalyMitigation pulumi.StringPtrInput `pulumi:"loadBalancingAnomalyMitigation"` // Indicates whether cross zone load balancing is enabled. The value is `"true"`, `"false"` or `"use_load_balancer_configuration"`. The default is `"use_load_balancer_configuration"`. LoadBalancingCrossZoneEnabled pulumi.StringPtrInput `pulumi:"loadBalancingCrossZoneEnabled"` // Name of the target group. If omitted, this provider will assign a random, unique name. This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen. Name pulumi.StringPtrInput `pulumi:"name"` // Creates a unique name beginning with the specified prefix. Conflicts with `name`. Cannot be longer than 6 characters. NamePrefix pulumi.StringPtrInput `pulumi:"namePrefix"` // Port on which targets receive traffic, unless overridden when registering a specific target. Required when `target_type` is `instance`, `ip` or `alb`. Does not apply when `target_type` is `lambda`. Port pulumi.IntPtrInput `pulumi:"port"` // Whether client IP preservation is enabled. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#client-ip-preservation) for more information. PreserveClientIp pulumi.StringPtrInput `pulumi:"preserveClientIp"` // Protocol to use for routing traffic to the targets. // Should be one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, or `UDP`. // Required when `target_type` is `instance`, `ip`, or `alb`. // Does not apply when `target_type` is `lambda`. Protocol pulumi.StringPtrInput `pulumi:"protocol"` // Only applicable when `protocol` is `HTTP` or `HTTPS`. The protocol version. Specify `GRPC` to send requests to targets using gRPC. Specify `HTTP2` to send requests to targets using HTTP/2. The default is `HTTP1`, which sends requests to targets using HTTP/1.1 ProtocolVersion pulumi.StringPtrInput `pulumi:"protocolVersion"` // Whether to enable support for proxy protocol v2 on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#proxy-protocol) for more information. Default is `false`. ProxyProtocolV2 pulumi.BoolPtrInput `pulumi:"proxyProtocolV2"` // Amount time for targets to warm up before the load balancer sends them a full share of requests. The range is 30-900 seconds or 0 to disable. The default value is 0 seconds. SlowStart pulumi.IntPtrInput `pulumi:"slowStart"` // Stickiness configuration block. Detailed below. Stickiness lb.TargetGroupStickinessPtrInput `pulumi:"stickiness"` // Map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. Tags pulumi.StringMapInput `pulumi:"tags"` // Target failover block. Only applicable for Gateway Load Balancer target groups. See target_failover for more information. TargetFailovers lb.TargetGroupTargetFailoverArrayInput `pulumi:"targetFailovers"` // Target health requirements block. See target_group_health for more information. TargetGroupHealth lb.TargetGroupTargetGroupHealthPtrInput `pulumi:"targetGroupHealth"` // Target health state block. Only applicable for Network Load Balancer target groups when `protocol` is `TCP` or `TLS`. See target_health_state for more information. TargetHealthStates lb.TargetGroupTargetHealthStateArrayInput `pulumi:"targetHealthStates"` // Type of target that you must specify when registering targets with this target group. // See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTargetGroup.html) for supported values. // The default is `instance`. // // Note that you can't specify targets for a target group using both instance IDs and IP addresses. // // If the target type is `ip`, specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can't specify publicly routable IP addresses. // // Network Load Balancers do not support the `lambda` target type. // // Application Load Balancers do not support the `alb` target type. TargetType pulumi.StringPtrInput `pulumi:"targetType"` // Identifier of the VPC in which to create the target group. Required when `target_type` is `instance`, `ip` or `alb`. Does not apply when `target_type` is `lambda`. VpcId pulumi.StringPtrInput `pulumi:"vpcId"` }
Provides a Target Group resource for use with Load Balancer resources.
> **Note:** `aws.alb.TargetGroup` is known as `aws.lb.TargetGroup`. The functionality is identical.
## Example Usage
### Instance Target Group
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { main, err := ec2.NewVpc(ctx, "main", &ec2.VpcArgs{ CidrBlock: pulumi.String("10.0.0.0/16"), }) if err != nil { return err } _, err = lb.NewTargetGroup(ctx, "test", &lb.TargetGroupArgs{ Name: pulumi.String("tf-example-lb-tg"), Port: pulumi.Int(80), Protocol: pulumi.String("HTTP"), VpcId: main.ID(), }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### IP Target Group
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { main, err := ec2.NewVpc(ctx, "main", &ec2.VpcArgs{ CidrBlock: pulumi.String("10.0.0.0/16"), }) if err != nil { return err } _, err = lb.NewTargetGroup(ctx, "ip-example", &lb.TargetGroupArgs{ Name: pulumi.String("tf-example-lb-tg"), Port: pulumi.Int(80), Protocol: pulumi.String("HTTP"), TargetType: pulumi.String("ip"), VpcId: main.ID(), }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Lambda Target Group
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := lb.NewTargetGroup(ctx, "lambda-example", &lb.TargetGroupArgs{ Name: pulumi.String("tf-example-lb-tg"), TargetType: pulumi.String("lambda"), }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### ALB Target Group
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := lb.NewTargetGroup(ctx, "alb-example", &lb.TargetGroupArgs{ Name: pulumi.String("tf-example-lb-alb-tg"), TargetType: pulumi.String("alb"), Port: pulumi.Int(80), Protocol: pulumi.String("TCP"), VpcId: pulumi.Any(main.Id), }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Target group with unhealthy connection termination disabled
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := lb.NewTargetGroup(ctx, "tcp-example", &lb.TargetGroupArgs{ Name: pulumi.String("tf-example-lb-nlb-tg"), Port: pulumi.Int(25), Protocol: pulumi.String("TCP"), VpcId: pulumi.Any(main.Id), TargetHealthStates: lb.TargetGroupTargetHealthStateArray{ &lb.TargetGroupTargetHealthStateArgs{ EnableUnhealthyConnectionTermination: pulumi.Bool(false), }, }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Target group with health requirements
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := lb.NewTargetGroup(ctx, "tcp-example", &lb.TargetGroupArgs{ Name: pulumi.String("tf-example-lb-nlb-tg"), Port: pulumi.Int(80), Protocol: pulumi.String("TCP"), VpcId: pulumi.Any(main.Id), TargetGroupHealth: &lb.TargetGroupTargetGroupHealthArgs{ DnsFailover: &lb.TargetGroupTargetGroupHealthDnsFailoverArgs{ MinimumHealthyTargetsCount: pulumi.String("1"), MinimumHealthyTargetsPercentage: pulumi.String("off"), }, UnhealthyStateRouting: &lb.TargetGroupTargetGroupHealthUnhealthyStateRoutingArgs{ MinimumHealthyTargetsCount: pulumi.Int(1), MinimumHealthyTargetsPercentage: pulumi.String("off"), }, }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
## Import
Using `pulumi import`, import Target Groups using their ARN. For example:
```sh $ pulumi import aws:lb/targetGroup:TargetGroup app_front_end arn:aws:elasticloadbalancing:us-west-2:187416307283:targetgroup/app-front-end/20cfe21448b66314 ```
func (TargetGroupArgs) ElementType ¶
func (TargetGroupArgs) ElementType() reflect.Type
func (TargetGroupArgs) ToTargetGroupOutput ¶
func (i TargetGroupArgs) ToTargetGroupOutput() TargetGroupOutput
func (TargetGroupArgs) ToTargetGroupOutputWithContext ¶
func (i TargetGroupArgs) ToTargetGroupOutputWithContext(ctx context.Context) TargetGroupOutput
func (TargetGroupArgs) ToTargetGroupPtrOutput ¶
func (i TargetGroupArgs) ToTargetGroupPtrOutput() TargetGroupPtrOutput
func (TargetGroupArgs) ToTargetGroupPtrOutputWithContext ¶
func (i TargetGroupArgs) ToTargetGroupPtrOutputWithContext(ctx context.Context) TargetGroupPtrOutput
type TargetGroupAttachment ¶
type TargetGroupAttachment struct { pulumi.ResourceState // Auto-created Lambda permission, if targeting a Lambda function LambdaPermission lambda.PermissionOutput `pulumi:"lambdaPermission"` // Underlying Target Group Attachment resource TargetGroupAttachment lb.TargetGroupAttachmentOutput `pulumi:"targetGroupAttachment"` }
Attach an EC2 instance or Lambda to a Load Balancer. This will create required permissions if attaching to a Lambda Function.
func NewTargetGroupAttachment ¶
func NewTargetGroupAttachment(ctx *pulumi.Context, name string, args *TargetGroupAttachmentArgs, opts ...pulumi.ResourceOption) (*TargetGroupAttachment, error)
NewTargetGroupAttachment registers a new resource with the given unique name, arguments, and options.
func (*TargetGroupAttachment) ElementType ¶
func (*TargetGroupAttachment) ElementType() reflect.Type
func (*TargetGroupAttachment) ToTargetGroupAttachmentOutput ¶
func (i *TargetGroupAttachment) ToTargetGroupAttachmentOutput() TargetGroupAttachmentOutput
func (*TargetGroupAttachment) ToTargetGroupAttachmentOutputWithContext ¶
func (i *TargetGroupAttachment) ToTargetGroupAttachmentOutputWithContext(ctx context.Context) TargetGroupAttachmentOutput
type TargetGroupAttachmentArgs ¶
type TargetGroupAttachmentArgs struct { // EC2 Instance to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided. Instance ec2.InstanceInput // ID of an EC2 Instance to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided. InstanceId pulumi.StringPtrInput // Lambda Function to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided. Lambda lambda.FunctionInput // ARN of a Lambda Function to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided. LambdaArn pulumi.StringPtrInput // Target Group to attach to. Exactly one of [targetGroup] or [targetGroupArn] must be specified. TargetGroup lb.TargetGroupInput // ARN of the Target Group to attach to. Exactly one of [targetGroup] or [targetGroupArn] must be specified. TargetGroupArn pulumi.StringPtrInput }
The set of arguments for constructing a TargetGroupAttachment resource.
func (TargetGroupAttachmentArgs) ElementType ¶
func (TargetGroupAttachmentArgs) ElementType() reflect.Type
type TargetGroupAttachmentArray ¶
type TargetGroupAttachmentArray []TargetGroupAttachmentInput
func (TargetGroupAttachmentArray) ElementType ¶
func (TargetGroupAttachmentArray) ElementType() reflect.Type
func (TargetGroupAttachmentArray) ToTargetGroupAttachmentArrayOutput ¶
func (i TargetGroupAttachmentArray) ToTargetGroupAttachmentArrayOutput() TargetGroupAttachmentArrayOutput
func (TargetGroupAttachmentArray) ToTargetGroupAttachmentArrayOutputWithContext ¶
func (i TargetGroupAttachmentArray) ToTargetGroupAttachmentArrayOutputWithContext(ctx context.Context) TargetGroupAttachmentArrayOutput
type TargetGroupAttachmentArrayInput ¶
type TargetGroupAttachmentArrayInput interface { pulumi.Input ToTargetGroupAttachmentArrayOutput() TargetGroupAttachmentArrayOutput ToTargetGroupAttachmentArrayOutputWithContext(context.Context) TargetGroupAttachmentArrayOutput }
TargetGroupAttachmentArrayInput is an input type that accepts TargetGroupAttachmentArray and TargetGroupAttachmentArrayOutput values. You can construct a concrete instance of `TargetGroupAttachmentArrayInput` via:
TargetGroupAttachmentArray{ TargetGroupAttachmentArgs{...} }
type TargetGroupAttachmentArrayOutput ¶
type TargetGroupAttachmentArrayOutput struct{ *pulumi.OutputState }
func (TargetGroupAttachmentArrayOutput) ElementType ¶
func (TargetGroupAttachmentArrayOutput) ElementType() reflect.Type
func (TargetGroupAttachmentArrayOutput) Index ¶
func (o TargetGroupAttachmentArrayOutput) Index(i pulumi.IntInput) TargetGroupAttachmentOutput
func (TargetGroupAttachmentArrayOutput) ToTargetGroupAttachmentArrayOutput ¶
func (o TargetGroupAttachmentArrayOutput) ToTargetGroupAttachmentArrayOutput() TargetGroupAttachmentArrayOutput
func (TargetGroupAttachmentArrayOutput) ToTargetGroupAttachmentArrayOutputWithContext ¶
func (o TargetGroupAttachmentArrayOutput) ToTargetGroupAttachmentArrayOutputWithContext(ctx context.Context) TargetGroupAttachmentArrayOutput
type TargetGroupAttachmentInput ¶
type TargetGroupAttachmentInput interface { pulumi.Input ToTargetGroupAttachmentOutput() TargetGroupAttachmentOutput ToTargetGroupAttachmentOutputWithContext(ctx context.Context) TargetGroupAttachmentOutput }
type TargetGroupAttachmentMap ¶
type TargetGroupAttachmentMap map[string]TargetGroupAttachmentInput
func (TargetGroupAttachmentMap) ElementType ¶
func (TargetGroupAttachmentMap) ElementType() reflect.Type
func (TargetGroupAttachmentMap) ToTargetGroupAttachmentMapOutput ¶
func (i TargetGroupAttachmentMap) ToTargetGroupAttachmentMapOutput() TargetGroupAttachmentMapOutput
func (TargetGroupAttachmentMap) ToTargetGroupAttachmentMapOutputWithContext ¶
func (i TargetGroupAttachmentMap) ToTargetGroupAttachmentMapOutputWithContext(ctx context.Context) TargetGroupAttachmentMapOutput
type TargetGroupAttachmentMapInput ¶
type TargetGroupAttachmentMapInput interface { pulumi.Input ToTargetGroupAttachmentMapOutput() TargetGroupAttachmentMapOutput ToTargetGroupAttachmentMapOutputWithContext(context.Context) TargetGroupAttachmentMapOutput }
TargetGroupAttachmentMapInput is an input type that accepts TargetGroupAttachmentMap and TargetGroupAttachmentMapOutput values. You can construct a concrete instance of `TargetGroupAttachmentMapInput` via:
TargetGroupAttachmentMap{ "key": TargetGroupAttachmentArgs{...} }
type TargetGroupAttachmentMapOutput ¶
type TargetGroupAttachmentMapOutput struct{ *pulumi.OutputState }
func (TargetGroupAttachmentMapOutput) ElementType ¶
func (TargetGroupAttachmentMapOutput) ElementType() reflect.Type
func (TargetGroupAttachmentMapOutput) MapIndex ¶
func (o TargetGroupAttachmentMapOutput) MapIndex(k pulumi.StringInput) TargetGroupAttachmentOutput
func (TargetGroupAttachmentMapOutput) ToTargetGroupAttachmentMapOutput ¶
func (o TargetGroupAttachmentMapOutput) ToTargetGroupAttachmentMapOutput() TargetGroupAttachmentMapOutput
func (TargetGroupAttachmentMapOutput) ToTargetGroupAttachmentMapOutputWithContext ¶
func (o TargetGroupAttachmentMapOutput) ToTargetGroupAttachmentMapOutputWithContext(ctx context.Context) TargetGroupAttachmentMapOutput
type TargetGroupAttachmentOutput ¶
type TargetGroupAttachmentOutput struct{ *pulumi.OutputState }
func (TargetGroupAttachmentOutput) ElementType ¶
func (TargetGroupAttachmentOutput) ElementType() reflect.Type
func (TargetGroupAttachmentOutput) LambdaPermission ¶
func (o TargetGroupAttachmentOutput) LambdaPermission() lambda.PermissionOutput
Auto-created Lambda permission, if targeting a Lambda function
func (TargetGroupAttachmentOutput) TargetGroupAttachment ¶
func (o TargetGroupAttachmentOutput) TargetGroupAttachment() lb.TargetGroupAttachmentOutput
Underlying Target Group Attachment resource
func (TargetGroupAttachmentOutput) ToTargetGroupAttachmentOutput ¶
func (o TargetGroupAttachmentOutput) ToTargetGroupAttachmentOutput() TargetGroupAttachmentOutput
func (TargetGroupAttachmentOutput) ToTargetGroupAttachmentOutputWithContext ¶
func (o TargetGroupAttachmentOutput) ToTargetGroupAttachmentOutputWithContext(ctx context.Context) TargetGroupAttachmentOutput
type TargetGroupInput ¶
type TargetGroupInput interface { pulumi.Input ToTargetGroupOutput() TargetGroupOutput ToTargetGroupOutputWithContext(context.Context) TargetGroupOutput }
TargetGroupInput is an input type that accepts TargetGroupArgs and TargetGroupOutput values. You can construct a concrete instance of `TargetGroupInput` via:
TargetGroupArgs{...}
type TargetGroupOutput ¶
type TargetGroupOutput struct{ *pulumi.OutputState }
Provides a Target Group resource for use with Load Balancer resources.
> **Note:** `aws.alb.TargetGroup` is known as `aws.lb.TargetGroup`. The functionality is identical.
## Example Usage
### Instance Target Group
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { main, err := ec2.NewVpc(ctx, "main", &ec2.VpcArgs{ CidrBlock: pulumi.String("10.0.0.0/16"), }) if err != nil { return err } _, err = lb.NewTargetGroup(ctx, "test", &lb.TargetGroupArgs{ Name: pulumi.String("tf-example-lb-tg"), Port: pulumi.Int(80), Protocol: pulumi.String("HTTP"), VpcId: main.ID(), }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### IP Target Group
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { main, err := ec2.NewVpc(ctx, "main", &ec2.VpcArgs{ CidrBlock: pulumi.String("10.0.0.0/16"), }) if err != nil { return err } _, err = lb.NewTargetGroup(ctx, "ip-example", &lb.TargetGroupArgs{ Name: pulumi.String("tf-example-lb-tg"), Port: pulumi.Int(80), Protocol: pulumi.String("HTTP"), TargetType: pulumi.String("ip"), VpcId: main.ID(), }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Lambda Target Group
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := lb.NewTargetGroup(ctx, "lambda-example", &lb.TargetGroupArgs{ Name: pulumi.String("tf-example-lb-tg"), TargetType: pulumi.String("lambda"), }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### ALB Target Group
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := lb.NewTargetGroup(ctx, "alb-example", &lb.TargetGroupArgs{ Name: pulumi.String("tf-example-lb-alb-tg"), TargetType: pulumi.String("alb"), Port: pulumi.Int(80), Protocol: pulumi.String("TCP"), VpcId: pulumi.Any(main.Id), }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Target group with unhealthy connection termination disabled
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := lb.NewTargetGroup(ctx, "tcp-example", &lb.TargetGroupArgs{ Name: pulumi.String("tf-example-lb-nlb-tg"), Port: pulumi.Int(25), Protocol: pulumi.String("TCP"), VpcId: pulumi.Any(main.Id), TargetHealthStates: lb.TargetGroupTargetHealthStateArray{ &lb.TargetGroupTargetHealthStateArgs{ EnableUnhealthyConnectionTermination: pulumi.Bool(false), }, }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Target group with health requirements
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := lb.NewTargetGroup(ctx, "tcp-example", &lb.TargetGroupArgs{ Name: pulumi.String("tf-example-lb-nlb-tg"), Port: pulumi.Int(80), Protocol: pulumi.String("TCP"), VpcId: pulumi.Any(main.Id), TargetGroupHealth: &lb.TargetGroupTargetGroupHealthArgs{ DnsFailover: &lb.TargetGroupTargetGroupHealthDnsFailoverArgs{ MinimumHealthyTargetsCount: pulumi.String("1"), MinimumHealthyTargetsPercentage: pulumi.String("off"), }, UnhealthyStateRouting: &lb.TargetGroupTargetGroupHealthUnhealthyStateRoutingArgs{ MinimumHealthyTargetsCount: pulumi.Int(1), MinimumHealthyTargetsPercentage: pulumi.String("off"), }, }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
## Import
Using `pulumi import`, import Target Groups using their ARN. For example:
```sh $ pulumi import aws:lb/targetGroup:TargetGroup app_front_end arn:aws:elasticloadbalancing:us-west-2:187416307283:targetgroup/app-front-end/20cfe21448b66314 ```
func (TargetGroupOutput) ConnectionTermination ¶
func (o TargetGroupOutput) ConnectionTermination() pulumi.BoolPtrOutput
Whether to terminate connections at the end of the deregistration timeout on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#deregistration-delay) for more information. Default is `false`.
func (TargetGroupOutput) DeregistrationDelay ¶
func (o TargetGroupOutput) DeregistrationDelay() pulumi.IntPtrOutput
Amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds.
func (TargetGroupOutput) ElementType ¶
func (TargetGroupOutput) ElementType() reflect.Type
func (TargetGroupOutput) HealthCheck ¶
func (o TargetGroupOutput) HealthCheck() lb.TargetGroupHealthCheckPtrOutput
Health Check configuration block. Detailed below.
func (TargetGroupOutput) IpAddressType ¶
func (o TargetGroupOutput) IpAddressType() pulumi.StringPtrOutput
The type of IP addresses used by the target group, only supported when target type is set to `ip`. Possible values are `ipv4` or `ipv6`.
func (TargetGroupOutput) LambdaMultiValueHeadersEnabled ¶
func (o TargetGroupOutput) LambdaMultiValueHeadersEnabled() pulumi.BoolPtrOutput
Whether the request and response headers exchanged between the load balancer and the Lambda function include arrays of values or strings. Only applies when `target_type` is `lambda`. Default is `false`.
func (TargetGroupOutput) LoadBalancingAlgorithmType ¶
func (o TargetGroupOutput) LoadBalancingAlgorithmType() pulumi.StringPtrOutput
Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is `round_robin`, `least_outstanding_requests`, or `weighted_random`. The default is `round_robin`.
func (TargetGroupOutput) LoadBalancingAnomalyMitigation ¶ added in v2.9.0
func (o TargetGroupOutput) LoadBalancingAnomalyMitigation() pulumi.StringPtrOutput
Determines whether to enable target anomaly mitigation. Target anomaly mitigation is only supported by the `weighted_random` load balancing algorithm type. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#automatic-target-weights) for more information. The value is `"on"` or `"off"`. The default is `"off"`.
func (TargetGroupOutput) LoadBalancingCrossZoneEnabled ¶
func (o TargetGroupOutput) LoadBalancingCrossZoneEnabled() pulumi.StringPtrOutput
Indicates whether cross zone load balancing is enabled. The value is `"true"`, `"false"` or `"use_load_balancer_configuration"`. The default is `"use_load_balancer_configuration"`.
func (TargetGroupOutput) Name ¶
func (o TargetGroupOutput) Name() pulumi.StringPtrOutput
Name of the target group. If omitted, this provider will assign a random, unique name. This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen.
func (TargetGroupOutput) NamePrefix ¶
func (o TargetGroupOutput) NamePrefix() pulumi.StringPtrOutput
Creates a unique name beginning with the specified prefix. Conflicts with `name`. Cannot be longer than 6 characters.
func (TargetGroupOutput) Port ¶
func (o TargetGroupOutput) Port() pulumi.IntPtrOutput
Port on which targets receive traffic, unless overridden when registering a specific target. Required when `target_type` is `instance`, `ip` or `alb`. Does not apply when `target_type` is `lambda`.
func (TargetGroupOutput) PreserveClientIp ¶
func (o TargetGroupOutput) PreserveClientIp() pulumi.StringPtrOutput
Whether client IP preservation is enabled. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#client-ip-preservation) for more information.
func (TargetGroupOutput) Protocol ¶
func (o TargetGroupOutput) Protocol() pulumi.StringPtrOutput
Protocol to use for routing traffic to the targets. Should be one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, or `UDP`. Required when `target_type` is `instance`, `ip`, or `alb`. Does not apply when `target_type` is `lambda`.
func (TargetGroupOutput) ProtocolVersion ¶
func (o TargetGroupOutput) ProtocolVersion() pulumi.StringPtrOutput
Only applicable when `protocol` is `HTTP` or `HTTPS`. The protocol version. Specify `GRPC` to send requests to targets using gRPC. Specify `HTTP2` to send requests to targets using HTTP/2. The default is `HTTP1`, which sends requests to targets using HTTP/1.1
func (TargetGroupOutput) ProxyProtocolV2 ¶
func (o TargetGroupOutput) ProxyProtocolV2() pulumi.BoolPtrOutput
Whether to enable support for proxy protocol v2 on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#proxy-protocol) for more information. Default is `false`.
func (TargetGroupOutput) SlowStart ¶
func (o TargetGroupOutput) SlowStart() pulumi.IntPtrOutput
Amount time for targets to warm up before the load balancer sends them a full share of requests. The range is 30-900 seconds or 0 to disable. The default value is 0 seconds.
func (TargetGroupOutput) Stickiness ¶
func (o TargetGroupOutput) Stickiness() lb.TargetGroupStickinessPtrOutput
Stickiness configuration block. Detailed below.
func (TargetGroupOutput) Tags ¶
func (o TargetGroupOutput) Tags() pulumi.StringMapOutput
Map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
func (TargetGroupOutput) TargetFailovers ¶
func (o TargetGroupOutput) TargetFailovers() lb.TargetGroupTargetFailoverArrayOutput
Target failover block. Only applicable for Gateway Load Balancer target groups. See target_failover for more information.
func (TargetGroupOutput) TargetGroupHealth ¶ added in v2.14.0
func (o TargetGroupOutput) TargetGroupHealth() lb.TargetGroupTargetGroupHealthPtrOutput
Target health requirements block. See target_group_health for more information.
func (TargetGroupOutput) TargetHealthStates ¶ added in v2.1.0
func (o TargetGroupOutput) TargetHealthStates() lb.TargetGroupTargetHealthStateArrayOutput
Target health state block. Only applicable for Network Load Balancer target groups when `protocol` is `TCP` or `TLS`. See target_health_state for more information.
func (TargetGroupOutput) TargetType ¶
func (o TargetGroupOutput) TargetType() pulumi.StringPtrOutput
Type of target that you must specify when registering targets with this target group. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTargetGroup.html) for supported values. The default is `instance`.
Note that you can't specify targets for a target group using both instance IDs and IP addresses.
If the target type is `ip`, specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can't specify publicly routable IP addresses.
Network Load Balancers do not support the `lambda` target type.
Application Load Balancers do not support the `alb` target type.
func (TargetGroupOutput) ToTargetGroupOutput ¶
func (o TargetGroupOutput) ToTargetGroupOutput() TargetGroupOutput
func (TargetGroupOutput) ToTargetGroupOutputWithContext ¶
func (o TargetGroupOutput) ToTargetGroupOutputWithContext(ctx context.Context) TargetGroupOutput
func (TargetGroupOutput) ToTargetGroupPtrOutput ¶
func (o TargetGroupOutput) ToTargetGroupPtrOutput() TargetGroupPtrOutput
func (TargetGroupOutput) ToTargetGroupPtrOutputWithContext ¶
func (o TargetGroupOutput) ToTargetGroupPtrOutputWithContext(ctx context.Context) TargetGroupPtrOutput
func (TargetGroupOutput) VpcId ¶
func (o TargetGroupOutput) VpcId() pulumi.StringPtrOutput
Identifier of the VPC in which to create the target group. Required when `target_type` is `instance`, `ip` or `alb`. Does not apply when `target_type` is `lambda`.
type TargetGroupPtrInput ¶
type TargetGroupPtrInput interface { pulumi.Input ToTargetGroupPtrOutput() TargetGroupPtrOutput ToTargetGroupPtrOutputWithContext(context.Context) TargetGroupPtrOutput }
TargetGroupPtrInput is an input type that accepts TargetGroupArgs, TargetGroupPtr and TargetGroupPtrOutput values. You can construct a concrete instance of `TargetGroupPtrInput` via:
TargetGroupArgs{...} or: nil
func TargetGroupPtr ¶
func TargetGroupPtr(v *TargetGroupArgs) TargetGroupPtrInput
type TargetGroupPtrOutput ¶
type TargetGroupPtrOutput struct{ *pulumi.OutputState }
func (TargetGroupPtrOutput) ConnectionTermination ¶
func (o TargetGroupPtrOutput) ConnectionTermination() pulumi.BoolPtrOutput
Whether to terminate connections at the end of the deregistration timeout on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#deregistration-delay) for more information. Default is `false`.
func (TargetGroupPtrOutput) DeregistrationDelay ¶
func (o TargetGroupPtrOutput) DeregistrationDelay() pulumi.IntPtrOutput
Amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds.
func (TargetGroupPtrOutput) Elem ¶
func (o TargetGroupPtrOutput) Elem() TargetGroupOutput
func (TargetGroupPtrOutput) ElementType ¶
func (TargetGroupPtrOutput) ElementType() reflect.Type
func (TargetGroupPtrOutput) HealthCheck ¶
func (o TargetGroupPtrOutput) HealthCheck() lb.TargetGroupHealthCheckPtrOutput
Health Check configuration block. Detailed below.
func (TargetGroupPtrOutput) IpAddressType ¶
func (o TargetGroupPtrOutput) IpAddressType() pulumi.StringPtrOutput
The type of IP addresses used by the target group, only supported when target type is set to `ip`. Possible values are `ipv4` or `ipv6`.
func (TargetGroupPtrOutput) LambdaMultiValueHeadersEnabled ¶
func (o TargetGroupPtrOutput) LambdaMultiValueHeadersEnabled() pulumi.BoolPtrOutput
Whether the request and response headers exchanged between the load balancer and the Lambda function include arrays of values or strings. Only applies when `target_type` is `lambda`. Default is `false`.
func (TargetGroupPtrOutput) LoadBalancingAlgorithmType ¶
func (o TargetGroupPtrOutput) LoadBalancingAlgorithmType() pulumi.StringPtrOutput
Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is `round_robin`, `least_outstanding_requests`, or `weighted_random`. The default is `round_robin`.
func (TargetGroupPtrOutput) LoadBalancingAnomalyMitigation ¶ added in v2.9.0
func (o TargetGroupPtrOutput) LoadBalancingAnomalyMitigation() pulumi.StringPtrOutput
Determines whether to enable target anomaly mitigation. Target anomaly mitigation is only supported by the `weighted_random` load balancing algorithm type. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#automatic-target-weights) for more information. The value is `"on"` or `"off"`. The default is `"off"`.
func (TargetGroupPtrOutput) LoadBalancingCrossZoneEnabled ¶
func (o TargetGroupPtrOutput) LoadBalancingCrossZoneEnabled() pulumi.StringPtrOutput
Indicates whether cross zone load balancing is enabled. The value is `"true"`, `"false"` or `"use_load_balancer_configuration"`. The default is `"use_load_balancer_configuration"`.
func (TargetGroupPtrOutput) Name ¶
func (o TargetGroupPtrOutput) Name() pulumi.StringPtrOutput
Name of the target group. If omitted, this provider will assign a random, unique name. This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen.
func (TargetGroupPtrOutput) NamePrefix ¶
func (o TargetGroupPtrOutput) NamePrefix() pulumi.StringPtrOutput
Creates a unique name beginning with the specified prefix. Conflicts with `name`. Cannot be longer than 6 characters.
func (TargetGroupPtrOutput) Port ¶
func (o TargetGroupPtrOutput) Port() pulumi.IntPtrOutput
Port on which targets receive traffic, unless overridden when registering a specific target. Required when `target_type` is `instance`, `ip` or `alb`. Does not apply when `target_type` is `lambda`.
func (TargetGroupPtrOutput) PreserveClientIp ¶
func (o TargetGroupPtrOutput) PreserveClientIp() pulumi.StringPtrOutput
Whether client IP preservation is enabled. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#client-ip-preservation) for more information.
func (TargetGroupPtrOutput) Protocol ¶
func (o TargetGroupPtrOutput) Protocol() pulumi.StringPtrOutput
Protocol to use for routing traffic to the targets. Should be one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, or `UDP`. Required when `target_type` is `instance`, `ip`, or `alb`. Does not apply when `target_type` is `lambda`.
func (TargetGroupPtrOutput) ProtocolVersion ¶
func (o TargetGroupPtrOutput) ProtocolVersion() pulumi.StringPtrOutput
Only applicable when `protocol` is `HTTP` or `HTTPS`. The protocol version. Specify `GRPC` to send requests to targets using gRPC. Specify `HTTP2` to send requests to targets using HTTP/2. The default is `HTTP1`, which sends requests to targets using HTTP/1.1
func (TargetGroupPtrOutput) ProxyProtocolV2 ¶
func (o TargetGroupPtrOutput) ProxyProtocolV2() pulumi.BoolPtrOutput
Whether to enable support for proxy protocol v2 on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#proxy-protocol) for more information. Default is `false`.
func (TargetGroupPtrOutput) SlowStart ¶
func (o TargetGroupPtrOutput) SlowStart() pulumi.IntPtrOutput
Amount time for targets to warm up before the load balancer sends them a full share of requests. The range is 30-900 seconds or 0 to disable. The default value is 0 seconds.
func (TargetGroupPtrOutput) Stickiness ¶
func (o TargetGroupPtrOutput) Stickiness() lb.TargetGroupStickinessPtrOutput
Stickiness configuration block. Detailed below.
func (TargetGroupPtrOutput) Tags ¶
func (o TargetGroupPtrOutput) Tags() pulumi.StringMapOutput
Map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
func (TargetGroupPtrOutput) TargetFailovers ¶
func (o TargetGroupPtrOutput) TargetFailovers() lb.TargetGroupTargetFailoverArrayOutput
Target failover block. Only applicable for Gateway Load Balancer target groups. See target_failover for more information.
func (TargetGroupPtrOutput) TargetGroupHealth ¶ added in v2.14.0
func (o TargetGroupPtrOutput) TargetGroupHealth() lb.TargetGroupTargetGroupHealthPtrOutput
Target health requirements block. See target_group_health for more information.
func (TargetGroupPtrOutput) TargetHealthStates ¶ added in v2.1.0
func (o TargetGroupPtrOutput) TargetHealthStates() lb.TargetGroupTargetHealthStateArrayOutput
Target health state block. Only applicable for Network Load Balancer target groups when `protocol` is `TCP` or `TLS`. See target_health_state for more information.
func (TargetGroupPtrOutput) TargetType ¶
func (o TargetGroupPtrOutput) TargetType() pulumi.StringPtrOutput
Type of target that you must specify when registering targets with this target group. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTargetGroup.html) for supported values. The default is `instance`.
Note that you can't specify targets for a target group using both instance IDs and IP addresses.
If the target type is `ip`, specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can't specify publicly routable IP addresses.
Network Load Balancers do not support the `lambda` target type.
Application Load Balancers do not support the `alb` target type.
func (TargetGroupPtrOutput) ToTargetGroupPtrOutput ¶
func (o TargetGroupPtrOutput) ToTargetGroupPtrOutput() TargetGroupPtrOutput
func (TargetGroupPtrOutput) ToTargetGroupPtrOutputWithContext ¶
func (o TargetGroupPtrOutput) ToTargetGroupPtrOutputWithContext(ctx context.Context) TargetGroupPtrOutput
func (TargetGroupPtrOutput) VpcId ¶
func (o TargetGroupPtrOutput) VpcId() pulumi.StringPtrOutput
Identifier of the VPC in which to create the target group. Required when `target_type` is `instance`, `ip` or `alb`. Does not apply when `target_type` is `lambda`.