Azure / deployment-stacks

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

Deployment Resource ID missing when failure is due to template rather resource #108

Open slavizh opened 1 year ago

slavizh commented 1 year ago

When deployment fails due to resource not being able to be provisioned we get nice error in FailedResources property and Error property but when there is a failure for template we do not have deployment resource ID, we only get the error from that deployment but not in which deployment exactly occurred (see screenshot). Knowing which deployment is can help you save time to understand where the problem is without having to browse the portal.

image

If we trace on portal we will see this and we can see which deployment the error is on:

image

stuartko commented 1 year ago

@slavizh Was this a nested deployment within your stack Deployment? Just to confirm, you are seeing $yourStack.deploymentId as empty?

slavizh commented 1 year ago

Yes, this is nested deployment. $yourStack.deploymentId is not empty but when you have nested deployments the actual error is within the lowest deployment in the three. As you can see from the screenshot Target is missing there. I think that should be the resource ID of the deployment from where the error comes.

stuartko commented 1 year ago

@slavizh : Got it. Thanks for confirming. The "target" property is on our roadmap for errors, we're just awaiting a coordination between a deployments version API bump and an SDK release.