-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutput.tf
30 lines (24 loc) · 993 Bytes
/
output.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
####################################################################################
### VPC Output
####################################################################################
output "vnet_id" {
value = var.use_existing_vnet ? var.vnet_id : module.vnet[0].vnet_id
}
output "vnet_name" {
value = local.vnet_name
}
output "vnet_address_space" {
value = var.use_existing_vnet ? [] : module.vnet[0].vnet_address_space
}
output "subnet_id" {
value = var.use_existing_vnet ? var.subnet_id : module.vnet[0].vnet_subnets[0]
}
output "db_private_dns_zone_id" {
value = var.control_plane_enabled ? azurerm_private_dns_zone.postgres_dns[0].id : ""
}
output "vnet_start_ip_address" {
value = var.use_existing_vnet ? cidrhost(data.azurerm_virtual_network.vnet[0].address_space[0], 0) : cidrhost(var.vnet_cidr, 0)
}
output "vnet_end_ip_address" {
value = var.use_existing_vnet ? cidrhost(data.azurerm_virtual_network.vnet[0].address_space[0], -1) : cidrhost(var.vnet_cidr, -1)
}