Courseiva
Develop Azure compute solutionsmediumMultiple ChoiceObjective-mapped

AZ-204 Develop Azure compute solutions Practice Question

You are deploying a container group to Azure Container Instances that runs a stateful application. The application writes data to the /data directory. You need to ensure that the data is preserved if the container restarts. Which volume mount type should you use?

⚠ Common exam trap

Candidates often confuse EmptyDir with persistent storage, assuming it survives restarts because it is used in Kubernetes pods, but in ACI, EmptyDir is ephemeral and tied to the container group's lifecycle, not the container's restart policy.

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

Azure Files share

Azure Files shares provide persistent, shared storage that can be mounted into Azure Container Instances (ACI) using the SMB 3.0 protocol. This ensures that data written to the /data directory survives container restarts because the share exists independently of the container lifecycle. EmptyDir volumes are ephemeral and tied to the pod's lifetime, making them unsuitable for stateful applications that require data persistence across restarts.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • EmptyDir

    Why it's wrong here

    EmptyDir volumes provide a temporary, empty directory for a container within an Azure Container Instance. While useful for short-term scratch space or inter-container communication, any data written to an EmptyDir is entirely ephemeral. This means the data is lost permanently when the container instance stops, restarts, or is deleted, making it unsuitable for applications requiring durable data persistence across container lifecycle events.

  • Azure Files share

    Why this is correct

    An Azure Files share provides a fully managed, cloud-based file share that can be mounted as a volume into an Azure Container Instance. This solution offers durable and persistent storage, meaning data written to the share remains intact even if the container instance stops, restarts, or is deleted. Its independence from the container's lifecycle makes it the ideal choice for stateful applications requiring reliable data persistence in ACI.

  • Secret

    Why it's wrong here

    Secret volumes are specifically designed to inject sensitive information, such as API keys, database credentials, or TLS certificates, into a container securely. While they provide data to the container, their primary purpose is secure configuration, not general-purpose persistent storage for application data. Secrets are typically small, read-only, and managed differently than a file share intended for application-generated or modified data that needs to persist across container lifecycles.

  • ConfigMap

    Why it's wrong here

    ConfigMap is a Kubernetes resource used for storing non-sensitive configuration data as key-value pairs, which can then be consumed by pods as environment variables or mounted as files. However, Azure Container Instances (ACI) is a serverless container service that does not directly implement the full Kubernetes API or its resource types like ConfigMaps. Therefore, ConfigMap volumes are not a natively supported mechanism for providing configuration or persistent storage within an ACI container group.

About these practice questions

This AZ-204 question is part of Courseiva's 881-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AZ-204 practice question is part of Courseiva's free Microsoft 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 AZ-204 exam.