Vowneee
Vowneee

Reputation: 1481

What is the use of specifying deployment name during AzureResourceGroup Deployment?

I have a Azure Pipeline to create alerts in Azure. So in pipeline task I am using the AzureResourceGroupDeployment task and where I gave option to define the deployment name. My requirement is to create alerts timely basis when needed and using a sample alertquert deployment template and parameters.json where the parameters values will be replaced with each time when pipeline triggered for creating the alerts with different input values using runtime parameter ad the parameters.json will be updated accordingly.

So here I am not sure about the deployment name, as whether I have to specify the deployment name differently in each time when I create different alerts or, I can have the same deployment name itself?

If i create the alerts with same deployment name for with different alerts names, whether this will delete or modify the previously created alerts using the same deployment ?

Also if I want to update the alerts which is already created, whether I can update it by using the ame deployment name and same alert name?

Upvotes: 1

Views: 1239

Answers (1)

Vince Bowdren
Vince Bowdren

Reputation: 9208

The resource group keeps a record of deployment events; the information stored includes the parameters input, the resources created, and any outputs. Each record is identified by a name; that's what the deployment name is.

This history of deployment events is accessible in the azure portal, and also through az cli and azure powershell.

It's up to you whether you want to reuse a deployment name again, or use unique names (e.g. by adding a datetime suffix). If you reuse a name in a future deployment then the previous record will be overwritten; so you lose your history a bit, but it means that the deployment events record is quite tidy, holding only the most recent deployment record for each resource.

If you prefer to use new unique deployment names each time, then you get the advantage of having a fuller history; but there is a limit of 800 deployments per resource group and if you reach it then you cannot deploy anything until you delete some records.

Upvotes: 3

Related Questions