PARALLAX

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

NameTypeRequiredDefaultDescription
access_keystr
aws_ca_bundlepath
aws_configdict
cross_zone_load_balancingbool
debug_botocore_endpoint_logsboolfalse
deletion_protectionbool
endpoint_urlstr
ip_address_typestr
listenerslist
namestryes
profilestr
purge_listenersbooltrue
purge_tagsbooltrue
regionstr
schemestrinternet-facing
secret_keystr
session_tokenstr
statestrpresent
subnet_mappingslist
subnetslist
tagsdict
validate_certsbooltrue
waitbool
wait_timeoutint

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
Search
    ↑ ↓ move↵ openesc close