File tree Expand file tree Collapse file tree 6 files changed +36
-6
lines changed
src/Resources/ResourceManager/Implementation/DeploymentStacks Expand file tree Collapse file tree 6 files changed +36
-6
lines changed Original file line number Diff line number Diff line change @@ -251,7 +251,16 @@ protected override void OnProcessRecord()
251
251
throwIfNotExists : false ) != null )
252
252
{
253
253
254
- string confirmationMessage = ( $ "The DeploymentStack '{ Name } ' you're trying to create already exists in the current management group. Do you want to overwrite it?") ;
254
+ string confirmationMessage = $ "The DeploymentStack '{ Name } ' you're trying to create already exists in ManagementGroup '{ ManagementGroupId } '. " +
255
+ $ "Do you want to overwrite it with the following actions?" +
256
+ ( ! shouldDeleteResources || ! shouldDeleteResourceGroups ? "\n Detaching: " : "" ) +
257
+ ( ! shouldDeleteResources ? "resources" : "" ) +
258
+ ( ! shouldDeleteResources && ! shouldDeleteResourceGroups ? ", " : "" ) +
259
+ ( ! shouldDeleteResourceGroups ? "resourceGroups" : "" ) +
260
+ ( shouldDeleteResources || shouldDeleteResourceGroups ? "\n Deleting: " : "" ) +
261
+ ( shouldDeleteResources ? "resources" : "" ) +
262
+ ( shouldDeleteResources && shouldDeleteResourceGroups ? ", " : "" ) +
263
+ ( shouldDeleteResourceGroups ? "resourceGroups" : "" ) ;
255
264
256
265
ConfirmAction (
257
266
Force . IsPresent ,
Original file line number Diff line number Diff line change @@ -240,7 +240,16 @@ protected override void OnProcessRecord()
240
240
Name ,
241
241
throwIfNotExists : false ) != null )
242
242
{
243
- string confirmationMessage = ( $ "The DeploymentStack '{ Name } ' in Resource Group '{ ResourceGroupName } ' you're trying to create already exists. Do you want to overwrite it?") ;
243
+ string confirmationMessage = $ "The DeploymentStack '{ Name } ' you're trying to create already exists in ResourceGroup '{ ResourceGroupName } '." +
244
+ $ "Do you want to overwrite it with the following actions?" +
245
+ ( ! shouldDeleteResources || ! shouldDeleteResourceGroups ? "\n Detaching: " : "" ) +
246
+ ( ! shouldDeleteResources ? "resources" : "" ) +
247
+ ( ! shouldDeleteResources && ! shouldDeleteResourceGroups ? ", " : "" ) +
248
+ ( ! shouldDeleteResourceGroups ? "resourceGroups" : "" ) +
249
+ ( shouldDeleteResources || shouldDeleteResourceGroups ? "\n Deleting: " : "" ) +
250
+ ( shouldDeleteResources ? "resources" : "" ) +
251
+ ( shouldDeleteResources && shouldDeleteResourceGroups ? ", " : "" ) +
252
+ ( shouldDeleteResourceGroups ? "resourceGroups" : "" ) ;
244
253
245
254
ConfirmAction (
246
255
Force . IsPresent ,
Original file line number Diff line number Diff line change @@ -248,7 +248,16 @@ protected override void OnProcessRecord()
248
248
throwIfNotExists : false ) != null )
249
249
{
250
250
251
- string confirmationMessage = ( $ "The DeploymentStack '{ Name } ' you're trying to create already exists in the current subscription. Do you want to overwrite it?") ;
251
+ string confirmationMessage = $ "The DeploymentStack '{ Name } ' you're trying to create already exists in the current subscription. " +
252
+ $ "Do you want to overwrite it with the following actions?" +
253
+ ( ! shouldDeleteResources || ! shouldDeleteResourceGroups ? "\n Detaching: " : "" ) +
254
+ ( ! shouldDeleteResources ? "resources" : "" ) +
255
+ ( ! shouldDeleteResources && ! shouldDeleteResourceGroups ? ", " : "" ) +
256
+ ( ! shouldDeleteResourceGroups ? "resourceGroups" : "" ) +
257
+ ( shouldDeleteResources || shouldDeleteResourceGroups ? "\n Deleting: " : "" ) +
258
+ ( shouldDeleteResources ? "resources" : "" ) +
259
+ ( shouldDeleteResources && shouldDeleteResourceGroups ? ", " : "" ) +
260
+ ( shouldDeleteResourceGroups ? "resourceGroups" : "" ) ;
252
261
253
262
ConfirmAction (
254
263
Force . IsPresent ,
Original file line number Diff line number Diff line change @@ -85,7 +85,8 @@ protected override void OnProcessRecord()
85
85
"/providers/Microsoft.Management/managementGroups/<managementgroupid>/providers/Microsoft.Resources/deploymentStacks/<stackname>" ) ;
86
86
}
87
87
88
- string confirmationMessage = $ "Are you sure you want to remove ManagementGroup scoped DeploymentStack '{ Name } ' with the following actions?" +
88
+ string confirmationMessage = $ "Are you sure you want to remove ManagementGroup scoped DeploymentStack '{ Name } ' " +
89
+ $ "in ManagementGroup '{ ManagementGroupId } ' with the following actions?" +
89
90
( ! shouldDeleteResources || ! shouldDeleteResourceGroups ? "\n Detaching: " : "" ) +
90
91
( ! shouldDeleteResources ? "resources" : "" ) +
91
92
( ! shouldDeleteResources && ! shouldDeleteResourceGroups ? ", " : "" ) +
Original file line number Diff line number Diff line change @@ -86,7 +86,8 @@ protected override void OnProcessRecord()
86
86
throw new PSArgumentException ( $ "Provided Id '{ ResourceId } ' is not in correct form. Should be in form " +
87
87
"/subscriptions/<subid>/resourceGroups/<rgname>/providers/Microsoft.Resources/deploymentStacks/<stackname>" ) ;
88
88
}
89
- string confirmationMessage = $ "Are you sure you want to remove ResourceGroup scoped DeploymentStack '{ Name } ' with the following actions?" +
89
+ string confirmationMessage = $ "Are you sure you want to remove ResourceGroup scoped DeploymentStack '{ Name } ' " +
90
+ $ "in ResourceGroup '{ ResourceGroupName } ' with the following actions?" +
90
91
( ! shouldDeleteResources || ! shouldDeleteResourceGroups ? "\n Detaching: " : "" ) +
91
92
( ! shouldDeleteResources ? "resources" : "" ) +
92
93
( ! shouldDeleteResources && ! shouldDeleteResourceGroups ? ", " : "" ) +
Original file line number Diff line number Diff line change @@ -80,7 +80,8 @@ protected override void OnProcessRecord()
80
80
"/subscriptions/<subid>/providers/Microsoft.Resources/deploymentStacks/<stackname>" ) ;
81
81
}
82
82
83
- string confirmationMessage = $ "Are you sure you want to remove Subscription scoped DeploymentStack '{ Name } ' with the following actions?" +
83
+ string confirmationMessage = $ "Are you sure you want to remove Subscription scoped DeploymentStack '{ Name } ' " +
84
+ $ "in current Subscription with the following actions?" +
84
85
( ! shouldDeleteResources || ! shouldDeleteResourceGroups ? "\n Detaching: " : "" ) +
85
86
( ! shouldDeleteResources ? "resources" : "" ) +
86
87
( ! shouldDeleteResources && ! shouldDeleteResourceGroups ? ", " : "" ) +
You can’t perform that action at this time.
0 commit comments