Skip to content

Commit

Permalink
Sync eng/common directory with azure-sdk-tools for PR 7113 (#37166)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
3 people committed Oct 17, 2023
1 parent 734fe89 commit 0900e14
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion eng/common/TestResources/New-TestResources.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 @'
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 0900e14

Please sign in to comment.