0
0
Azurecloud~10 mins

Why load balancing matters in Azure - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a basic Azure Load Balancer resource.

Azure
resource "azurerm_lb" "example" {
  name                = "example-lb"
  location            = "eastus"
  resource_group_name = "example-resources"
  sku                 = "[1]"
}
Drag options to blanks, or click blank then click option'
ABasic
BStandard
CPremium
DCustom
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'Standard' SKU when a simple load balancer is needed.
Using 'Premium' which is not a valid SKU for Azure Load Balancer.
2fill in blank
medium

Complete the code to specify the frontend IP configuration for the load balancer.

Azure
resource "azurerm_lb" "example" {
  name                = "example-lb"
  location            = "eastus"
  resource_group_name = "example-resources"
  sku                 = "Basic"

  frontend_ip_configuration {
    name                 = "PublicIPAddress"
    public_ip_address_id = azurerm_public_ip.example.[1]
  }
}
Drag options to blanks, or click blank then click option'
Aresource_id
Bid
Cname
Daddress
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'name' instead of 'id' which causes errors.
Using 'address' which is not a valid property here.
3fill in blank
hard

Fix the error in the backend address pool configuration by completing the code.

Azure
resource "azurerm_lb_backend_address_pool" "example" {
  name                = "example-backend-pool"
  loadbalancer_id     = azurerm_lb.example.[1]
}
Drag options to blanks, or click blank then click option'
Aname
Bresource_group_name
Clocation
Did
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'name' instead of 'id' which causes linking errors.
Using unrelated properties like 'location'.
4fill in blank
hard

Fill both blanks to configure a health probe for the load balancer.

Azure
resource "azurerm_lb_probe" "example" {
  name                = "example-probe"
  loadbalancer_id     = azurerm_lb.example.[1]
  protocol            = "[2]"
  port                = 80
}
Drag options to blanks, or click blank then click option'
Aid
Bname
CHttp
DTcp
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'name' instead of 'id' for the load balancer reference.
Choosing 'Tcp' when the service expects HTTP health checks.
5fill in blank
hard

Fill all three blanks to define a load balancing rule.

Azure
resource "azurerm_lb_rule" "example" {
  name                           = "example-rule"
  resource_group_name            = "example-resources"
  loadbalancer_id               = azurerm_lb.example.[1]
  frontend_ip_configuration_name = azurerm_lb.example.frontend_ip_configuration[0].[2]
  backend_address_pool_ids      = [azurerm_lb_backend_address_pool.example.[3]]
  protocol                      = "Tcp"
  frontend_port                 = 80
  backend_port                  = 80
  enable_floating_ip            = false
  idle_timeout_in_minutes       = 4
}
Drag options to blanks, or click blank then click option'
Aid
Bname
Dlocation
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'location' instead of 'id' or 'name' causing errors.
Mixing up 'name' and 'id' references.