05 ‐ Mock Test: Azure Networking, DevOps, and Terraform - SanjeevOCI/Study GitHub Wiki

Mock Test: Azure Networking, DevOps, and Terraform


Section 1: Azure Networking

  1. What is the purpose of a NAT Gateway in Azure?
    a) To allow inbound traffic to a private subnet.
    b) To allow outbound internet traffic from a private subnet.
    c) To connect VNets across regions.
    d) To provide secure access to Azure services.
    Answer: b

  2. Which Azure component is used to securely connect on-premises networks to Azure?
    a) Internet Gateway
    b) VPN Gateway
    c) NAT Gateway
    d) Application Gateway
    Answer: b

  3. What is the difference between a Service Endpoint and a Private Endpoint in Azure?
    a) Service Endpoint provides public access, while Private Endpoint provides private access.
    b) Service Endpoint uses the public IP of the service, while Private Endpoint uses a private IP.
    c) Service Endpoint is for VMs, while Private Endpoint is for databases.
    d) There is no difference.
    Answer: b

  4. How do you enable communication between two VNets in different regions?
    a) Use a NAT Gateway.
    b) Use VNet Peering.
    c) Use a Service Gateway.
    d) Use a VPN Gateway.
    Answer: d

  5. What is the purpose of Azure Bastion?
    a) To provide secure SSH/RDP access to VMs without exposing them to the internet.
    b) To route traffic between VNets.
    c) To monitor network traffic.
    d) To distribute traffic across multiple VMs.
    Answer: a


Section 2: DevOps

  1. What is the purpose of a CI/CD pipeline?
    a) To automate the build, test, and deployment of applications.
    b) To monitor application performance.
    c) To manage infrastructure as code.
    d) To create virtual networks.
    Answer: a

  2. Which tool is commonly used for Infrastructure as Code (IaC)?
    a) Jenkins
    b) Terraform
    c) Docker
    d) Kubernetes
    Answer: b

  3. What is the difference between Continuous Integration (CI) and Continuous Deployment (CD)?
    a) CI focuses on merging code changes, while CD focuses on deploying applications.
    b) CI is for databases, while CD is for compute instances.
    c) CI is for networking, while CD is for storage.
    d) There is no difference.
    Answer: a

  4. Which of the following is a DevOps practice?
    a) Automating infrastructure provisioning.
    b) Monitoring application performance.
    c) Using version control systems like Git.
    d) All of the above.
    Answer: d

  5. What is the purpose of Docker containers in DevOps?
    a) To package applications and their dependencies into a portable unit.
    b) To create virtual networks.
    c) To manage IAM policies.
    d) To monitor databases.
    Answer: a


Section 3: Terraform

  1. What is Terraform used for?
    a) Monitoring application performance.
    b) Managing infrastructure as code.
    c) Creating virtual networks.
    d) Managing IAM policies.
    Answer: b

  2. Which command initializes a Terraform configuration?
    a) terraform apply
    b) terraform init
    c) terraform plan
    d) terraform destroy
    Answer: b

  3. What is the purpose of the terraform plan command?
    a) To preview the changes Terraform will make to the infrastructure.
    b) To apply changes to the infrastructure.
    c) To destroy the infrastructure.
    d) To initialize the Terraform configuration.
    Answer: a

  4. How do you store Terraform state securely in Azure?
    a) Use Azure Blob Storage with encryption enabled.
    b) Use a local file.
    c) Use a database.
    d) Use a virtual machine.
    Answer: a

  5. What is the purpose of a Terraform state file?
    a) To track the current state of infrastructure managed by Terraform.
    b) To store application data.
    c) To manage IAM policies.
    d) To monitor databases.
    Answer: a


Section 4: Scenario-Based Questions

  1. Scenario: You have a private subnet in Azure where VMs need to access the internet to download updates, but they should not be accessible from the internet.

    • Question: How would you configure the network to allow outbound internet access while keeping the VMs private?
      Answer: Deploy a NAT Gateway and associate it with the private subnet. Update the Route Table to route all outbound traffic (0.0.0.0/0) through the NAT Gateway.
  2. Scenario: You need to securely connect your on-premises data center to an Azure VNet.

    • Question: What Azure component would you use, and how would you configure it?
      Answer: Use a VPN Gateway. Configure a Site-to-Site VPN connection between the on-premises VPN device and the Azure VPN Gateway.
  3. Scenario: You have an Azure SQL Database that needs to be accessed securely from a VM in a private subnet without exposing the database to the public internet.

    • Question: How would you configure the network to allow secure access to the Azure SQL Database?
      Answer: Create a Private Endpoint for the Azure SQL Database in the same VNet as the VM. Update the DNS settings to resolve the database's private endpoint.
  4. Scenario: You need to host a web application with SSL termination and application-layer routing.

    • Question: Which Azure component would you use, and how would you configure it?
      Answer: Use an Azure Application Gateway. Configure SSL termination by uploading the SSL certificate to the Application Gateway. Set up HTTP settings and listeners to route traffic to the backend pool.
  5. Scenario: You want to monitor and troubleshoot network traffic in a VNet.

    • Question: What tools would you use to monitor and diagnose network issues in Azure?
      Answer: Use Network Watcher for packet capture, connection troubleshooting, and NSG flow logs. Enable Azure Monitor for metrics and alerts.

Scoring

  • 16-20 Correct: Excellent! You have a strong understanding of Azure Networking, DevOps, and Terraform.
  • 11-15 Correct: Good! You have a solid foundation but may need to review some areas.
  • 6-10 Correct: Fair. Consider revisiting key concepts to strengthen your knowledge.
  • Below 6 Correct: Needs Improvement. Focus on understanding the basics and practicing more.

This mock test is designed to assess your knowledge of Azure networking, DevOps practices, and Terraform concepts, along with scenario-based problem-solving skills.