Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add network load balancer example for specified internal IP address #742

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion plugins/modules/elb_network_lb.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@
subnet_mappings:
description:
- A list of dicts containing the IDs of the subnets to attach to the load balancer. You can also specify the allocation ID of an Elastic IP
to attach to the load balancer. You can specify one Elastic IP address per subnet.
to attach to the load balancer or the internal IP address for an internal load balancer. You can specify one Elastic IP address or internal
address per subnet.
- This parameter is mutually exclusive with I(subnets).
type: list
elements: dict
Expand Down Expand Up @@ -169,6 +170,21 @@
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
Expand Down