File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -457,6 +457,7 @@ public virtual List<PSResourceGroupDeployment> FilterResourceGroupDeployments(Fi
457
457
List < PSResourceGroupDeployment > deployments = new List < PSResourceGroupDeployment > ( ) ;
458
458
string resourceGroup = options . ResourceGroupName ;
459
459
string name = options . DeploymentName ;
460
+ List < string > excludedProvisioningStates = options . ExcludedProvisioningStates ?? new List < string > ( ) ;
460
461
461
462
if ( ! string . IsNullOrEmpty ( resourceGroup ) && ! string . IsNullOrEmpty ( name ) )
462
463
{
@@ -475,7 +476,15 @@ public virtual List<PSResourceGroupDeployment> FilterResourceGroupDeployments(Fi
475
476
}
476
477
}
477
478
478
- return deployments ;
479
+ if ( excludedProvisioningStates . Count > 0 )
480
+ {
481
+ return deployments . Where ( d => excludedProvisioningStates
482
+ . All ( s => ! s . Equals ( d . ProvisioningState , StringComparison . OrdinalIgnoreCase ) ) ) . ToList ( ) ;
483
+ }
484
+ else
485
+ {
486
+ return deployments ;
487
+ }
479
488
}
480
489
481
490
/// <summary>
You can’t perform that action at this time.
0 commit comments