โ† All AZ-400 Flashcard Decks

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 Infrastructure as Code flashcards as text
  1. In Terraform, what is a `data` source used for?

    Answer: Reading information from existing infrastructure not managed by the current config

    Data sources allow Terraform to fetch read-only information from existing resources or external systems without managing those resources.

  2. What is the recommended approach when an Azure ARM template deployment fails midway through a resource group deployment?

    Answer: Roll back using the Azure CLI `az deployment group rollback` command

    `az deployment group rollback` rolls back a resource group to the last successful deployment, restoring the previous known-good state.

  3. Which tool is specifically designed to test Azure Bicep and ARM templates for compliance with organizational policies before deployment?

    Answer: ARM Template Test Toolkit (arm-ttk)

    The ARM Template Test Toolkit (arm-ttk) is a PowerShell-based testing framework that validates ARM and Bicep templates against best-practice rules.

  4. In a Terraform remote backend configuration using Azure Storage, what is the purpose of the `key` argument?

    Answer: The blob name used to store the Terraform state file

    The `key` argument specifies the blob name (path) within the Azure Storage container where the `.tfstate` file will be stored.

  5. When using Azure Bicep modules, what file path convention makes a module reusable across multiple Bicep files in the same project?

    Answer: Using relative file paths such as `./modules/storage.bicep`

    Relative file paths like `./modules/storage.bicep` are the simplest way to reference local Bicep modules within the same repository.

  6. What is the key difference between `terraform destroy` and removing resources from a Terraform configuration?

    Answer: Removing from config on next apply deletes only those removed resources; destroy targets all managed resources

    `terraform destroy` destroys ALL resources in the state; removing a resource block from config and applying deletes only that specific resource while leaving others intact.

  7. In Azure DevOps, which YAML pipeline task is used to deploy an ARM template to a resource group?

    Answer: Both B and C are valid approaches

    Both the `AzureResourceManagerTemplateDeployment@3` task and the `AzureCLI@2` task running `az deployment group create` are valid ways to deploy ARM templates in Azure DevOps pipelines.