-
Notifications
You must be signed in to change notification settings - Fork 0
/
locals.tf
93 lines (84 loc) · 2.59 KB
/
locals.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
locals {
location = "northeurope"
naming = {
rg = "SEY-PGSQL-NE-RG01"
pgsql_1 = "sey-terraform-ne-pgsql01"
pgsql_2 = "sey-terraform-ne-pgsql02"
}
pgsql = [
{
name = local.naming.pgsql_1
location = local.location
resource_group_name = azurerm_resource_group.rg.name
version = "14"
sku_name = "GP_Standard_D4s_v3"
administrator_login = "useradmin"
administrator_password = "Password1234+"
storage_mb = "32768"
authentication = {
active_directory_auth_enabled = true
}
flexible_db = [
{
name = "seypgsqldb01"
}
]
server_configuration = [
{
name = "backslash_quote"
value = "on"
}
]
server_ad_administrator = [
{
tenant_id = data.azurerm_client_config.current.tenant_id
object_id = data.azurerm_client_config.current.object_id
principal_name = "exampleuser"
principal_type = "User"
}
]
private_endpoint = [
{
name = "${local.naming.pgsql_1}-PE01"
subnet_id = azurerm_subnet.subnet.id
custom_network_interface_name = "${local.naming.pgsql_1}-PE01.nic"
private_service_connection = [
{
name = "${local.naming.pgsql_1}-PE01-connection"
is_manual_connection = false
subresource_names = ["postgresqlServer"]
}
]
private_dns_zone_group = {
name = azurerm_private_dns_zone.dns.name
private_dns_zone_ids = [
azurerm_private_dns_zone.dns.id
]
}
}
]
monitoring = [
{
diag_name = "Monitoring"
log_analytics_workspace_id = azurerm_log_analytics_workspace.la.id
categories = {
postgre_sql_logs = false
}
}
]
tags = {}
},
{
name = local.naming.pgsql_2
location = local.location
resource_group_name = azurerm_resource_group.rg.name
version = "14"
sku_name = "GP_Standard_D4s_v3"
administrator_login = "useradmin"
administrator_password = "Password1234+"
storage_mb = "32768"
public_network_access_enabled = true
tags = {}
}
]
}