AZ-104 Question 119
Single answerYou are an Azure Administrator for a web application that was originally deployed via an Azure Resource Manager (ARM) template. New requirements include adding a custom environment variable to the existing Web App and enabling geo-redundancy for the SQL Database without deleting existing resources. Which modification approach should you take to meet these requirements?
- A
Create new resource definitions for the Web App and SQL Database with the updated properties, and remove the old resource definitions.
- B
Update the existing resource definitions in the template by adding the new environment variable for the Web App and modifying the Database SKU properties to enable geo-redundancy.
- C
Add new parameters for the Web App and SQL Database in the template, then set the deployment mode to Complete to force redeployment of all resources.
- D
Redeploy the template using incremental mode but change the resource names to ensure that the modified resources are created as brand-new entities.
Show answer and explanation
Correct answer: B
Explanation
Modifying the existing resource definitions in the ARM template (rather than creating new ones or renaming) allows you to make isolated changes such as adding application settings and enabling geo-redundancy for the existing database without destroying or recreating the resources.
- A. Incorrect.
Replacing the old resource definitions with new ones would remove existing configurations and might cause downtime or data loss.
- B. Correct.
Updating the existing resource definitions with only the needed changes (environment variable and Database SKU) ensures resources are modified in-place without affecting existing data or removing resources.
- C. Incorrect.
Forcing a complete redeployment can disrupt existing resources and may create a conflict if parameters are not handled properly.
- D. Incorrect.
Changing resource names causes Azure to treat them as new resources, which can lead to unnecessary re-creation and potential data loss.