Sync eng/common directory with azure-sdk-tools for PR 7113 (#1634)

* Remove ARM deployment after deploy

* Update eng/common/TestResources/New-TestResources.ps1

Co-authored-by: Heath Stewart <heaths@outlook.com>

* Apply suggestions from code review

---------

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
Co-authored-by: Heath Stewart <heaths@outlook.com>
This commit is contained in:
Azure SDK Bot 2023-10-16 17:00:19 -07:00 коммит произвёл GitHub
Родитель a64e2f4c55
Коммит 2018714c93
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -771,7 +771,6 @@ try {
-TemplateParameterObject $templateFileParameters `
-Force:$Force
}
if ($deployment.ProvisioningState -ne 'Succeeded') {
Write-Host "Deployment '$($deployment.DeploymentName)' has state '$($deployment.ProvisioningState)' with CorrelationId '$($deployment.CorrelationId)'. Exiting..."
Write-Host @'
@ -803,6 +802,9 @@ try {
Write-Verbose "Removing compiled bicep file $($templateFile.jsonFilePath)"
Remove-Item $templateFile.jsonFilePath
}
Write-Host "Deleting ARM deployment as it may contain secrets. Deployed resources will not be affected."
$null = $deployment | Remove-AzResourceGroupDeployment
}
} finally {