A platform group wants the settings for a web app hosted in Azure App Service, such as app settings and connection strings, captured as code so every environment is built the same way. What is the best way to do this?
Show answer and explanation
Answer: C
Bicep and ARM templates can manage App Service configuration through the configuration child resource of the site, covering app settings, connection strings and general site options. Because the values are declared in source control, every environment receives identical configuration and every change goes through review. Portal edits, spreadsheet imports and hand-edited server files leave no reliable record and drift apart over time, so they do not meet an infrastructure as code standard.
Why the other options are wrong
- A. Portal edits are manual and undocumented, so they cannot be reproduced reliably and drift from whatever the code is supposed to describe.
- B. A spreadsheet import is still an off-pipeline manual step with no declarative state, so it does not make the configuration repeatable or reviewable.
- D. Editing files on the host bypasses the deployment process entirely, leaves no audit trail, and is not a supported way to configure a managed platform service.