Skip to content

Commit

Permalink
Add disable_outbound_snat configuration to azure_rm_loadbalancer module
Browse files Browse the repository at this point in the history
  • Loading branch information
tfmark committed Jan 26, 2022
1 parent 765e82d commit 8905770
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions plugins/modules/azure_rm_loadbalancer.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,12 @@
enable_floating_ip:
description:
- Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group.
disable_outbound_snat:
description:
- Configure outbound source network address translation (SNAT)
- The default value is False
- True is equivalent to "Use outbound rules to provide backend pool members access to the internet" in portal
- False is equivalent to "Use implicit outbound rule" in portal
inbound_nat_rules:
description:
- Collection of inbound NAT Rules used by a load balancer.
Expand Down Expand Up @@ -558,6 +564,10 @@
),
enable_floating_ip=dict(
type='bool'
),
disable_outbound_snat=dict(
type='bool',
default=False
)
)

Expand Down Expand Up @@ -765,7 +775,8 @@ def exec_module(self, **kwargs):
frontend_port=self.frontend_port,
backend_port=self.backend_port,
idle_timeout=self.idle_timeout,
enable_floating_ip=False
enable_floating_ip=False,
disable_outbound_snat=False
)] if self.protocol else None

# create new load balancer structure early, so it can be easily compared
Expand Down Expand Up @@ -835,7 +846,8 @@ def exec_module(self, **kwargs):
frontend_port=item.get('frontend_port'),
backend_port=item.get('backend_port'),
idle_timeout_in_minutes=item.get('idle_timeout'),
enable_floating_ip=item.get('enable_floating_ip')
enable_floating_ip=item.get('enable_floating_ip'),
disable_outbound_snat=item.get('disable_outbound_snat')
) for item in self.load_balancing_rules] if self.load_balancing_rules else None

inbound_nat_rules_param = [self.network_models.InboundNatRule(
Expand Down

0 comments on commit 8905770

Please sign in to comment.