Skip to content

Commit e5d7e3e

Browse files
committed
fix: added required extensions for external pg
Signed-off-by: jeread <[email protected]>
1 parent 031ffcb commit e5d7e3e

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

docs/CONFIG-VARS.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ Ubuntu 20.04 LTS is the operating system used on the Jump/NFS servers. Ubuntu cr
197197
| :--- | ---: | ---: | ---: | ---: |
198198
| partner_id | A GUID that is registered with Microsoft to facilitate partner resource usage attribution | string | "5d27f3ae-e49c-4dea-9aa3-b44e4750cd8c" | Defaults to SAS partner GUID. When you deploy this Terraform configuration, Microsoft can identify the installation of SAS software with the deployed Azure resources. Microsoft can then correlate the resources that are used to support the software. Microsoft collects this information to provide the best experiences with their products and to operate their business. The data is collected and governed by Microsoft's privacy policies, located at https://www.microsoft.com/trustcenter. |
199199
| create_static_kubeconfig | Allows the user to create a provider / service account-based kubeconfig file | bool | true | A value of `false` will default to using the cloud provider's mechanism for generating the kubeconfig file. A value of `true` will create a static kubeconfig that uses a `Service Account` and `Cluster Role Binding` to provide credentials. |
200-
| kubernetes_version | The AKS cluster Kubernetes version | string | "1.30" |Use of specific versions is still supported. If you need exact kubernetes version please use format `x.y.z`, where `x` is the major version, `y` is the minor version, and `z` is the patch version |
200+
| kubernetes_version | The AKS cluster Kubernetes version | string | "1.29" |Use of specific versions is still supported. If you need exact kubernetes version please use format `x.y.z`, where `x` is the major version, `y` is the minor version, and `z` is the patch version |
201201
| create_jump_vm | Create bastion host | bool | true | |
202202
| create_jump_public_ip | Add public IP address to the jump VM | bool | true | |
203203
| enable_jump_public_static_ip | Enables `Static` allocation method for the public IP address of Jump Server. Setting false will enable `Dynamic` allocation method. | bool | true | Only used with `create_jump_public_ip=true` |
@@ -377,9 +377,7 @@ Each server element, like `foo = {}`, can contain none, some, or all of the para
377377
| server_version | The version of the PostgreSQL Flexible server instance | string | "15" | Refer to the [SAS Viya Platform Administration Guide](https://documentation.sas.com/?cdcId=sasadmincdc&cdcVersion=default&docsetId=itopssr&docsetTarget=p05lfgkwib3zxbn1t6nyihexp12n.htm#p1wq8ouke3c6ixn1la636df9oa1u) for the supported versions of PostgreSQL for the SAS Viya platform. |
378378
| ssl_enforcement_enabled | Enforce SSL on connection to the Azure Database for PostgreSQL Flexible server instance | bool | true | |
379379
| 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) |
380-
| 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) |
381-
382-
**NOTE**: By default, the `PLPGSQL` and `PGCRYPTO` extensions are automatically added to the `azure.extensions` configuration of all external PostgreSQL instances, as the 2 extensions are required.
380+
| postgresql_configurations | Sets a PostgreSQL Configuration value on a Azure PostgreSQL Flexible Server | list(object) | [{ name : "azure.extensions", value : "PLPGSQL,PGCRYPTO" }] | More details can be found [here](https://docs.microsoft.com/en-us/azure/postgresql/flexible-server/howto-configure-server-parameters-using-cli) |
383381

384382
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://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://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.
385383

@@ -392,7 +390,7 @@ postgres_servers = {
392390
postgresql_configurations = [
393391
{
394392
name = "azure.extensions"
395-
value = "LTREE,TABLEFUNC"
393+
value = "PLPGSQL,PGCRYPTO,LTREE"
396394
}
397395
]
398396
},

locals.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ locals {
2323
kubeconfig_path = var.iac_tooling == "docker" ? "/workspace/${local.kubeconfig_filename}" : local.kubeconfig_filename
2424

2525
# PostgreSQL
26-
default_postgres_configuration = [{ name : "max_prepared_transactions", value : 1024 }, { name : "azure.extensions", value : "PLPGSQL,PGCRYPTO" }]
26+
default_postgres_configuration = [{ name : "max_prepared_transactions", value : 1024 }]
2727
postgres_servers = var.postgres_servers == null ? {} : { for k, v in var.postgres_servers : k => merge(var.postgres_server_defaults, v, ) }
2828
postgres_firewall_rules = [for addr in local.postgres_public_access_cidrs : { "name" : replace(replace(addr, "/", "_"), ".", "_"), "start_ip" : cidrhost(addr, 0), "end_ip" : cidrhost(addr, abs(pow(2, 32 - split("/", addr)[1]) - 1)) }]
2929

variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ variable "default_nodepool_vm_type" {
151151
variable "kubernetes_version" {
152152
description = "The AKS cluster K8s version"
153153
type = string
154-
default = "1.30"
154+
default = "1.29"
155155
}
156156

157157
variable "default_nodepool_max_nodes" {
@@ -298,7 +298,7 @@ variable "postgres_server_defaults" {
298298
server_version = "15"
299299
ssl_enforcement_enabled = true
300300
connectivity_method = "public"
301-
postgresql_configurations = []
301+
postgresql_configurations = [{ name : "azure.extensions", value : "PLPGSQL,PGCRYPTO" }]
302302
}
303303
}
304304

0 commit comments

Comments
 (0)