Skip to content

Commit 0c7d8a1

Browse files
committed
working on refactor of DeploymentScope
1 parent f389059 commit 0c7d8a1

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/Resources/ResourceManager/Implementation/DeploymentStacks/NewAzManagementGroupDeploymentStack.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ public class NewAzManagementGroupDeploymentStack : DeploymentStacksCmdletBase
135135
/*[Parameter(Mandatory = false, HelpMessage = "Singal to delete unmanaged stack management groups after updating stack.")]
136136
public SwitchParameter DeleteManagementGroups { get; set; }*/
137137

138-
[Parameter(Mandatory = false,
139-
HelpMessage = "The scope at which the initial deployment should be created. If a scope isn't specified, it will default to the scope of the deployment stack.")]
140-
public string DeploymentScope { get; set; }
138+
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true,
139+
HelpMessage = "The subscription id at which the deployment should be created.")]
140+
public string DeploymentSubscriptionId { get; set; }
141141

142142
[Parameter(Mandatory = false,
143143
HelpMessage = "Do not ask for confirmation when overwriting an existing stack.")]
@@ -218,7 +218,7 @@ protected override void OnProcessRecord()
218218
resourcesCleanupAction: shouldDeleteResources ? "delete" : "detach",
219219
resourceGroupsCleanupAction: shouldDeleteResourceGroups ? "delete" : "detach",
220220
managementGroupsCleanupAction: "detach",
221-
DeploymentScope
221+
DeploymentSubscriptionId
222222
);
223223

224224
WriteObject(deploymentStack);

src/Resources/ResourceManager/Implementation/DeploymentStacks/SetAzManagmentGroupDeploymentStack.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ public class SetAzManagementGroupDeploymentStack : DeploymentStacksCmdletBase
124124
HelpMessage = "Location of the stack")]
125125
public string Location { get; set; }
126126

127-
[Parameter(Mandatory = false,
128-
HelpMessage = "The scope at which the initial deployment should be created. If a scope isn't specified, it will default to the scope of the deployment stack.")]
129-
public String DeploymentScope { get; set; }
127+
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true,
128+
HelpMessage = "The subscription Id at which the deployment should be created.")]
129+
public string DeploymentSubscriptionId { get; set; }
130130

131131
[Parameter(Mandatory = false, HelpMessage = "Signal to delete both unmanaged Resources and ResourceGroups after deleting stack.")]
132132
public SwitchParameter DeleteAll { get; set; }
@@ -220,7 +220,7 @@ protected override void OnProcessRecord()
220220
resourcesCleanupAction: shouldDeleteResources ? "delete" : "detach",
221221
resourceGroupsCleanupAction: shouldDeleteResourceGroups ? "delete" : "detach",
222222
managementGroupsCleanupAction: "detach",
223-
DeploymentScope
223+
DeploymentSubscriptionId
224224
);
225225

226226
WriteObject(deploymentStack);

0 commit comments

Comments
 (0)