Skip to content

Commit

Permalink
allow operation succeeded and created state to be completed
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrat2005 committed Dec 2, 2024
1 parent 7aa525d commit b1b9372
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function Start-MonitorDeploymentForScope {
if ($operation.ProvisioningState -in $unhealthyDeploymentStates) {
Write-Warning "Deployment failed with provisioning state [$($operation.ProvisioningState -join ',')]. Error Message: [$($operation.StatusMessage)]. Please review the Azure logs of deployment [$deploymentName] in scope [$deploymentScope] for further details."
break
} elseif ($operation.ProvisioningState -eq 'Succeeded' -and $operation.StatusCode -ne 'OK') {
} elseif ($operation.ProvisioningState -eq 'Succeeded' -and $operation.StatusCode -notin 'OK', 'Created') {
Write-Debug "Deployment operation [$($operation.operationId)] is still running with provisioning state [$($operation.ProvisioningState)] and status code [$($operation.StatusCode)]"
$runningDeployment = $true
} else {
Expand Down Expand Up @@ -185,7 +185,7 @@ function Start-MonitorDeploymentForScope {
if ($operation.ProvisioningState -in $unhealthyDeploymentStates) {
Write-Warning "Deployment failed with provisioning state [$($operation.ProvisioningState -join ',')]. Error Message: [$($operation.StatusMessage)]. Please review the Azure logs of deployment [$deploymentName] in scope [$deploymentScope] for further details."
break
} elseif ($operation.ProvisioningState -eq 'Succeeded' -and $operation.StatusCode -ne 'OK') {
} elseif ($operation.ProvisioningState -eq 'Succeeded' -and $operation.StatusCode -notin 'OK', 'Created') {
Write-Debug "Deployment operation [$($operation.operationId)] is still running with provisioning state [$($operation.ProvisioningState)] and status code [$($operation.StatusCode)]"
$runningDeployment = $true
} else {
Expand Down

0 comments on commit b1b9372

Please sign in to comment.