Last active
December 6, 2021 05:24
-
-
Save margani/47af52b2f8086fbe24f0a5ec38643778 to your computer and use it in GitHub Desktop.
This gist has commands to enable/disable --vnet-route-all-enabled config in function apps #azure #functionapps #vnet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$subscriptionName = "<Your Subscription>" | |
$searchFunctionAppName = "<Your Search Name>" | |
$enableRouteAll = "false" | |
az login | |
az account set -s $subscriptionName | |
# Getting the status of the config | |
az functionapp list --query "[?contains(name, '$searchFunctionAppName')].{Name: name, RG: resourceGroup}" | ConvertFrom-Json | ForEach-Object { az functionapp config show -n $_.Name -g $_.RG --query vnetRouteAllEnabled } | |
# Setting the config --vnet-route-all-enabled to true or false | |
az functionapp list --query "[?contains(name, '$searchFunctionAppName')].{Name: name, RG: resourceGroup}" | ConvertFrom-Json | ForEach-Object { az functionapp config set --vnet-route-all-enabled $enableRouteAll -n $_.Name -g $_.RG } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment