โ† All AZ-400 Flashcard Decks

Dependency Management & Infrastructure as Code Flashcards

7 cards from real AZ-400 practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 Dependency Management & Infrastructure as Code flashcards as text
  1. A pipeline stage deploys infrastructure using Terraform and the next stage deploys an application. The application stage must use the Storage Account connection string output by Terraform. How should you pass this value?

    Answer: Use terraform output to write the value to a pipeline variable via ##vso[task.setvariable]

    Using `terraform output` combined with the `##vso[task.setvariable]` logging command sets a pipeline variable that downstream stages can consume securely.

  2. Which command validates that a Bicep file is syntactically correct and will compile to valid ARM JSON without deploying?

    Answer: bicep build main.bicep

    `bicep build main.bicep` compiles the Bicep file to ARM JSON and reports any syntax or semantic errors without deploying anything.

  3. Your team uses Semantic Versioning for NuGet packages. A change fixes a bug without breaking the public API. Which version part should be incremented?

    Answer: Patch

    In Semantic Versioning, the Patch version is incremented for backwards-compatible bug fixes that do not change the public API.

  4. A Terraform deployment fails because two team members applied changes simultaneously, causing a state lock conflict. What is the standard resolution?

    Answer: Run terraform force-unlock with the lock ID after confirming no other apply is running

    `terraform force-unlock` releases a stuck state lock using its lock ID; this should only be done after confirming no legitimate apply process is still running.

  5. Which Azure Artifacts feature ensures that a deleted package version cannot be accidentally re-published with the same version number?

    Answer: Immutable package versions

    Azure Artifacts enforces immutable package versions, preventing any package from being republished under a version number that has previously been published.

  6. You need to deploy infrastructure to multiple Azure subscriptions using a single Terraform configuration. Which Terraform feature enables this?

    Answer: Multiple provider blocks with aliases and per-resource provider argument

    Multiple provider blocks with unique aliases allow resources to target different Azure subscriptions within a single Terraform configuration by specifying the provider alias on each resource.

  7. A Bicep deployment uses `targetScope = 'subscription'`. Which Azure CLI command is correct to deploy this template?

    Answer: az deployment sub create

    `az deployment sub create` deploys ARM/Bicep templates scoped to an Azure subscription, matching the `targetScope = 'subscription'` Bicep declaration.