AZ-305 exam dumps

AZ-305 practice question 194 of 243

Designing Microsoft Azure Infrastructure Solutions. Professional level, Microsoft. Free question with the correct answer and a full explanation.

AZ-305 Question 194

Single answer

Contoso is building a new multi-tier .NET Core web application that will run on Azure App Service with an Azure SQL Database. They store their source code in a GitHub repository and want to automate both infrastructure provisioning (with Bicep or ARM templates) and application deployment. Their goal is to ensure that any commit to the main branch automatically updates both the infrastructure and the application in staging and production environments. Which automated deployment approach should you recommend?

  1. A

    Implement a GitHub Actions workflow that triggers on every commit, uses a Bicep or ARM template to provision or update Azure resources, and deploys the application to Azure App Service.

  2. B

    Perform a manual deployment process after building the .NET Core application locally and uploading the compiled artifacts directly to the production Azure App Service.

  3. C

    Rely on a weekly cron job on a self-hosted server to run Azure CLI scripts that provision resources and deploy the .NET Core application.

  4. D

    Use Azure Cloud Shell to run Bicep templates manually whenever updates need to be made, and deploy the application separately using FTP or manual upload.

Show answer and explanation

Correct answer: A

Explanation

In modern DevOps practices, leveraging continuous integration and continuous delivery (CI/CD) pipelines is essential for reliability and consistency. GitHub Actions integrates seamlessly with GitHub repositories to automate build, test, and deployment tasks. It can reliably update both the infrastructure (via Bicep/ARM templates) and the application code. For more information, refer to the official GitHub documentation on workflows with Azure (https://docs.github.com/actions/automating-builds-and-tests/building-and-testing-net).

  • A. Correct.

    Option 1 is correct. GitHub Actions can be configured to trigger workflows whenever code is integrated into the repository. It can run Bicep or ARM templates to provision or update infrastructure and then deploy application code to Azure App Service. This method provides a fast, consistent, and automated approach across all environments.

  • B. Incorrect.

    Option 2 is incorrect. Manual deployment is prone to human error and inconsistent configurations. It also doesn’t ensure that every code commit is automatically built, tested, and deployed.

  • C. Incorrect.

    Option 3 is incorrect. A weekly cron job on a self-hosted server does not provide continuous integration or continuous delivery. Changes would only be deployed at set intervals, leading to delays and potential manual oversight.

  • D. Incorrect.

    Option 4 is incorrect. Using Azure Cloud Shell manually for Bicep template execution and separate manual uploading of the application does not fulfill the requirement for an automated, end-to-end CI/CD process driven by commits to the repository.

Timed practice exam

Take a AZ-305 practice test under exam conditions

70 questions in 100 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam