Hello,
I’m curious if there is a way to remove a bottle neck when you link resources.
I want to create a create dns zone
and create a dns zone link
. And I needed to add a sleep between (because of propagation of dns zones).
But the procedure looks like the following: Batch 1 (dns zone) → batch 2 (sleep) → batch 3 (links)
resource "azurerm_private_dns_zone" "dns_zone" {
for_each = var.dns_zones
name = each.value
resource_group_name = var.resource_group_name
}
resource "time_sleep" "deploy_dns_zone" {
for_each = var.dns_zones
triggers = {
id = azurerm_private_dns_zone.dns_zone[each.key].id
name = azurerm_private_dns_zone.dns_zone[each.key].name
}
create_duration = "3m"
}
resource "azurerm_private_dns_zone_virtual_network_link" "dns_link" {
for_each = var.dns_zones
name = "dnsl-${each.value}"
resource_group_name = var.resource_group_name
private_dns_zone_name = time_sleep.deploy_dns_zone[each.key].triggers.name
virtual_network_id = var.virtual_network_id
}
Is there a way to unbatch them, so as soon as each dns zone will get created the sleep will begin?