Add NIC to 'Microsoft.Network/loadBalancers/backendAddressPools' #8076
|
Bicep CLI version 0.6.18 I'm working with 'Microsoft.Network/loadBalancers@2022-01-01' If you look at the json template below, after I added a NIC. The only property is "name": "rg-vmdctest01_vmdctest01-nic-1ipconfig1" The option 'IP address' under 'Backend Pool Configuration', works with code. But when I connect through Private Endpoint in a second vnet, it can't connect for some reason. Here you have a second issue. You can look at my code if this is helpful. I hope you can do something about that.
|
Replies: 1 comment 1 reply
|
To add a nic to the backend address pool you need to modify the resource internalNic 'Microsoft.Network/networkInterfaces@2021-05-01' = {
name: internalNicName
location: location
properties: {
ipConfigurations: [
{
name: 'ipconfig1'
properties: {
privateIPAddress: internalNicIP
privateIPAllocationMethod: 'Static'
subnet: {
id: externalSubnetId
}
loadBalancerBackendAddressPools: [
{
id: externalLBBackendPool
}
]
}
}
]
enableIPForwarding: true
enableAcceleratedNetworking: true
}
} |

To add a nic to the backend address pool you need to modify the
Microsoft.Network/networkInterfacesresource and not the actual load balancer. Here's an example snippet on what this could look like.