-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.private_endpoints.tf
131 lines (108 loc) · 4.85 KB
/
main.private_endpoints.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
resource "azurerm_private_endpoint" "blob" {
count = var.enable_private_networking ? 1 : 0
name = format("pe-%s-%s", "blob", local.storage_name)
location = local.location
resource_group_name = coalesce(var.private_endpoint_resource_group_name, var.resource_group_name)
subnet_id = var.private_endpoint_subnet_id
tags = var.tags
private_service_connection {
name = format("pe-%s-%s", "blob", local.storage_name)
private_connection_resource_id = azurerm_storage_account.this.id
subresource_names = ["blob"]
is_manual_connection = false
}
private_dns_zone_group {
name = "default"
private_dns_zone_ids = [var.dns_zone_ids["privatelink.blob.core.windows.net"].id]
}
}
resource "azurerm_private_endpoint" "table" {
count = var.enable_private_networking ? 1 : 0
name = format("pe-%s-%s", "table", local.storage_name)
location = local.location
resource_group_name = coalesce(var.private_endpoint_resource_group_name, var.resource_group_name)
subnet_id = var.private_endpoint_subnet_id
tags = var.tags
private_service_connection {
name = format("pe-%s-%s", "table", local.storage_name)
private_connection_resource_id = azurerm_storage_account.this.id
subresource_names = ["table"]
is_manual_connection = false
}
private_dns_zone_group {
name = "default"
private_dns_zone_ids = [var.dns_zone_ids["privatelink.table.core.windows.net"].id]
}
}
resource "azurerm_private_endpoint" "queue" {
count = var.enable_private_networking ? 1 : 0
name = format("pe-%s-%s", "queue", local.storage_name)
location = local.location
resource_group_name = coalesce(var.private_endpoint_resource_group_name, var.resource_group_name)
subnet_id = var.private_endpoint_subnet_id
tags = var.tags
private_service_connection {
name = format("pe-%s-%s", "queue", local.storage_name)
private_connection_resource_id = azurerm_storage_account.this.id
subresource_names = ["queue"]
is_manual_connection = false
}
private_dns_zone_group {
name = "default"
private_dns_zone_ids = [var.dns_zone_ids["privatelink.queue.core.windows.net"].id]
}
}
resource "azurerm_private_endpoint" "file" {
count = var.enable_private_networking ? 1 : 0
name = format("pe-%s-%s", "file", local.storage_name)
location = local.location
resource_group_name = coalesce(var.private_endpoint_resource_group_name, var.resource_group_name)
subnet_id = var.private_endpoint_subnet_id
tags = var.tags
private_service_connection {
name = format("pe-%s-%s", "file", local.storage_name)
private_connection_resource_id = azurerm_storage_account.this.id
subresource_names = ["file"]
is_manual_connection = false
}
private_dns_zone_group {
name = "default"
private_dns_zone_ids = [var.dns_zone_ids["privatelink.file.core.windows.net"].id]
}
}
resource "azurerm_private_endpoint" "web" {
count = var.enable_private_networking ? 1 : 0
name = format("pe-%s-%s", "web", local.storage_name)
location = local.location
resource_group_name = coalesce(var.private_endpoint_resource_group_name, var.resource_group_name)
subnet_id = var.private_endpoint_subnet_id
tags = var.tags
private_service_connection {
name = format("pe-%s-%s", "web", local.storage_name)
private_connection_resource_id = azurerm_storage_account.this.id
subresource_names = ["web"]
is_manual_connection = false
}
private_dns_zone_group {
name = "default"
private_dns_zone_ids = [var.dns_zone_ids["privatelink.web.core.windows.net"].id]
}
}
resource "azurerm_private_endpoint" "dfs" {
count = var.enable_private_networking ? 1 : 0
name = format("pe-%s-%s", "dfs", local.storage_name)
location = local.location
resource_group_name = coalesce(var.private_endpoint_resource_group_name, var.resource_group_name)
subnet_id = var.private_endpoint_subnet_id
tags = var.tags
private_service_connection {
name = format("pe-%s-%s", "dfs", local.storage_name)
private_connection_resource_id = azurerm_storage_account.this.id
subresource_names = ["dfs"]
is_manual_connection = false
}
private_dns_zone_group {
name = "default"
private_dns_zone_ids = [var.dns_zone_ids["privatelink.dfs.core.windows.net"].id]
}
}