Skip to content

Commit aaf9a94

Browse files
committed
update code
1 parent c4f4c91 commit aaf9a94

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

internal/services/loadbalancer/loadbalancer_nat_pool_resource_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,8 @@ resource "azurerm_lb_nat_pool" "test" {
282282
frontend_port_end = 81
283283
backend_port = 3389
284284
frontend_ip_configuration_name = "one-%[1]d"
285-
enable_floating_ip = true
286-
enable_tcp_reset = true
285+
floating_ip_enabled = true
286+
tcp_reset_enabled = true
287287
idle_timeout_in_minutes = 10
288288
}
289289
`, data.RandomInteger, data.Locations.Primary, sku)

internal/services/loadbalancer/nat_pool_resource.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ func resourceArmLoadBalancerNatPool() *pluginsdk.Resource {
9898
ValidateFunc: validation.StringIsNotEmpty,
9999
},
100100

101-
"enable_floating_ip": {
101+
"floating_ip_enabled": {
102102
Type: pluginsdk.TypeBool,
103103
Optional: true,
104104
},
105105

106-
"enable_tcp_reset": {
106+
"tcp_reset_enabled": {
107107
Type: pluginsdk.TypeBool,
108108
Optional: true,
109109
},
@@ -220,8 +220,8 @@ func resourceArmLoadBalancerNatPoolRead(d *pluginsdk.ResourceData, meta interfac
220220
backendPort = int(*props.BackendPort)
221221
}
222222
d.Set("backend_port", backendPort)
223-
d.Set("enable_floating_ip", props.EnableFloatingIP)
224-
d.Set("enable_tcp_reset", props.EnableTCPReset)
223+
d.Set("floating_ip_enabled", props.EnableFloatingIP)
224+
d.Set("tcp_reset_enabled", props.EnableTCPReset)
225225

226226
frontendIPConfigName := ""
227227
frontendIPConfigID := ""
@@ -308,11 +308,11 @@ func expandAzureRmLoadBalancerNatPool(d *pluginsdk.ResourceData, lb *network.Loa
308308
BackendPort: utils.Int32(int32(d.Get("backend_port").(int))),
309309
}
310310

311-
if v, ok := d.GetOk("enable_floating_ip"); ok {
311+
if v, ok := d.GetOk("floating_ip_enabled"); ok {
312312
properties.EnableFloatingIP = utils.Bool(v.(bool))
313313
}
314314

315-
if v, ok := d.GetOk("enable_tcp_reset"); ok {
315+
if v, ok := d.GetOk("tcp_reset_enabled"); ok {
316316
properties.EnableTCPReset = utils.Bool(v.(bool))
317317
}
318318

website/docs/r/lb_nat_pool.html.markdown

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ The following arguments are supported:
6565
* `frontend_port_end` - (Required) The last port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with this Load Balancer. Possible values range between 1 and 65534, inclusive.
6666
* `backend_port` - (Required) The port used for the internal endpoint. Possible values range between 1 and 65535, inclusive.
6767
* `idle_timeout_in_minutes` - (Optional) Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `30`. Defaults to `4`.
68-
* `enable_floating_ip` - (Optional) Are the floating IPs enabled for this Load Balancer Rule? A floating IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to `false`.
69-
* `enable_tcp_reset` - (Optional) Is TCP Reset enabled for this Load Balancer Rule? Defaults to `false`.
68+
* `floating_ip_enabled` - (Optional) Are the floating IPs enabled for this Load Balancer Rule? A floating IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to `false`.
69+
* `tcp_reset_enabled` - (Optional) Is TCP Reset enabled for this Load Balancer Rule? Defaults to `false`.
7070

7171
## Attributes Reference
7272

0 commit comments

Comments
 (0)