@@ -50,16 +50,16 @@ function plugin_after_vm_creat () {
var_default_val enable_outbound_rule_fix 1
debugexec az network lb create --resource-group$resgrp--name$LB_NAME--sku Standard --frontend-ip-name$FE_IP--backend-pool-name$BE_PL--vnet-name$vnetname||exit
if[[$enable_outbound_rule_fix= 1 ]];then
# This is an unreliable trick to use NIC directly. It's from good-case ARM template dump.
debugexec az network lb address-pool update -g$resgrp--lb-name$LB_NAME-n$BE_PL--vnet$vnetname--backend-addresses[0].name="${resgrp}_${vmname}VMNicipconfig${vmname}"||exit
else
#if [[ $enable_outbound_rule_fix = 1 ]]; then
# # This is an unreliable trick to use NIC directly. It's from good-case ARM template dump.
debugexec az network lb address-pool update -g$resgrp--lb-name$LB_NAME-n$BE_PL--vnet$vnetname--backend-addresses"[{name:addr1,ip-address:10.0.0.4}]"||exit
fi
#fi
# TODO: The correct way to redirect PUBLIC:4022 to VM1:22. But azure-cli cannot associate nat-rule to machine. Even if u manually created one on az portal, it will de-associate after some time.