CV0-004 Deployment Practice Question
A cloud team uses Azure Bicep for deploying resources. They need to create a modular deployment that includes a virtual network and a subnet. Which THREE best practices should they follow when authoring Bicep files? (Choose three.)
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use modules to encapsulate and reuse resource definitions.
Using parameters for configurable values, using modules for reuse, and using symbolic names for resource references are best practices.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use hard-coded resource names to ensure consistency.
Why it's wrong here
Hard-coded names prevent reuse across environments and break parallel deployments, since Bicep resolves names at compile time and cannot parameterise per scope. It is tempting because fixed names look predictable, but parameters, variables and unique naming expressions are required for modular, repeatable deployments.
- ✓
Use modules to encapsulate and reuse resource definitions.
Why this is correct
Modules let the virtual network and subnet definitions be encapsulated into reusable files, so the parent deployment references them rather than duplicating code. This directly satisfies the modular deployment requirement, keeping each resource definition scoped and independently maintainable.
- ✓
Use symbolic names for resources to reference them elsewhere in the file.
Why this is correct
Symbolic names let resources be declared once and referenced by identifier elsewhere, so the subnet can reference its parent virtual network without string concatenation or resourceId guessing. Bicep resolves dependencies automatically, satisfying the requirement to link the subnet to the virtual network reliably.
- ✓
Use parameters for configurable values like address prefixes.
Why this is correct
Parameters expose values such as address prefixes at deployment time rather than hard-coding them, so the same Bicep file deploys consistently across environments. This satisfies the configurable-values constraint and prevents environment-specific literals being committed into the template.
- ✗
Define all resources in a single file for simplicity.
Why it's wrong here
A single file prevents module reuse, so the virtual network and subnet cannot be composed or versioned independently across deployments. It is tempting because one file appears manageable for small stacks, yet Bicep modules exist precisely to encapsulate and parameterise such resource groupings.
Visual reference
Go deeper
Related to this question
About these practice questions
Courseiva writes every CV0-004 question from scratch — 834 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CV0-004 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CV0-004 exam.