Courseiva
Develop Azure compute solutionseasyMultiple ChoiceObjective-mapped

AZ-204 Develop Azure compute solutions Practice Question

You need to deploy a container that runs a simple web server on Azure Container Instances. The container should be accessible via a public IP address. Which property should you set in the container group configuration?

⚠ Common exam trap

Watch out — candidates often confuse operational settings like OS type or restart policy with networking configuration, mistakenly thinking they influence public accessibility, when in fact only the `ipAddress.type` property controls public IP assignment in Azure Container Instances.

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

ipAddress.type = "Public"

To make a container group accessible from the internet via a public IP address, you must set the `ipAddress.type` property to `"Public"`. This instructs Azure Container Instances to assign a public IP and optionally a fully qualified domain name (FQDN) to the container group, allowing inbound traffic from the internet to reach the container's exposed ports.

Answer analysis

Option-by-option breakdown

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

  • ipAddress.type = "Public"

    Why this is correct

    To deploy a container running a simple web server that is accessible from the internet, a public IP address is essential. Setting the `ipAddress.type` property to "Public" in the Azure Container Instances (ACI) deployment configuration explicitly requests and ensures that the container group receives a publicly routable IP address. This configuration allows external clients to connect to the web server running within the container via its exposed port, making it externally accessible.

  • osType = "Linux"

    Why it's wrong here

    The `osType` property specifies the base operating system for the container's image, such as "Linux" or "Windows." While this setting is crucial for ensuring container compatibility and proper execution of the application, it has no direct bearing on the network configuration of the container group. Network accessibility, including the assignment of a public IP address, is managed at the container group level, independent of the guest OS running inside the container.

  • restartPolicy = "Always"

    Why it's wrong here

    The `restartPolicy` property dictates how Azure Container Instances handles the lifecycle of a container after it terminates. A value of "Always" ensures that the container is continuously restarted, even if it exits due to an error or completes its task. This policy is vital for maintaining application availability and resilience but is entirely unrelated to network configuration, IP address assignment, or enabling external access to the web server.

  • volumes.mountPath = "/mnt"

    Why it's wrong here

    The `volumes.mountPath` property defines where a specified volume is mounted within the container's filesystem, for example, "/mnt". Volumes are primarily utilized for persistent storage, allowing data to persist beyond the container's lifecycle or facilitating data sharing between containers within a group. While essential for stateful applications, configuring a volume mount path has no impact whatsoever on the container group's network configuration, its IP address type, or its public accessibility.

About these practice questions

One of 881 original AZ-204 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.