Skip to content

Commit 97a5574

Browse files
azure-sdkbenbpheaths
authored
Sync eng/common directory with azure-sdk-tools for PR 7113 (Azure#32463)
* Remove ARM deployment after deploy * Update eng/common/TestResources/New-TestResources.ps1 Co-authored-by: Heath Stewart <[email protected]> * Apply suggestions from code review --------- Co-authored-by: Ben Broderick Phillips <[email protected]> Co-authored-by: Heath Stewart <[email protected]>
1 parent a07f7be commit 97a5574

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

eng/common/TestResources/New-TestResources.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,6 @@ try {
771771
-TemplateParameterObject $templateFileParameters `
772772
-Force:$Force
773773
}
774-
775774
if ($deployment.ProvisioningState -ne 'Succeeded') {
776775
Write-Host "Deployment '$($deployment.DeploymentName)' has state '$($deployment.ProvisioningState)' with CorrelationId '$($deployment.CorrelationId)'. Exiting..."
777776
Write-Host @'
@@ -803,6 +802,9 @@ try {
803802
Write-Verbose "Removing compiled bicep file $($templateFile.jsonFilePath)"
804803
Remove-Item $templateFile.jsonFilePath
805804
}
805+
806+
Write-Host "Deleting ARM deployment as it may contain secrets. Deployed resources will not be affected."
807+
$null = $deployment | Remove-AzResourceGroupDeployment
806808
}
807809

808810
} finally {

0 commit comments

Comments
 (0)