Add dns record for built in endpoint

This commit is contained in:
github-actions[bot] 2024-02-19 20:15:05 +00:00 committed by lonegunmanb
parent ae299a4355
commit 8a17dd2a7b

View File

@ -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]]
}