File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
src/ResourceManager/Resources
Commands.ResourceManager/Cmdlets/Components
Commands.Resources/Models.ResourceGroups Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,11 @@ public static class Constants
69
69
/// </summary>
70
70
public static readonly string MicrosoftResourcesDeploymentOperationsType = Constants . MicrosoftResourceNamesapce + "/deployments/operations" ;
71
71
72
+ /// <summary>
73
+ /// The deployments resource type.
74
+ /// </summary>
75
+ public static readonly string MicrosoftResourcesDeploymentType = Constants . MicrosoftResourceNamesapce + "/deployments" ;
76
+
72
77
/// <summary>
73
78
/// The policy definition resource type.
74
79
/// </summary>
Original file line number Diff line number Diff line change 22
22
using System . Threading . Tasks ;
23
23
using Hyak . Common ;
24
24
using Microsoft . Azure . Commands . Resources . Models . Authorization ;
25
+ using Microsoft . Azure . Commands . ResourceManager . Cmdlets . Components ;
25
26
using Microsoft . Azure . Commands . Tags . Model ;
26
27
using Microsoft . Azure . Common . Authentication ;
27
28
using Microsoft . Azure . Common . Authentication . Models ;
@@ -335,6 +336,21 @@ private List<DeploymentOperation> GetNewOperations(List<DeploymentOperation> old
335
336
{
336
337
newOperations . Add ( operation ) ;
337
338
}
339
+
340
+ //If nested deployment, get the operations under those deployments as well
341
+ if ( operation . Properties . TargetResource . ResourceType . Equals ( Constants . MicrosoftResourcesDeploymentType , StringComparison . OrdinalIgnoreCase ) )
342
+ {
343
+ List < DeploymentOperation > newNestedOperations = new List < DeploymentOperation > ( ) ;
344
+ DeploymentOperationsListResult result ;
345
+
346
+ result = ResourceManagementClient . DeploymentOperations . List (
347
+ resourceGroupName : ResourceIdUtility . GetResourceGroupName ( operation . Properties . TargetResource . Id ) ,
348
+ deploymentName : operation . Properties . TargetResource . ResourceName ,
349
+ parameters : null ) ;
350
+
351
+ newNestedOperations = GetNewOperations ( operations , result . Operations ) ;
352
+ newOperations . AddRange ( newNestedOperations ) ;
353
+ }
338
354
}
339
355
340
356
return newOperations ;
You can’t perform that action at this time.
0 commit comments