View Full Microsoft AZ-400 Exam Dumps and Practice Test Dumps
Q261. Which Azure DevOps feature allows a deployment to pause until an external condition has been satisfied?
1) Release gate
2) Git tag
3) Pipeline cache
4) Variable group
Correct Answer: 1)
Explanation:
Release gates can evaluate external signals before allowing a deployment to continue. They are useful when a release should wait for conditions such as monitoring results, work-item queries, or other automated validation signals. This provides an additional control between deployment stages and can help prevent a release from progressing when required conditions are not met. Git tags identify source versions, pipeline caching improves build performance, and variable groups provide shared configuration. Release gates therefore help automate release validation by checking external conditions before a deployment proceeds.
Q262. What is the main purpose of an Azure DevOps environment in a multi-stage pipeline?
1) Store source-code commits
2) Represent a deployment target and provide deployment history
3) Replace Git repositories
4) Store package dependencies
Correct Answer: 2)
Explanation:
An Azure DevOps environment represents a logical deployment target used by pipelines. It can be associated with resources such as virtual machines, Kubernetes clusters, or other supported deployment targets. Environments also provide visibility into deployment history, allowing teams to understand which pipeline versions were deployed and when. Source-code commits belong in repositories, package dependencies can be stored in artifact feeds, and environments do not replace Git repositories. Therefore, environments are particularly useful for organizing deployment targets, controlling releases, and maintaining deployment-related traceability.
Q263. Which environment configuration can require an approval before a deployment job proceeds?
1) Environment checks
2) Git aliases
3) Package metadata
4) Build cache keys
Correct Answer: 1)
Explanation:
Environment checks can be configured to control access to deployment targets and require specific conditions to be satisfied before a deployment continues. One common example is an approval check that requires an authorized person to approve the deployment. Other checks can evaluate business rules, schedules, or external conditions. Git aliases simplify command usage, package metadata describes stored packages, and cache keys determine which cached dependencies can be reused. Environment checks therefore provide a centralized governance mechanism for controlling deployment progression independently of the pipeline code itself.
Q264. Which Azure Pipelines concept allows a stage to wait for multiple prerequisite stages before starting?
1) Stage dependencies
2) Secure files
3) Git tags
4) Artifact feeds
Correct Answer: 1)
Explanation:
Stage dependencies define relationships between stages in a multi-stage Azure Pipeline. A stage can be configured to depend on one or more earlier stages, ensuring that required validation or deployment activities have completed before the next stage begins. This is useful when a production stage should wait for multiple independent test or security stages. Secure files provide protected file storage, Git tags identify source versions, and artifact feeds manage packages. Stage dependencies therefore provide the structure needed to control execution order and coordinate complex multi-stage CI/CD workflows.
Q265. Which YAML feature allows the same template to behave differently based on a parameter supplied by the calling pipeline?
1) Template parameters
2) Agent demands
3) Audit logs
4) Deployment slots
Correct Answer: 1)
Explanation:
Template parameters allow reusable YAML templates to accept values from the pipeline that calls them. These parameters can control which jobs, stages, tasks, or configuration elements are included when the template is expanded. This makes templates more flexible while maintaining centralized pipeline logic. For example, a shared deployment template can accept an environment or application parameter and generate appropriate configuration. Agent demands determine which agents can execute jobs, audit logs record activities, and deployment slots provide application environments. Template parameters are therefore useful for creating configurable and reusable pipeline definitions.
Q266. Which Azure Pipelines expression is evaluated during template expansion rather than during pipeline execution?
1) Compile-time template expression
2) Runtime variable
3) Environment approval
4) Service hook
Correct Answer: 1)
Explanation:
Compile-time template expressions are evaluated when Azure Pipelines expands the YAML template before the pipeline begins execution. They can be used with parameters and conditional insertion to determine which parts of a template are included in the final pipeline structure. Runtime expressions, by contrast, are evaluated while the pipeline is running and can depend on runtime variables or execution results. Environment approvals control deployments, while service hooks integrate events with external systems. Understanding compile-time versus runtime evaluation is important when designing reusable YAML templates and conditional pipeline structures.
Q267. Which Azure DevOps capability allows different repositories to be declared as resources in a YAML pipeline?
1) Repository resources
2) Deployment slots
3) Test plans
4) Variable groups
Correct Answer: 1)
Explanation:
Repository resources allow YAML pipelines to declare repositories that the pipeline needs to access. This is useful when a pipeline depends on source code, shared templates, scripts, or configuration stored in repositories other than the primary repository. Declaring repositories as resources makes these dependencies explicit and easier to manage. Deployment slots provide application environments, test plans organize testing, and variable groups provide shared pipeline configuration. Repository resources therefore support multi-repository pipeline designs and help teams organize dependencies between source repositories and automated workflows.
Q268. A pipeline needs to check out source code from two different Git repositories during the same job. Which capability should be used?
1) Multi-repo checkout
2) Artifact retention
3) Release gates
4) Work item queries
Correct Answer: 1)
Explanation:
Multi-repo checkout allows a pipeline job to retrieve content from multiple repositories. This is useful when an application repository depends on shared scripts, infrastructure definitions, configuration, or testing resources maintained in separate repositories. The pipeline can check out the required repositories into the agent workspace and use their contents during execution. Artifact retention controls how long outputs are stored, release gates control deployment progression, and work item queries retrieve tracked work. Multi-repo checkout is therefore the appropriate capability when a single pipeline job needs source content from multiple Git repositories.
Q269. Which Azure Artifacts feature allows packages to be downloaded from another package source when they are not available in the local feed?
1) Upstream sources
2) Branch policies
3) Deployment groups
4) Pipeline decorators
Correct Answer: 1)
Explanation:
Upstream sources allow an Azure Artifacts feed to access packages from configured external or other package sources when the requested package is not already available locally. This can simplify dependency management by giving developers a consistent feed endpoint while reducing the need to configure every external source separately. Branch policies govern source-control changes, deployment groups identify deployment targets in classic release scenarios, and pipeline decorators inject predefined pipeline steps. Upstream sources are therefore useful for centralized package consumption and dependency management across development teams.
Q270. What is the primary benefit of pinning dependency versions in a CI/CD pipeline?
1) It guarantees faster internet access
2) It makes builds more predictable and reproducible
3) It removes the need for testing
4) It prevents all security vulnerabilities
Correct Answer: 2)
Explanation:
Pinning dependency versions means specifying exact or controlled versions of external packages instead of allowing builds to automatically retrieve potentially changing versions. This improves reproducibility because the same dependency versions can be used across different builds and environments. Without version pinning, a newly released dependency can unexpectedly change application behavior or introduce compatibility issues. Pinning does not eliminate testing or guarantee security, and it does not inherently improve internet speed. Teams should still monitor pinned dependencies for security updates and periodically evaluate whether newer safe versions should be adopted.
Q271. Which practice helps ensure that an application build produces consistent results across different execution environments?
1) Reproducible builds
2) Manual artifact editing
3) Random dependency updates
4) Untracked configuration changes
Correct Answer: 1)
Explanation:
Reproducible builds aim to produce the same or equivalent output when the same source code, dependencies, configuration, and build process are used. This improves confidence in build integrity and makes it easier to investigate differences between environments. Dependency versions, build tools, configuration, and other relevant inputs should be controlled so that unexpected changes do not alter the output. Manual artifact editing and random dependency updates reduce consistency, while untracked configuration changes make builds harder to reproduce. Reproducible builds therefore support reliable CI/CD processes and improve confidence in artifact integrity.
Q272. Which Docker command concept is typically used to create an application container image from a Dockerfile?
1) Docker build
2) Docker inspect
3) Docker stop
4) Docker logs
Correct Answer: 1)
Explanation:
The Docker build operation creates a container image using instructions defined in a Dockerfile and the specified build context. In a CI pipeline, this process can compile application components, install required dependencies, copy application files, and package the resulting environment into an image. Docker inspect displays information about existing Docker objects, Docker stop stops running containers, and Docker logs retrieves container output. A CI/CD pipeline can then push the resulting image to a container registry for deployment. Docker build is therefore the core operation for creating a container image from a Dockerfile.
Q273. Where should a container image normally be stored after a successful CI build so that deployment pipelines can retrieve it?
1) Azure Container Registry
2) Azure Boards
3) Azure DevOps Audit Logs
4) Git commit messages
Correct Answer: 1)
Explanation:
Azure Container Registry, or ACR, is a managed private registry for storing and distributing container images. A CI pipeline can build an image, tag it with an appropriate version, and push it to ACR. Deployment stages can then retrieve the same image for testing, staging, or production deployment. Azure Boards manages work items, audit logs record organizational activities, and Git commit messages describe source changes rather than serving as a container registry. Using a centralized registry also improves image management, access control, and traceability throughout the container delivery lifecycle.
Q274. Which practice reduces the risk of deploying different container images to different environments?
1) Rebuild the image separately for every environment
2) Promote the same tested image through environments
3) Modify the image manually after testing
4) Use an unversioned image tag
Correct Answer: 2)
Explanation:
Promoting the same tested container image through development, testing, staging, and production helps ensure that the exact artifact validated earlier is the one ultimately deployed. Rebuilding the image separately for each environment can introduce differences in dependencies, source code, or build conditions. Manually modifying an image after testing also breaks traceability. Unversioned tags can create ambiguity because the same tag may point to different image versions over time. Promoting an immutable, tested image therefore provides stronger consistency, traceability, and confidence throughout the container deployment lifecycle.
Q275. Which Kubernetes probe determines whether a container is still running correctly and should be restarted if it fails?
1) Readiness probe
2) Liveness probe
3) Startup artifact
4) Deployment approval
Correct Answer: 2)
Explanation:
A Kubernetes liveness probe determines whether a container is still functioning properly. If the liveness probe repeatedly fails according to the configured rules, Kubernetes can restart the affected container. This helps recover applications that have become unresponsive or entered an unhealthy state. A readiness probe has a different purpose: it determines whether the application is ready to receive traffic. Startup configuration helps handle slow-starting applications, while deployment approvals are unrelated to Kubernetes health checks. Therefore, the liveness probe is the appropriate mechanism for detecting containers that should be restarted.
Q276. What is the primary purpose of a Kubernetes readiness probe?
1) Determine whether a container should receive traffic
2) Build a Docker image
3) Store secrets in Azure DevOps
4) Create a Git repository
Correct Answer: 1)
Explanation:
A readiness probe determines whether an application is ready to receive network traffic. When a readiness check fails, Kubernetes can temporarily remove the pod from service endpoints while allowing the container to continue running. This is useful during startup, temporary dependency failures, or application states where accepting traffic would be unsafe. A liveness probe instead determines whether a container should be restarted. Docker image creation belongs to the container build process, while Azure DevOps manages pipeline and repository resources. Readiness probes therefore help route traffic only to healthy, available application instances.
Q277. Which Helm capability allows deployment configuration values to vary between environments without changing the main Kubernetes templates?
1) Values files
2) Git revert
3) Pipeline decorators
4) Artifact retention
Correct Answer: 1)
Explanation:
Helm values files allow teams to supply environment-specific configuration to Kubernetes templates. The same chart can be reused for development, testing, staging, and production while different values control items such as replica counts, image tags, resource limits, or application settings. This reduces duplication and supports consistent deployment patterns across environments. Git revert is used to undo source changes, pipeline decorators inject pipeline behavior, and artifact retention manages stored outputs. Helm values files therefore provide a flexible mechanism for separating deployment configuration from reusable Kubernetes templates.
Q278. Which approach is generally safest when a database schema change must support both the old and new application versions during a gradual deployment?
1) Make an immediate breaking schema change
2) Use a backward-compatible migration
3) Delete the existing database columns first
4) Disable database backups
Correct Answer: 2)
Explanation:
Backward-compatible database migrations allow old and new application versions to operate safely during a transition. This is particularly important for rolling, canary, or blue-green deployments where multiple application versions may temporarily run at the same time. A migration can introduce new structures without immediately removing those required by the previous version. After the new application is fully adopted and validated, obsolete structures can be removed in a later controlled migration. Immediate breaking changes can cause compatibility failures, while disabling backups increases recovery risk. Backward-compatible migrations therefore support safer continuous delivery.
Q279. Which approach is usually preferred when a production database migration cannot safely be reversed?
1) Roll forward with a corrective migration
2) Delete the production database
3) Ignore the migration failure
4) Restore source code without addressing the schema
Correct Answer: 1)
Explanation:
When a database migration cannot safely be reversed, rolling forward with a corrective migration can be safer than attempting to restore an incompatible previous schema. The corrective migration addresses the problem while preserving the current database state and maintaining compatibility with the deployed application. Database changes often cannot be treated like ordinary application binaries because data transformations may be irreversible. Deleting the database or ignoring the failure is unsafe, and reverting application source code alone may not resolve schema differences. A carefully designed roll-forward strategy can therefore provide a controlled recovery path for database-related deployment failures.
Q280. Which Azure service can enforce organizational rules such as allowed resource types, locations, or required configurations?
1) Azure Policy
2) Azure Boards
3) Azure Repos
4) Azure Test Plans
Correct Answer: 1)
Explanation:
Azure Policy allows organizations to define and enforce rules for Azure resources. Policies can restrict resource types or locations, require specific configurations, and evaluate resources for compliance with organizational standards. This supports governance, security, and regulatory requirements across cloud environments. Azure Boards is used for work tracking, Azure Repos manages source code, and Azure Test Plans supports testing activities. Azure Policy can also be incorporated into Infrastructure as Code and deployment workflows so that compliance requirements are checked consistently rather than relying only on manual reviews.