Azure / deployment-stacks

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

Deployment stack stuck Initializing #128

Closed Grant-Rc closed 8 months ago

Grant-Rc commented 9 months ago

Describe the bug Deploying a basic test of 1 RG and 1 vNet and its stuck Initializing because i mistakenly used an invalid address prefix

To Reproduce Steps to reproduce the behavior: az stack sub create --name 'testing1' --location $Location --template-file .\deploy\main-example-rg.bicep --parameters .\parameters\deploy-example-rg.parameters.json --deny-settings-mode 'denyWriteAndDelete'`

Bicep `targetScope = 'subscription'

param location string = deployment().location param Tags object

module rgCreation1 '../modules/Microsoft.Resources/resourceGroups/deploy.bicep' = { name: 'rg-deployment-1' params: { tags: Tags location: location name: 'testing1' } }

module vnet1 '../modules/Microsoft.Network/virtualNetworks/deploy.bicep' = { scope: resourceGroup('testing1') name: 'vnet-deploy-1' params: { location: location addressPrefixes: [ '10.300.0.0/26' ] name: 'test-tobedeleted-1' } }`

Expected behavior Error out

Screenshots

image

Repro Environment Host OS: Windows 11 Powershell Version: 7 az 2.52

Server Debugging Information Correlation ID: na Tenant ID: na Timestamp of issue (please include time zone):
21 Sept 2023, 11:47 am NZst Data Center (eg, West Central US, West Europe): Australia East

Additional context tried to also delete the stack but errors out with

(DeploymentStackResourceConflict) The deployment stack cannot be updated while it's in a non-terminal state. Code: DeploymentStackResourceConflict Message: The deployment stack cannot be updated while it's in a non-terminal state.

snarkywolverine commented 9 months ago

@Grant-Rc If it is still stuck in 'creating' or 'initializing', can you please share the subscription and resource group of the stack? Once we have that info, we can mark it as 'failed' so you can reattempt the deployment.

Grant-Rc commented 9 months ago

@snarkywolverine that would be great as they are still "stuck" 0ac17b55-1d59-4646-848c-637430e18516 image even 1 stuck in deleting

dantedallag commented 9 months ago

@Grant-Rc I was able to reset all 4 of these stacks. Let me know if this resolves your issue. We will look more into the root issue.

Grant-Rc commented 9 months ago

@Grant-Rc I was able to reset all 4 of these stacks. Let me know if this resolves your issue. We will look more into the root issue.

Thank you @dantedallag, I was able to remove the stacks, Any idea how to remove the RG now though? I did asked the stack delete to also delete the RG but it was left behind.

Still has the deny assignment for the deleted stack image

Grant-Rc commented 9 months ago

FYI - have also logged a support ticket to get help with this RBAC - TrackingID#2309260030005747

azcloudfarmer commented 9 months ago

Hi @Grant-Rc - we are in contact with the support team on this case. We are working towards a resolution and will get back to you within the next 72 hours.

Grant-Rc commented 9 months ago

Hi @Grant-Rc - we are in contact with the support team on this case. We are working towards a resolution and will get back to you within the next 72 hours.

Sounds good cause I just had Kefei Yang (Shanghai Wicresoft Co,.Ltd.) contact me via Teams if you can also work with them

dantedallag commented 9 months ago

@Grant-Rc I believe I was able to delete it. Could you confirm?

Grant-Rc commented 9 months ago

@Grant-Rc I believe I was able to delete it. Could you confirm?

yes, thank you image

Can you also remove the one from the other RG in the same subscription please image

I assume going forward there will be an option or something?

snarkywolverine commented 9 months ago

Under normal circumstances, the deny assignment will be managed automatically by the deployment stack.

In this case, the reset command failed to track the resources (and deny assignments) from the previous iteration of the stack, which is how you ended up not being able to remove the resource group.

dantedallag commented 9 months ago

@Grant-Rc Can you confirm that the deny assignment was deleted?

azcloudfarmer commented 8 months ago

Hi @Grant-Rc - can you confirm deletion of the deny assignment on your end? Thanks!

azcloudfarmer commented 8 months ago

@Grant-Rc friendly ping/reminder

Grant-Rc commented 8 months ago

sorry team i was away. Yep the assignment and the RG was removed, thank you for all your help