elb_network_lb
Manage a Network Load Balancer
Collection: community.aws
Full Name: community.aws.elb_network_lb
Synopsis
Manage a Network Load Balancer
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| access_key | str | |||
| aws_ca_bundle | path | |||
| aws_config | dict | |||
| cross_zone_load_balancing | bool | |||
| debug_botocore_endpoint_logs | bool | false | ||
| deletion_protection | bool | |||
| endpoint_url | str | |||
| ip_address_type | str | |||
| listeners | list | |||
| name | str | yes | ||
| profile | str | |||
| purge_listeners | bool | true | ||
| purge_tags | bool | true | ||
| region | str | |||
| scheme | str | internet-facing | ||
| secret_key | str | |||
| session_token | str | |||
| state | str | present | ||
| subnet_mappings | list | |||
| subnets | list | |||
| tags | dict | |||
| validate_certs | bool | true | ||
| wait | bool | |||
| wait_timeout | int |
Example
yaml
- name: Create an ELB and attach a listener
community.aws.elb_network_lb:
name: myelb
subnets:
- subnet-012345678
- subnet-abcdef000
listeners:
- Protocol: TCP # Required. The protocol for connections from clients to the load balancer (TCP, TLS, UDP or TCP_UDP) (case-sensitive).
Port: 80 # Required. The port on which the load balancer is listening.
DefaultActions:
- Type: forward # Required. Only 'forward' is accepted at this time
TargetGroupName: mytargetgroup # Required. The name of the target group
state: present
- name: Create an ELB with an attached Elastic IP address
community.aws.elb_network_lb:
name: myelb
subnet_mappings:
- SubnetId: subnet-012345678
AllocationId: eipalloc-aabbccdd
listeners:
- Protocol: TCP # Required. The protocol for connections from clients to the load balancer (TCP, TLS, UDP or TCP_UDP) (case-sensitive).
Port: 80 # Required. The port on which the load balancer is listening.
DefaultActions:
- Type: forward # Required. Only 'forward' is accepted at this time
TargetGroupName: mytargetgroup # Required. The name of the target group
state: present
- name: Create an internal ELB with a specified IP address
community.aws.elb_network_lb:
name: myelb
scheme: internal
subnet_mappings:
- SubnetId: subnet-012345678
PrivateIPv4Address: 192.168.0.1 # Must be an address from within the CIDR of the subnet.
listeners:
- Protocol: TCP # Required. The protocol for connections from clients to the load balancer (TCP, TLS, UDP or TCP_UDP) (case-sensitive).
Port: 80 # Required. The port on which the load balancer is listening.
DefaultActions:
- Type: forward # Required. Only 'forward' is accepted at this time
TargetGroupName: mytargetgroup # Required. The name of the target group
state: present
- name: Remove an ELB
community.aws.elb_network_lb:
name: myelb
state: absent