创建多个专用DNS区域,然后在每个区域上创建多个专用DNS虚拟链接,用于Terraform azure中的每个循环。并且我无法在每个区域上创建多个虚拟网络链接。
variable "privateDnsZones" {
type = map(object({
virtualNetworksID = list(string)
}))
default = {
"privatelink.monitor.azure.com" = {
virtualNetworksID = [
"",
""
]
},
"privatelink.oms.opinsights.azure.com" = {
virtualNetworksID = [
"",
""
]
}
}
}
resource "azurerm_private_dns_zone" "privateDnsZone" {
for_each = var.privateDnsZones
name = each.key
resource_group_name = data.azurerm_resource_group.existing_RG.name
tags = var.resource_tags
}
resource "azurerm_private_dns_zone_virtual_network_link" "privateDnsZone_link" {
for_each =
name =
resource_group_name =
private_dns_zone_name =
virtual_network_id =
}
1条答案
按热度按时间irlmq6kh1#
如果没有测试,它应该大致如下: