-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathstandard.tf
103 lines (83 loc) · 2.22 KB
/
standard.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
#####################
### Prerequisites ###
### az.tf ###
provider "azurerm" {
features {}
}
provider "azurerm" {
features {}
alias = "dns_zone_provider"
}
provider "azurerm" {
features {}
alias = "mgmt"
}
### data.tf ###
data "azurerm_subnet" "back" {
name = "devcc-back"
resource_group_name = "network-dev-rg"
virtual_network_name = "devcc-vnet"
}
data "azurerm_private_dns_zone" "kv" {
provider = azurerm.mgmt
name = "privatelink.vaultcore.azure.net"
resource_group_name = "network-management-rg"
}
locals {
subnet_ids = []
}
#####################
###############################
### Managed PostgreSQL for Azure ###
###############################
# Manages a PostgreSQL Flexible Server.
#
# https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_flexible_server
#
module "postgresql_example" {
source = "../"
name = "pgsqlservername"
location = "canadacentral"
resource_group_name = "pgsql-dev-rg"
databases = {
pgsqlservername1 = { collation = "en_US.utf8" },
pgsqlservername2 = { chartset = "utf8" },
pgsqlservername3 = { chartset = "utf8", collation = "en_US.utf8" },
pgsqlservername4 = {}
}
administrator_login = "pgsqladmin"
administrator_password = "pgSql1313"
sku_name = "GP_Standard_D4ds_v4"
pgsql_version = "13"
storagesize_mb = 262144
ip_rules = []
firewall_rules = []
diagnostics = {
destination = ""
eventhub_name = ""
logs = ["all"]
metrics = ["all"]
}
## Keyvault
environment = "dev"
project = "hostingsql"
public_network_access_enabled = true
kv_subnet_ids = local.subnet_ids
kv_private_endpoints = [
{
subnet_id = data.azurerm_subnet.back.id
private_dns_zone_id = data.azurerm_private_dns_zone.kv.id
}
]
## Storage Account
sa_create_log = true
sa_subnet_ids = local.subnet_ids
storage_account_name = "stndbmahmsamsa"
tags = {
"tier" = "k8s"
}
providers = {
azurerm = azurerm
azurerm.dns_zone_provider = azurerm.dns_zone_provider
}
}