diff --git a/quickstart/201-private-link-iothub-builtin-endpoint/network.tf b/quickstart/201-private-link-iothub-builtin-endpoint/network.tf index 9f67f828..8ba36ca0 100644 --- a/quickstart/201-private-link-iothub-builtin-endpoint/network.tf +++ b/quickstart/201-private-link-iothub-builtin-endpoint/network.tf @@ -87,4 +87,13 @@ resource "azurerm_private_endpoint" "dps" { name = "privateDNSZoneGroup" private_dns_zone_ids = [azurerm_private_dns_zone.dps.id] } +} + +## Add DNS Record for Built-in eventhub +resource "azurerm_private_dns_a_record" "eventhub" { + name = azurerm_iothub.iothub.event_hub_events_namespace + ttl = 10000 + zone_name = azurerm_private_dns_zone.eventhub.name + resource_group_name = azurerm_resource_group.rg.name + records = [azurerm_private_endpoint.iothub.custom_dns_configs[0].ip_addresses[0]] } \ No newline at end of file