Skip to content

Commit 3c1a94b

Browse files
authored
docs: (IAC-1156) Added Postgres example in separate sample input file (#339)
1 parent ca171c7 commit 3c1a94b

File tree

4 files changed

+156
-55
lines changed

4 files changed

+156
-55
lines changed

docs/CONFIG-VARS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ Each server element, like `foo = {}`, can contain none, some, or all of the para
360360
| administrator_password | The Password associated with the administrator_login for the PostgreSQL Flexible Server | string | "my$up3rS3cretPassw0rd" | The password must contain between 8 and 128 characters and must contain characters from three of the following categories: English uppercase letters, English lowercase letters, numbers (0 through 9), and non-alphanumeric characters (!, $, #, %, etc.). |
361361
| server_version | The version of the PostgreSQL Flexible server instance | string | "13" | Refer to the [SAS Viya Platform Administration Guide](https://go.documentation.sas.com/doc/en/sasadmincdc/default/itopssr/p05lfgkwib3zxbn1t6nyihexp12n.htm?fromDefault=#p1wq8ouke3c6ixn1la636df9oa1u) for the supported versions of PostgreSQL for the SAS Viya platform. |
362362
| ssl_enforcement_enabled | Enforce SSL on connection to the Azure Database for PostgreSQL Flexible server instance | bool | true | |
363-
| connectivity_method | Network connectivity option to connect to your flexible server. There are two connectivity options available: Public access (allowed IP addresses) and Private access (VNet Integration). Defaults to public access with firewall rules enabled.| string | "public" | Valid options are `public` and `private`. See details [here](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-networking) |
363+
| connectivity_method | Network connectivity option to connect to your flexible server. There are two connectivity options available: Public access (allowed IP addresses) and Private access (VNet Integration). Defaults to public access with firewall rules enabled.| string | "public" | Valid options are `public` and `private`. See sample input file [here](../examples/sample-input-postgres.tfvars) and Private access documentation [here](./user/PostgreSQLPrivateAccess.md). For more details see [Networking overview](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-networking) |
364364
| postgresql_configurations | Sets a PostgreSQL Configuration value on a Azure PostgreSQL Flexible Server | list(object) | [] | More details can be found [here](https://docs.microsoft.com/en-us/azure/postgresql/flexible-server/howto-configure-server-parameters-using-cli) |
365365

366366
Multiple SAS offerings require a second PostgreSQL instance referred to as SAS Common Data Store, or CDS PostgreSQL. For more information, see [Common Customizations](https://go.documentation.sas.com/?cdcId=itopscdc&cdcVersion=default&docsetId=dplyml0phy0dkr&docsetTarget=n08u2yg8tdkb4jn18u8zsi6yfv3d.htm#p0wkxxi9s38zbzn19ukjjaxsc0kl). A list of SAS offerings that require CDS PostgreSQL is provided in [SAS Common Data Store Requirements](https://go.documentation.sas.com/?cdcId=itopscdc&cdcVersion=default&docsetId=itopssr&docsetTarget=p05lfgkwib3zxbn1t6nyihexp12n.htm#n03wzanutmc6gon1val5fykas9aa). To create and configure an external CDS PostgreSQL instance in addition to the external platform PostgreSQL instance named `default`, specify `cds-postgres` as a second PostgreSQL instance, as shown in the example below.

docs/user/PostgreSQLPrivateAccess.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ In this document, we will focus on PostgreSQL server with Private access (VNet I
99

1010
You can deploy a flexible server into your Azure virtual network (VNet). Azure virtual networks provide private and secure network communication. Resources in a virtual network can communicate through private IP addresses that were assigned on this network. In Private access, the connections to the PostgreSQL server are restricted to only within your virtual network. To learn more about it, refer to [Private access (VNet Integration)](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-networking#private-access-vnet-integration).
1111

12-
To create PostgreSQL Flexible Server with the private access connectivity method use the example file provided [here](../../examples/sample-input-ppg.tfvars).
12+
To create PostgreSQL Flexible Server with the private access connectivity method use the example file provided [here](../../examples/sample-input-postgres.tfvars).
1313

1414
# Connect Azure Database for PostgreSQL Flexible Server with the private access connectivity method
1515

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
# !NOTE! - These are only a subset of CONFIG-VARS.md provided as examples.
2+
# Customize this file to add any variables from 'CONFIG-VARS.md' whose default
3+
# values you want to change.
4+
5+
# **************** REQUIRED VARIABLES ****************
6+
# Values for these required variables MUST be provided
7+
prefix = "<prefix-value>" # this is a prefix that you assign for the resources to be created
8+
location = "<azure-location-value>" # e.g., "eastus2"
9+
# **************** REQUIRED VARIABLES ****************
10+
11+
# !NOTE! - Without specifying your CIDR block access rules, ingress traffic
12+
# to your cluster will be blocked by default.
13+
14+
# ************** RECOMMENDED VARIABLES ***************
15+
default_public_access_cidrs = [] # e.g., ["123.45.6.89/32"]
16+
ssh_public_key = "~/.ssh/id_rsa.pub"
17+
# ************** RECOMMENDED VARIABLES ***************
18+
19+
# Tags can be specified matching your tagging strategy.
20+
tags = {} # for example: { "owner|email" = "<you>@<domain>.<com>", "key1" = "value1", "key2" = "value2" }
21+
22+
# PostgreSQL
23+
24+
# Postgres config - By having this entry a database server is created.
25+
# Default networking option: Public access (allowed IP addresses) is enabled
26+
# If you do not need an external database server remove the 'postgres_servers'
27+
# block below.
28+
postgres_servers = {
29+
default = {},
30+
}
31+
32+
# To use Private access (VNet Integration) remove the 'postgres_servers' block above and uncomment the blocks below:
33+
# postgres_servers and subnets
34+
35+
# postgres_servers = {
36+
# default = {
37+
# connectivity_method = "private"
38+
# }
39+
# }
40+
#
41+
# # Subnet for PostgreSQL
42+
# subnets = {
43+
# aks = {
44+
# "prefixes" : ["192.168.0.0/23"],
45+
# "service_endpoints" : ["Microsoft.Sql"],
46+
# "private_endpoint_network_policies_enabled" : true,
47+
# "private_link_service_network_policies_enabled" : false,
48+
# "service_delegations" : {},
49+
# }
50+
# misc = {
51+
# "prefixes" : ["192.168.2.0/24"],
52+
# "service_endpoints" : ["Microsoft.Sql"],
53+
# "private_endpoint_network_policies_enabled" : true,
54+
# "private_link_service_network_policies_enabled" : false,
55+
# "service_delegations" : {},
56+
# }
57+
# netapp = {
58+
# "prefixes" : ["192.168.3.0/24"],
59+
# "service_endpoints" : [],
60+
# "private_endpoint_network_policies_enabled" : false,
61+
# "private_link_service_network_policies_enabled" : false,
62+
# "service_delegations" : {
63+
# netapp = {
64+
# "name" : "Microsoft.Netapp/volumes"
65+
# "actions" : ["Microsoft.Network/networkinterfaces/*", "Microsoft.Network/virtualNetworks/subnets/join/action"]
66+
# }
67+
# }
68+
# }
69+
# postgresql = {
70+
# "prefixes": ["192.168.4.0/24"],
71+
# "service_endpoints": ["Microsoft.Sql"],
72+
# "private_endpoint_network_policies_enabled": true,
73+
# "private_link_service_network_policies_enabled": false,
74+
# "service_delegations": {
75+
# flexpostgres = {
76+
# "name" : "Microsoft.DBforPostgreSQL/flexibleServers"
77+
# "actions" : ["Microsoft.Network/virtualNetworks/subnets/join/action"]
78+
# }
79+
# }
80+
# }
81+
# }
82+
83+
# Azure Container Registry config
84+
create_container_registry = false
85+
container_registry_sku = "Standard"
86+
container_registry_admin_enabled = false
87+
88+
# AKS config
89+
kubernetes_version = "1.26"
90+
default_nodepool_min_nodes = 2
91+
default_nodepool_vm_type = "Standard_D8s_v4"
92+
93+
# AKS Node Pools config
94+
node_pools = {
95+
cas = {
96+
"machine_type" = "Standard_E16s_v3"
97+
"os_disk_size" = 200
98+
"min_nodes" = 1
99+
"max_nodes" = 1
100+
"max_pods" = 110
101+
"node_taints" = ["workload.sas.com/class=cas:NoSchedule"]
102+
"node_labels" = {
103+
"workload.sas.com/class" = "cas"
104+
}
105+
},
106+
compute = {
107+
"machine_type" = "Standard_E16s_v3"
108+
"os_disk_size" = 200
109+
"min_nodes" = 1
110+
"max_nodes" = 1
111+
"max_pods" = 110
112+
"node_taints" = ["workload.sas.com/class=compute:NoSchedule"]
113+
"node_labels" = {
114+
"workload.sas.com/class" = "compute"
115+
"launcher.sas.com/prepullImage" = "sas-programming-environment"
116+
}
117+
},
118+
stateless = {
119+
"machine_type" = "Standard_D16s_v3"
120+
"os_disk_size" = 200
121+
"min_nodes" = 1
122+
"max_nodes" = 2
123+
"max_pods" = 110
124+
"node_taints" = ["workload.sas.com/class=stateless:NoSchedule"]
125+
"node_labels" = {
126+
"workload.sas.com/class" = "stateless"
127+
}
128+
},
129+
stateful = {
130+
"machine_type" = "Standard_D8s_v3"
131+
"os_disk_size" = 200
132+
"min_nodes" = 1
133+
"max_nodes" = 3
134+
"max_pods" = 110
135+
"node_taints" = ["workload.sas.com/class=stateful:NoSchedule"]
136+
"node_labels" = {
137+
"workload.sas.com/class" = "stateful"
138+
}
139+
}
140+
}
141+
142+
# Jump Server
143+
create_jump_public_ip = true
144+
jump_vm_admin = "jumpuser"
145+
jump_vm_machine_type = "Standard_B2s"
146+
147+
# Storage for SAS Viya CAS/Compute
148+
storage_type = "standard"
149+
# required ONLY when storage_type is "standard" to create NFS Server VM
150+
create_nfs_public_ip = false
151+
nfs_vm_admin = "nfsuser"
152+
nfs_vm_machine_type = "Standard_D8s_v4"
153+
nfs_raid_disk_size = 128
154+
nfs_raid_disk_type = "Standard_LRS"

examples/sample-input-ppg.tfvars

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ ssh_public_key = "~/.ssh/id_rsa.pub"
1919
# Tags can be specified matching your tagging strategy.
2020
tags = {} # for example: { "owner|email" = "<you>@<domain>.<com>", "key1" = "value1", "key2" = "value2" }
2121

22-
# PostgreSQL
23-
2422
# Postgres config - By having this entry a database server is created.
2523
# Default networking option: Public access (allowed IP addresses) is enabled
2624
# If you do not need an external database server remove the 'postgres_servers'
@@ -29,57 +27,6 @@ postgres_servers = {
2927
default = {},
3028
}
3129

32-
# To use Private access (VNet Integration) remove the 'postgres_servers' block above and uncomment the blocks below:
33-
# postgres_servers and subnets
34-
35-
# postgres_servers = {
36-
# default = {
37-
# connectivity_method = "private"
38-
# }
39-
# }
40-
#
41-
# # Subnet for PostgreSQL
42-
# subnets = {
43-
# aks = {
44-
# "prefixes" : ["192.168.0.0/23"],
45-
# "service_endpoints" : ["Microsoft.Sql"],
46-
# "private_endpoint_network_policies_enabled" : true,
47-
# "private_link_service_network_policies_enabled" : false,
48-
# "service_delegations" : {},
49-
# }
50-
# misc = {
51-
# "prefixes" : ["192.168.2.0/24"],
52-
# "service_endpoints" : ["Microsoft.Sql"],
53-
# "private_endpoint_network_policies_enabled" : true,
54-
# "private_link_service_network_policies_enabled" : false,
55-
# "service_delegations" : {},
56-
# }
57-
# netapp = {
58-
# "prefixes" : ["192.168.3.0/24"],
59-
# "service_endpoints" : [],
60-
# "private_endpoint_network_policies_enabled" : false,
61-
# "private_link_service_network_policies_enabled" : false,
62-
# "service_delegations" : {
63-
# netapp = {
64-
# "name" : "Microsoft.Netapp/volumes"
65-
# "actions" : ["Microsoft.Network/networkinterfaces/*", "Microsoft.Network/virtualNetworks/subnets/join/action"]
66-
# }
67-
# }
68-
# }
69-
# postgresql = {
70-
# "prefixes": ["192.168.4.0/24"],
71-
# "service_endpoints": ["Microsoft.Sql"],
72-
# "private_endpoint_network_policies_enabled": true,
73-
# "private_link_service_network_policies_enabled": false,
74-
# "service_delegations": {
75-
# flexpostgres = {
76-
# "name" : "Microsoft.DBforPostgreSQL/flexibleServers"
77-
# "actions" : ["Microsoft.Network/virtualNetworks/subnets/join/action"]
78-
# }
79-
# }
80-
# }
81-
# }
82-
8330
# Azure Container Registry config
8431
create_container_registry = false
8532
container_registry_sku = "Standard"

0 commit comments

Comments
 (0)