0
0
Azurecloud~10 mins

Private endpoints concept in Azure - Interactive Code Practice

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

Complete the code to create a private endpoint resource in Azure.

Azure
resource "azurerm_private_endpoint" "example" {
  name                = "example-private-endpoint"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  subnet_id           = [1]
}
Drag options to blanks, or click blank then click option'
Aazurerm_subnet.example.id
Bazurerm_resource_group.example.id
Cazurerm_virtual_network.example.id
Dazurerm_network_interface.example.id
Attempts:
3 left
💡 Hint
Common Mistakes
Using virtual network ID instead of subnet ID
Using resource group ID instead of subnet ID
2fill in blank
medium

Complete the code to specify the private service connection for the private endpoint.

Azure
private_service_connection {
  name                           = "example-psc"
  private_connection_resource_id = [1]
  is_manual_connection           = false
  subresource_names              = ["blob"]
}
Drag options to blanks, or click blank then click option'
Aazurerm_subnet.example.id
Bazurerm_virtual_network.example.id
Cazurerm_storage_account.example.id
Dazurerm_resource_group.example.id
Attempts:
3 left
💡 Hint
Common Mistakes
Using subnet or virtual network ID instead of the target resource ID
Using resource group ID instead of the target resource ID
3fill in blank
hard

Fix the error in the private endpoint configuration by completing the missing property.

Azure
resource "azurerm_private_endpoint" "example" {
  name                = "example-private-endpoint"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  subnet_id           = azurerm_subnet.example.id
  [1] {
    name                           = "example-psc"
    private_connection_resource_id = azurerm_storage_account.example.id
    is_manual_connection           = false
    subresource_names              = ["blob"]
  }
}
Drag options to blanks, or click blank then click option'
Aprivate_link_service_connection
Bprivate_service_connection
Cservice_endpoint
Dnetwork_interface
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect block names like service_endpoint
Confusing private link service with private service connection
4fill in blank
hard

Fill both blanks to create a private DNS zone link for the private endpoint.

Azure
resource "azurerm_private_dns_zone_virtual_network_link" "example" {
  name                  = "example-link"
  resource_group_name   = azurerm_resource_group.example.name
  private_dns_zone_name = [1]
  virtual_network_id    = [2]
  registration_enabled  = false
}
Drag options to blanks, or click blank then click option'
A"privatelink.blob.core.windows.net"
Bazurerm_virtual_network.example.id
Cazurerm_subnet.example.id
D"privatelink.database.windows.net"
Attempts:
3 left
💡 Hint
Common Mistakes
Using subnet ID instead of virtual network ID
Using wrong DNS zone name for the service
5fill in blank
hard

Fill all three blanks to define a private endpoint with tags and manual approval.

Azure
resource "azurerm_private_endpoint" "example" {
  name                = "example-private-endpoint"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  subnet_id           = [1]
  tags = {
    environment = [2]
  }
  private_service_connection {
    name                           = "example-psc"
    private_connection_resource_id = [3]
    is_manual_connection           = true
    subresource_names              = ["sqlServer"]
  }
}
Drag options to blanks, or click blank then click option'
Aazurerm_subnet.example.id
B"production"
Cazurerm_sql_server.example.id
Dazurerm_virtual_network.example.id
Attempts:
3 left
💡 Hint
Common Mistakes
Using virtual network ID instead of subnet ID
Not quoting the tag value
Using wrong resource ID for private connection