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
A Bicep template deployment fails with 'The resource already exists and was not created by this deployment.' Which property should you add to handle existing resources?
Answer: existing keyword in Bicep resource declaration
The `existing` keyword in Bicep allows you to reference a resource that already exists without attempting to create or update it.
Your organization wants to enforce that all Azure resource groups created via IaC have required tags. Which combination achieves this with least effort?
Answer: Azure Policy with Append effect + Deny for missing required tags
Azure Policy with Append effect adds missing tags automatically and a Deny policy blocks deployments missing required tags, enforcing compliance at the platform level.
Which Terraform command shows the execution plan without applying any changes?
Answer: terraform plan
`terraform plan` generates and displays an execution plan showing what actions Terraform will take without making any changes.
A package in Azure Artifacts is marked as 'deprecated'. What effect does this have on pipeline builds?
Answer: Consumers see a warning but builds continue unless the feed blocks deprecated packages
Marking a package as deprecated generates a warning for consumers but does not block builds by itself; feed administrators must enable additional policies to block deprecated packages.
You want to use the same Bicep module for both development and production deployments but with different parameter values. What is the recommended approach?
Answer: Use Bicep parameter files (.bicepparam) per environment
Bicep parameter files (.bicepparam) allow environment-specific parameter values to be stored separately and referenced during deployment without duplicating the module.
Your Azure Pipelines YAML file uses a template from another repository. The template repository has been updated. How does the pipeline pick up the changes?
Answer: The pipeline uses the ref (branch/tag/commit) specified in the repository resource
Pipeline templates are resolved using the ref specified in the `resources.repositories` section, so updating the ref is required to pick up changes.
When should you use `terraform import` in an Azure DevOps workflow?
Answer: To bring existing Azure resources under Terraform management without recreating them
`terraform import` maps an existing Azure resource to a Terraform state entry so it can be managed by Terraform without destroying and recreating it.