generated from cyber-scot/terraform-module-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
40 lines (36 loc) · 1.96 KB
/
main.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
31
32
33
34
35
36
37
38
39
40
resource "azurerm_private_endpoint" "endpoint" {
for_each = { for v in var.private_endpoints : v.name => v }
name = each.value.name
location = each.value.location
resource_group_name = each.value.rg_name
subnet_id = each.value.subnet_id
custom_network_interface_name = each.value.custom_network_interface_name
tags = each.value.tags
dynamic "private_service_connection" {
for_each = each.value.private_service_connection != null ? [each.value.private_service_connection] : []
content {
name = private_service_connection.value.name
is_manual_connection = private_service_connection.value.is_manual_connection
private_connection_resource_id = private_service_connection.value.private_connection_resource_id
private_connection_resource_alias = private_service_connection.value.private_connection_resource_alias
subresource_names = private_service_connection.value.subresource_names
request_message = private_service_connection.value.is_manual_connection == true ? private_service_connection.value.request_message : null
}
}
dynamic "private_dns_zone_group" {
for_each = each.value.private_dns_zone_group != null ? [each.value.private_dns_zone_group] : []
content {
name = private_dns_zone_group.value.name
private_dns_zone_ids = private_dns_zone_group.value.private_dns_zone_ids
}
}
dynamic "ip_configuration" {
for_each = each.value.ip_configuration != null ? [each.value.ip_configuration] : []
content {
name = ip_configuration.value.name
private_ip_address = ip_configuration.value.private_ip_address
subresource_name = ip_configuration.value.subresource_name
member_name = ip_configuration.value.member_name
}
}
}