check sql server
This commit is contained in:
Родитель
dd0a1a3f37
Коммит
9f850b0a85
|
@ -131,13 +131,11 @@ $kv_check=az rest --method post --uri $KeyVaultApiUri --headers 'Content-Type=ap
|
|||
|
||||
if( $kv_check.reason -eq "AlreadyExists")
|
||||
{
|
||||
Write-Host "KeyVault name is already exists."
|
||||
Write-Host ""
|
||||
Write-Host "KeyVault name is already exists."
|
||||
Write-Host "To Purge KeyVault please use the following doc:"
|
||||
Write-Host "https://learn.microsoft.com/en-us/cli/azure/keyvault?view=azure-cli-latest#az-keyvault-purge."
|
||||
Write-Host ""
|
||||
Write-Host "You could use new KeyVault name by passing parameter -KeyVault"
|
||||
Write-Host ""
|
||||
Throw "🛑 KeyVault name is already in use. Please use different name"
|
||||
Exit
|
||||
}
|
||||
|
@ -150,10 +148,9 @@ $sql_exists=az sql server show --name $SQLServerName -g $ResourceGroupForDeploym
|
|||
|
||||
if (!($sql_exists[0] -cLike "*ERROR: (ResourceNotFound)*"))
|
||||
{
|
||||
Write-Host ""
|
||||
Write-Host "SQl Server name is already exists."
|
||||
Write-Host ""
|
||||
Write-Host "Please delete existing instance or use new sql Instance name passing parameter -SQLServerName"
|
||||
Write-Host ""
|
||||
Throw "🛑 SQL Server name is already in use. Please use different name"
|
||||
Exit
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче