Write-Host "Checking if '$(legacy_functionapp_name) exists"
$functionAppCheck = az functionapp list --query "[?name=='$(legacy_functionapp_name)']" | ConvertFrom-Json
$functionAppExists = $functionAppCheck.Length -gt 0
Write-Host "Exists: $functionAppExists"
if ($functionAppExists) {
Write-Host "Deleting legacy function app"
az functionapp delete -n $(legacy_functionapp_name) -g $(resourcegroup_name)
}
else {
Write-Host "Doing nothing"
}
Created
August 29, 2024 00:19
-
-
Save jackawatts/79ce64926a22b0439e4364d5d014c8a3 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment