AZ-104 Question 123
Select 2You manage an existing Azure App Service through a Bicep file that deploys a Web App. Your security team now requires that the app enforce HTTPS only. You have updated the Bicep file and need to redeploy to the same resource group. Which two actions must you include to ensure HTTPS is enforced for the existing Web App?
- A
Add an httpsOnly property in the Bicep file with the value set to true for the Web App resource
- B
Change the kind property from 'app' to 'functionapp' and redeploy
- C
Use az deployment group create to deploy the updated Bicep file to the same resource group
- D
Create a new resource group before deploying the updated Bicep file
Show answer and explanation
Correct answers: A, C
Explanation
To enforce HTTPS on an existing Web App via Bicep, you must add httpsOnly: true in the resource definition and redeploy to the same resource group using commands like az deployment group create. Changing the resource kind or creating a new resource group is not required.
- A. Correct.
Adding the httpsOnly property ensures that the Web App will only allow HTTPS connections, aligning with the new security requirement
- B. Incorrect.
Changing the kind to 'functionapp' is unrelated to enforcing HTTPS for a Web App and would change the service type
- C. Correct.
Using the az deployment group create command with the updated Bicep file applies the new HTTPS setting to the existing resource group
- D. Incorrect.
Creating a new resource group is unnecessary when you can redeploy to the existing resource group