Microsoft AZ-400 Practice Test 18
Question 170
Before changing the pipeline or service, engineers find: The same Terraform source yields changed resource behavior because local users and CI select different provider versions. Which evidence should the engineer inspect FIRST?
- Inspect template deployment mode, resource group contents, what-if output and retention requirements.
- Review required_providers, lockfile, init results and changed plan outputs.
- Inspect template inputs, source history, Key Vault access and deployment output.
- Inspect environment provisioning logs, resource tags, TTL and cleanup policies.
Explanation
Correct Answer
B:Review required_providers, lockfile, init results and changed plan outputs. This directly checks the uncertain behavior or control before changing production. IaC builds need controlled provider requirements and lockfile provenance. The resulting targeted action is: Pin and review provider versions with a committed lockfile and CI version checks.
Incorrect Answers
A:Inspect template deployment mode, resource group contents, what-if output and retention requirements. This would address a different situation, such as: A deployment pipeline uses complete mode unintentionally and deletes resources omitted from an updated ARM template. In the present case, the most directly relevant evidence is: Review required_providers, lockfile, init results and changed plan outputs. The crucial distinction is: IaC builds need controlled provider requirements and lockfile provenance.
C:Inspect template inputs, source history, Key Vault access and deployment output. This would address a different situation, such as: A Bicep parameter file stores database administrator passwords in plaintext committed to Git. In the present case, the most directly relevant evidence is: Review required_providers, lockfile, init results and changed plan outputs. The crucial distinction is: IaC builds need controlled provider requirements and lockfile provenance.
D:Inspect environment provisioning logs, resource tags, TTL and cleanup policies. This would address a different situation, such as: Engineers create temporary load-test environments manually but never remove costly public IP addresses. In the present case, the most directly relevant evidence is: Review required_providers, lockfile, init results and changed plan outputs. The crucial distinction is: IaC builds need controlled provider requirements and lockfile provenance.
Question 171
The DevOps team must resolve this situation: A downstream stage cannot determine the storage endpoint created by an infrastructure provisioning stage. Which engineering action is MOST appropriate?
- Limit production deployment to permitted protected refs and validated build artifacts.
- Move common steps into approved reusable templates with pinned or governed references.
- Emit a named output variable and consume it through the appropriate dependency expression.
- Optimize test partitions and concurrency to fit approved parallel job capacity.
Explanation
Correct Answer
C:Emit a named output variable and consume it through the appropriate dependency expression. This action addresses the specific failure or requirement and preserves delivery controls. Validation criterion: A downstream task receives the intended endpoint from the current successful run. Cross-stage values must be explicitly published and referenced through supported output syntax.
Incorrect Answers
A:Limit production deployment to permitted protected refs and validated build artifacts. This would address a different situation, such as: A deployment pipeline runs on feature-branch pushes despite a policy requiring releases only from protected main. In the present case, the most directly relevant engineering action is: Emit a named output variable and consume it through the appropriate dependency expression. The crucial distinction is: Cross-stage values must be explicitly published and referenced through supported output syntax.
B:Move common steps into approved reusable templates with pinned or governed references. This would address a different situation, such as: Teams each copy a deployment YAML template and security fixes reach only some repositories. In the present case, the most directly relevant engineering action is: Emit a named output variable and consume it through the appropriate dependency expression. The crucial distinction is: Cross-stage values must be explicitly published and referenced through supported output syntax.
D:Optimize test partitions and concurrency to fit approved parallel job capacity. This would address a different situation, such as: A large repository launches 100 independent test jobs though the organization owns only 10 paid parallel agent slots. In the present case, the most directly relevant engineering action is: Emit a named output variable and consume it through the appropriate dependency expression. The crucial distinction is: Cross-stage values must be explicitly published and referenced through supported output syntax.
Question 172
An Azure DevOps engineering team evaluates this condition: A cross-platform CLI is built only on Windows and fails later when customers run it on Linux. Which DevOps principle BEST explains the underlying weakness?
- Cross-stage values must be explicitly published and referenced through supported output syntax.
- Matrix job strategies can validate supported platforms from one pipeline definition.
- Reusable pipeline elements must preserve secret scoping and masking.
- Job-level token permissions should match each workflow task's minimum needs.
Explanation
Correct Answer
B:Matrix job strategies can validate supported platforms from one pipeline definition. This principle identifies the risk or delivery weakness in the case. Relevant evidence: Inspect supported OS/runtime targets, build matrix and test coverage. An appropriate controlled response is: Create a controlled matrix over required operating systems and runtime versions.
Incorrect Answers
A:Cross-stage values must be explicitly published and referenced through supported output syntax. This would address a different situation, such as: A downstream stage cannot determine the storage endpoint created by an infrastructure provisioning stage. In the present case, the most directly relevant principle is: Matrix job strategies can validate supported platforms from one pipeline definition. The crucial distinction is: Matrix job strategies can validate supported platforms from one pipeline definition.
C:Reusable pipeline elements must preserve secret scoping and masking. This would address a different situation, such as: An Azure Pipelines task group exposes a deployment secret as a plain variable and prints it during release. In the present case, the most directly relevant principle is: Matrix job strategies can validate supported platforms from one pipeline definition. The crucial distinction is: Matrix job strategies can validate supported platforms from one pipeline definition.
D:Job-level token permissions should match each workflow task's minimum needs. This would address a different situation, such as: A reusable GitHub Actions workflow grants write permissions to every job although most only compile and test. In the present case, the most directly relevant principle is: Matrix job strategies can validate supported platforms from one pipeline definition. The crucial distinction is: Matrix job strategies can validate supported platforms from one pipeline definition.
Question 173
Before changing the pipeline or service, engineers find: An Azure CLI task runs with set -x and echoes bearer tokens in the pipeline console log. Which evidence should the engineer inspect FIRST?
- Review workflow job ordering, environment references, OIDC identity claims and Azure role scope.
- Inspect Entra federated credentials, GitHub workflow identity claims and Azure roles.
- Inspect bash debug flags, Azure CLI output, log retention and secret masking.
- Inspect blob access, SAS lifetime, logs and secret-bearing file handling.
Explanation
Correct Answer
C:Inspect bash debug flags, Azure CLI output, log retention and secret masking. This directly checks the uncertain behavior or control before changing production. Secretless authentication still requires careful handling of temporary token output. The resulting targeted action is: Remove token-printing diagnostics and use restricted command output and log scanning.
Incorrect Answers
A:Review workflow job ordering, environment references, OIDC identity claims and Azure role scope. This would address a different situation, such as: A GitHub environment is protected, but the deployment job obtains Azure credentials in an earlier unprotected build step. In the present case, the most directly relevant evidence is: Inspect bash debug flags, Azure CLI output, log retention and secret masking. The crucial distinction is: Secretless authentication still requires careful handling of temporary token output.
B:Inspect Entra federated credentials, GitHub workflow identity claims and Azure roles. This would address a different situation, such as: A federated Azure identity accepts tokens from any branch in a public GitHub repository and can deploy production resources. In the present case, the most directly relevant evidence is: Inspect bash debug flags, Azure CLI output, log retention and secret masking. The crucial distinction is: Secretless authentication still requires careful handling of temporary token output.
D:Inspect blob access, SAS lifetime, logs and secret-bearing file handling. This would address a different situation, such as: A deployment downloads a private configuration file from a public blob URL before replacing placeholders. In the present case, the most directly relevant evidence is: Inspect bash debug flags, Azure CLI output, log retention and secret masking. The crucial distinction is: Secretless authentication still requires careful handling of temporary token output.
Question 174
After implementing the change, the team verifies: A deployment removes an application instance while it has open customer sessions, causing dropped purchases. Which result would BEST demonstrate that the issue is corrected?
- A later tag overwrite cannot change the image selected for this release.
- An in-flight checkout completes during a controlled target replacement.
- A sample rollout maintains required ready endpoints with no response interruption.
- A comparison can attribute a measured difference to the controlled feature variant.
Explanation
Correct Answer
B:An in-flight checkout completes during a controlled target replacement. This measures the actual expected outcome, rather than trusting only a configuration flag. Implemented action: Configure graceful shutdown and appropriate draining before removing active targets. Rolling replacement should account for connection draining and readiness transitions.
Incorrect Answers
A:A later tag overwrite cannot change the image selected for this release. This would address a different situation, such as: A release manifest references an ACR latest tag that was replaced after QA approval. In the present case, the most directly relevant verification is: An in-flight checkout completes during a controlled target replacement. The crucial distinction is: Rolling replacement should account for connection draining and readiness transitions.
C:A sample rollout maintains required ready endpoints with no response interruption. This would address a different situation, such as: An AKS update removes every API pod simultaneously because maxUnavailable equals the full replica count. In the present case, the most directly relevant verification is: An in-flight checkout completes during a controlled target replacement. The crucial distinction is: Rolling replacement should account for connection draining and readiness transitions.
D:A comparison can attribute a measured difference to the controlled feature variant. This would address a different situation, such as: Two user interface variants are shown, but the team changes both pricing logic and checkout latency simultaneously and cannot attribute outcomes. In the present case, the most directly relevant verification is: An in-flight checkout completes during a controlled target replacement. The crucial distinction is: Rolling replacement should account for connection draining and readiness transitions.
Question 175
The DevOps team must resolve this situation: Six teams manually create nearly identical VNets with inconsistent NSG defaults and missing diagnostics. Which engineering action is MOST appropriate?
- Pin and review provider versions with a committed lockfile and CI version checks.
- Use a safe scoped deployment strategy with reviewed change previews and deletion protections.
- Reference protected secrets via governed Key Vault/identity patterns without logging values.
- Publish a versioned Bicep networking module with secure defaults and reviewed parameters.
Explanation
Correct Answer
D:Publish a versioned Bicep networking module with secure defaults and reviewed parameters. This action addresses the specific failure or requirement and preserves delivery controls. Validation criterion: Two new applications deploy consistent approved network controls from the shared module. IaC modules should centralize approved reusable infrastructure patterns.
Incorrect Answers
A:Pin and review provider versions with a committed lockfile and CI version checks. This would address a different situation, such as: The same Terraform source yields changed resource behavior because local users and CI select different provider versions. In the present case, the most directly relevant engineering action is: Publish a versioned Bicep networking module with secure defaults and reviewed parameters. The crucial distinction is: IaC modules should centralize approved reusable infrastructure patterns.
B:Use a safe scoped deployment strategy with reviewed change previews and deletion protections. This would address a different situation, such as: A deployment pipeline uses complete mode unintentionally and deletes resources omitted from an updated ARM template. In the present case, the most directly relevant engineering action is: Publish a versioned Bicep networking module with secure defaults and reviewed parameters. The crucial distinction is: IaC modules should centralize approved reusable infrastructure patterns.
C:Reference protected secrets via governed Key Vault/identity patterns without logging values. This would address a different situation, such as: A Bicep parameter file stores database administrator passwords in plaintext committed to Git. In the present case, the most directly relevant engineering action is: Publish a versioned Bicep networking module with secure defaults and reviewed parameters. The crucial distinction is: IaC modules should centralize approved reusable infrastructure patterns.
Question 176
A Microsoft DevOps team is addressing: A GitHub repository scans vulnerabilities once a month but merges vulnerable code daily. Which TWO complementary actions should be taken? Select TWO answers.
- Review security workflow triggers, branch protection, SARIF uploads and alert policy.
- Require verified unit test checks as part of protected pull request policy.
- Run supported code scanning on pull requests with risk-appropriate merge gates.
- Run isolated integration tests against approved representative Azure SQL dependencies.
- Review prior performance runs, cost metrics, current profile and thresholds.
Explanation
Correct Answers
A:Review security workflow triggers, branch protection, SARIF uploads and alert policy. This supplies the diagnosis/evidence needed for the scenario. Its complementary step is: Run supported code scanning on pull requests with risk-appropriate merge gates. Together they address: Code-scanning feedback should be available on proposed changes before merge.
C:Run supported code scanning on pull requests with risk-appropriate merge gates. This supplies the controlled implementation needed for the scenario. Its complementary step is: Review security workflow triggers, branch protection, SARIF uploads and alert policy. Together they address: Code-scanning feedback should be available on proposed changes before merge.
Incorrect Answers
B:Require verified unit test checks as part of protected pull request policy. This concerns a different DevOps situation: A protected mainline accepts pull requests before a required unit test suite finishes, causing broken packages. This case instead requires both a targeted investigation (Review security workflow triggers, branch protection, SARIF uploads and alert policy.) and a controlled change (Run supported code scanning on pull requests with risk-appropriate merge gates.).
D:Run isolated integration tests against approved representative Azure SQL dependencies. This concerns a different DevOps situation: Service unit tests pass but integration fails because Azure SQL connectivity differs between staging and production. This case instead requires both a targeted investigation (Review security workflow triggers, branch protection, SARIF uploads and alert policy.) and a controlled change (Run supported code scanning on pull requests with risk-appropriate merge gates.).
E:Review prior performance runs, cost metrics, current profile and thresholds. This concerns a different DevOps situation: An API's new release increases CPU costs by 60%, but the load test reports green because no baseline exists. This case instead requires both a targeted investigation (Review security workflow triggers, branch protection, SARIF uploads and alert policy.) and a controlled change (Run supported code scanning on pull requests with risk-appropriate merge gates.).
Question 177
The DevOps team must resolve this situation: Verbose diagnostic logging starts printing deployment tokens after a new task version update. Which engineering action is MOST appropriate?
- Mirror or migrate required immutable package versions before switching consumers.
- Report approval wait separately and optimize only the relevant bottleneck.
- Right-size authorized agent capacity and prioritize critical release jobs.
- Remove token emission and enforce safe logging with secret scanning of pipeline output.
Explanation
Correct Answer
D:Remove token emission and enforce safe logging with secret scanning of pipeline output. This action addresses the specific failure or requirement and preserves delivery controls. Validation criterion: A representative debug run completes without exposing a valid credential. Pipeline monitoring must detect credential disclosure while retaining useful logs.
Incorrect Answers
A:Mirror or migrate required immutable package versions before switching consumers. This would address a different situation, such as: A package registry is scheduled for migration, but retired feeds still contain dependencies used by maintained builds. In the present case, the most directly relevant engineering action is: Remove token emission and enforce safe logging with secret scanning of pipeline output. The crucial distinction is: Pipeline monitoring must detect credential disclosure while retaining useful logs.
B:Report approval wait separately and optimize only the relevant bottleneck. This would address a different situation, such as: An approval gate makes a release appear to take two hours, but actual deployment work takes five minutes. In the present case, the most directly relevant engineering action is: Remove token emission and enforce safe logging with secret scanning of pipeline output. The crucial distinction is: Pipeline monitoring must detect credential disclosure while retaining useful logs.
C:Right-size authorized agent capacity and prioritize critical release jobs. This would address a different situation, such as: A pipeline runs quickly on an agent but waits 70 minutes in queue due to a limited self-hosted pool. In the present case, the most directly relevant engineering action is: Remove token emission and enforce safe logging with secret scanning of pipeline output. The crucial distinction is: Pipeline monitoring must detect credential disclosure while retaining useful logs.
Question 178
A Microsoft DevOps team is addressing: An API passes functional tests for one user but violates latency objectives under 1,000 concurrent clients. Which TWO complementary actions should be taken? Select TWO answers.
- Review coverage collection filters, included assemblies and security-sensitive modules.
- Inspect coverage details, assertions, mutation results and test cases.
- Inspect task arguments, secret masking, logs, scope and token issuance.
- Review load profile, Azure Load Testing results, request percentiles and capacity metrics.
- Add an Azure Load Testing stage with approved throughput and latency pass criteria.
Explanation
Correct Answers
D:Review load profile, Azure Load Testing results, request percentiles and capacity metrics. This supplies the diagnosis/evidence needed for the scenario. Its complementary step is: Add an Azure Load Testing stage with approved throughput and latency pass criteria. Together they address: Load tests should measure realistic concurrency against explicit performance thresholds.
E:Add an Azure Load Testing stage with approved throughput and latency pass criteria. This supplies the controlled implementation needed for the scenario. Its complementary step is: Review load profile, Azure Load Testing results, request percentiles and capacity metrics. Together they address: Load tests should measure realistic concurrency against explicit performance thresholds.
Incorrect Answers
A:Review coverage collection filters, included assemblies and security-sensitive modules. This concerns a different DevOps situation: A team's claimed 90% code coverage includes only generated code and excludes its core authorization module. This case instead requires both a targeted investigation (Review load profile, Azure Load Testing results, request percentiles and capacity metrics.) and a controlled change (Add an Azure Load Testing stage with approved throughput and latency pass criteria.).
B:Inspect coverage details, assertions, mutation results and test cases. This concerns a different DevOps situation: A business rule has 100% line coverage, but tests still pass when its comparison operator is reversed. This case instead requires both a targeted investigation (Review load profile, Azure Load Testing results, request percentiles and capacity metrics.) and a controlled change (Add an Azure Load Testing stage with approved throughput and latency pass criteria.).
C:Inspect task arguments, secret masking, logs, scope and token issuance. This concerns a different DevOps situation: A test task writes its service principal secret into verbose logs on every failing run. This case instead requires both a targeted investigation (Review load profile, Azure Load Testing results, request percentiles and capacity metrics.) and a controlled change (Add an Azure Load Testing stage with approved throughput and latency pass criteria.).
Question 179
The DevOps team must resolve this situation: A security scorecard shows the total number of alerts but cannot identify overdue critical fixes. Which engineering action is MOST appropriate?
- Calculate lead time for eligible service changes from commit to actual production deployment.
- Define recovery completion using service-level restoration and compute the metric accordingly.
- Build aging and SLA queries for critical findings with owner and disposition fields.
- Instrument pipeline stage durations and track queue waiting separately from execution.
Explanation
Correct Answer
C:Build aging and SLA queries for critical findings with owner and disposition fields. This action addresses the specific failure or requirement and preserves delivery controls. Validation criterion: A deliberately overdue critical issue remains visible until independently resolved. Security metrics should track severity, exposure, accountable ownership and aging.
Incorrect Answers
A:Calculate lead time for eligible service changes from commit to actual production deployment. This would address a different situation, such as: A dashboard measures deployment frequency but calculates lead time from the first commit in an unrelated repository. In the present case, the most directly relevant engineering action is: Build aging and SLA queries for critical findings with owner and disposition fields. The crucial distinction is: Security metrics should track severity, exposure, accountable ownership and aging.
B:Define recovery completion using service-level restoration and compute the metric accordingly. This would address a different situation, such as: An operations dashboard reports recovery time ending when a VM restarts, although customer transactions remain unavailable. In the present case, the most directly relevant engineering action is: Build aging and SLA queries for critical findings with owner and disposition fields. The crucial distinction is: Security metrics should track severity, exposure, accountable ownership and aging.
D:Instrument pipeline stage durations and track queue waiting separately from execution. This would address a different situation, such as: A pipeline takes 50 minutes, but dashboard owners cannot distinguish runner queue delays from actual build execution. In the present case, the most directly relevant engineering action is: Build aging and SLA queries for critical findings with owner and disposition fields. The crucial distinction is: Security metrics should track severity, exposure, accountable ownership and aging.
Question 180
The DevOps team must resolve this situation: A dependency update workflow proposes a new package version but its artifact origin is not recorded, weakening supply-chain review. Which engineering action is MOST appropriate?
- Enable supported secret, dependency and code scanning for target Azure Repos repositories.
- Require reviewed package source, SBOM and policy gates before accepting dependency updates.
- Combine appropriate code, dependency, secret and container scanning with tested authorization scenarios.
- Integrate image vulnerability scanning and a reviewed enforcement gate before production.
Explanation
Correct Answer
B:Require reviewed package source, SBOM and policy gates before accepting dependency updates. This action addresses the specific failure or requirement and preserves delivery controls. Validation criterion: A package from an unapproved registry fails the review despite passing unit tests. Automated security/compliance scanning should retain dependency provenance and approved package sources.
Incorrect Answers
A:Enable supported secret, dependency and code scanning for target Azure Repos repositories. This would address a different situation, such as: An Azure Repos project has GitHub Advanced Security licensed but required code and secret scanning were never enabled for key repos. In the present case, the most directly relevant engineering action is: Require reviewed package source, SBOM and policy gates before accepting dependency updates. The crucial distinction is: Automated security/compliance scanning should retain dependency provenance and approved package sources.
C:Combine appropriate code, dependency, secret and container scanning with tested authorization scenarios. This would address a different situation, such as: A project relies entirely on container image vulnerability scanning while application source contains an authorization flaw. In the present case, the most directly relevant engineering action is: Require reviewed package source, SBOM and policy gates before accepting dependency updates. The crucial distinction is: Automated security/compliance scanning should retain dependency provenance and approved package sources.
D:Integrate image vulnerability scanning and a reviewed enforcement gate before production. This would address a different situation, such as: An ACR pipeline pushes vulnerable base images and deploys without considering scan results. In the present case, the most directly relevant engineering action is: Require reviewed package source, SBOM and policy gates before accepting dependency updates. The crucial distinction is: Automated security/compliance scanning should retain dependency provenance and approved package sources.