Azure / Azure/bicep

backendIPConfiguration missing when deploying Microsoft.Network/loadBalancers/inboundNatRules

Open
#8,786 4 comments 0 reactions 0 assignees View on GitHub
provider bug types: swagger inaccuracy
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

**Bicep version**
`Microsoft.Network/loadBalancers/inboundNatRules@2022-05-01`
Bicep: Bicep CLI version 0.11.1 (030248df55)

**Describe the bug**

Using the Portal and selecting "Azure Virtual Machine " option to create NAT rule results in (resources.azure.com):

```json
{
"name": "ssh-tunnel-attempt2",
"id": "/subscriptions/###/resourceGroups/ds-edp-test/providers/Microsoft.Network/loadBalancers/###/inboundNatRules/ssh-tunnel-attempt2",
"etag": "W/\"570da290-0502-4c95-b006-160d66b305e9\"",
"type": "Microsoft.Network/loadBalancers/inboundNatRules",
"properties": {
"provisioningState": "Succeeded",
"frontendIPConfiguration": {
"id": "/subscriptions/###/resourceGroups/###/providers/Microsoft.Network/loadBalancers/###/frontendIPConfigurations/lb-pip-conf"
},
"frontendPort": 35555,
"backendPort": 22,
"enableFloatingIP": false,
"idleTimeoutInMinutes": 4,
"protocol": "Tcp",
"enableDestinationServiceEndpoint": false,
"enableTcpReset": false,
"allowBackendPortConflict": false,
"backendIPConfiguration": {
"id": "/subscriptions/###/resourceGroups/###/providers/Microsoft.Network/networkInterfaces/ssh-tunnel-nic/ipConfigurations/ipconfig1"
}
}
}
```

Creating this in bicep seems to be impossible:

```
WARNING: C:\temp\buildStatusMaker\ssh-tunnel.bicep(217,5) : Warning BCP037: The property "backendIpConfiguration" is not allowed on objects of type "InboundNatRulePropertiesFormat". Permissible properties include "backendAddressPool", "enableFloatingIP", "enableTcpReset", "frontendPortRangeEnd", "frontendPortRangeStart", "idleTimeoutInMinutes". If this is an inaccuracy in the documentation, please report it to the Bicep Team. [https://aka.ms/bicep-type-issues]
```

When the resource is deployed it is identical to the one created by the Portal, **except** the `backendIPConfiguration` property is missing.

Contributor guide

Open the contributing guide

Research direction

Reproduce the warning with Microsoft.Network/loadBalancers/inboundNatRules@2022-05-01 and inspect the type definition for InboundNatRulePropertiesFormat. The work is done when backendIPConfiguration is accepted and a deployment preserves the property shown in the Portal-generated resource.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.