Azure / deployment-stacks

Contains Deployment Stacks CLI scripts and releases
MIT License
87 stars 6 forks source link

New-Az*DeploymentStack is not on par with New-Az*Deployment #79

Closed slavizh closed 1 year ago

slavizh commented 1 year ago

Is your feature request related to a problem? Please describe. I have give this feedback via the previous private preview #46 but seems it was not implemented. So here it is again;


PS D:\dev\deployment-stacks\lz-analysis-services-monitoring> New-AzSubscriptionDeploymentStack -Name lz-analysis-services-monitoring -TemplateFile .\main.bicep -TemplateParameterFile .\main.parameters.json -Location 'West Europe' -OutVariable p -Verbose
VERBOSE: Using Bicep v0.13.1
VERBOSE: Performing the operation "Update" on target "lz-analysis-services-monitoring".

Confirm
The DeploymentStack 'lz-analysis-services-monitoring' you're trying to create already exists in the current subscription. Do you want to overwrite it with the following actions?
Detaching: resources, resourceGroups
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): y
VERBOSE: 11:24:45 - Checking stack deployment status
VERBOSE: 11:24:50 - Checking stack deployment status
VERBOSE: 11:24:55 - Checking stack deployment status
VERBOSE: 11:25:00 - Checking stack deployment status
VERBOSE: 11:25:05 - Checking stack deployment status
VERBOSE: 11:25:10 - Checking stack deployment status
VERBOSE: 11:25:15 - Checking stack deployment status
VERBOSE: 11:25:21 - Checking stack deployment status

Id                          : /subscriptions/<subscription ID>/providers/Microsoft.Resources/deploymentStacks/lz-analysis-services-monitoring
Name                        : lz-analysis-services-monitoring

Example of what information from Verbose should be surfaced:

VERBOSE: Using Bicep v0.13.1
VERBOSE:
VERBOSE: 11:35:05 - Template is valid.
VERBOSE: 11:35:06 - Create template deployment 'lz-analysis-services-monitoring'
VERBOSE: 11:35:06 - Checking deployment status in 5 seconds
VERBOSE: 11:35:12 - Resource Microsoft.Resources/deployments 'analysisServiceMonResources-cs2xkwqz3lgrm-0' provisioning status is running
VERBOSE: 11:35:12 - Resource Microsoft.Resources/deployments 'analysisServiceAlerts-smowcwptun77s' provisioning status is running
VERBOSE: 11:35:12 - Resource Microsoft.OperationalInsights/workspaces 'ws007' provisioning status is succeeded
VERBOSE: 11:35:12 - Resource Microsoft.Resources/resourceGroups 'test-analysisserv-rg' provisioning status is succeeded
VERBOSE: 11:35:12 - Checking deployment status in 12 seconds
VERBOSE: 11:35:25 - Checking deployment status in 15 seconds
VERBOSE: 11:35:40 - Resource Microsoft.Resources/deployments 'analysisServiceMonResources-cs2xkwqz3lgrm-0' provisioning status is succeeded
VERBOSE: 11:35:40 - Resource Microsoft.Resources/deployments 'analysisServiceAlerts-smowcwptun77s' provisioning status is succeeded

Template spec: image

Deployment: image

harshpatel17 commented 1 year ago

I'll take a look at this, thanks @slavizh!

slavizh commented 1 year ago

@harshpatel17 Also deletion of resources should be shown with Verbose. Something like: VERBOSE: 13:53:25 - Resource Microsoft.DocumentDB/databaseAccounts 'cosmo4343' is being deleted VERBOSE: 13:53:25 - Resource Microsoft.DocumentDB/databaseAccounts 'cosmo4343' is being deleted VERBOSE: 13:53:25 - Resource Microsoft.DocumentDB/databaseAccounts 'cosmo4343' is deleted

dantedallag commented 1 year ago

@slavizh as this issue is hitting on a couple of different things, could we close it and open new ones for the things that are still issues? I believe that the output display issue has been fixed, but some of the verbose stuff could probably use a separate ticket (I think your most recent comment is already covered in https://github.com/Azure/deployment-stacks/issues/107). Thanks!

slavizh commented 1 year ago

@dantedallag yes, proceed to closing. I think I have opened separate issues on what is missing or not working for the latest release available .