You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+44-9Lines changed: 44 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,14 +6,49 @@ We just ask that you follow our contribution guidelines when you do.
6
6
Contributions to this project must be accompanied by a signed [Contributor Agreement](ContributorAgreement.txt).
7
7
You (or your employer) retain the copyright to your contribution; this simply grants us permission to use and redistribute your contributions as part of the project.
8
8
9
-
## Code reviews
10
-
All submissions to this project—including submissions from project members—require review.
11
-
Our review process typically involves performing unit tests, development tests, integration tests, and security scans using internal SAS infrastructure.
12
-
For this reason, we don’t often merge pull requests directly from GitHub.
9
+
## Code Reviews
10
+
All submissions to this project—including submissions from project members—require
11
+
review. Our review process typically involves performing unit tests, development
12
+
tests, integration tests, and security scans.
13
13
14
-
Instead, we work with submissions internally first, vetting them to ensure they meet our security and quality standards.
15
-
We’ll do our best to work with contributors in public issues and pull requests; however, to ensure our code meets our internal compliance standards, we may need to incorporate your submission into a solution we push ourselves.
14
+
## Pull Request Requirement
16
15
17
-
This does not mean we don’t value or appreciate your contribution.
18
-
We simply need to review your code internally before merging it.
19
-
We work to ensure all contributors receive appropriate recognition for their contributions, at least by acknowledging them in our release notes.
16
+
### Conventional Commits
17
+
All pull requests must follow the [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/)
18
+
standard for commit messages. This helps maintain a consistent and meaningful
19
+
commit history. Pull requests with commits that do not follow the Conventional
20
+
Commit format will not be merged.
21
+
22
+
### Developer Certificate of Origin Sign-Off
23
+
This project requires all commits to be signed off in accordance with the [Developer Certificate of Origin (DCO)](https://developercertificate.org/).
24
+
By signing off your commits, you certify that you have the right to submit the
25
+
contribution under the open source license used by this project.
26
+
27
+
To sign off your commits, use the --signoff flag with git commit:
28
+
29
+
```bash
30
+
git commit --signoff -m "Your commit message"
31
+
```
32
+
33
+
This will add a Signed-off-by line to your commit message, e.g.:
Copy file name to clipboardExpand all lines: docs/CONFIG-VARS.md
+29-5Lines changed: 29 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -269,11 +269,31 @@ postgres_servers = {
269
269
270
270
**NOTE**: The `default = {}` elements is always required when creating external databases. This is the systems default database server.
271
271
272
-
Each server element, like `foo = {}`, can contain none, some, or all of the parameters listed below:
272
+
Each server element, like `foo = {}`, can contain none, some, or all of the parameters listed below. The `machine_type` and `edition` parameters must be explicitly specified and will be validated based on the `server_version`:
273
+
274
+
- For PostgreSQL 16+:
275
+
-`edition` must be `"ENTERPRISE_PLUS"`
276
+
-`machine_type` must start with `"db-perf-optimized-N-"`
277
+
- For PostgreSQL < 16:
278
+
-`edition` must be `"ENTERPRISE"`
279
+
-`machine_type` must start with `"db-custom-"`
280
+
281
+
*NOTE*: The default = {} elements is always required when creating external databases. This is the systems default database server.
282
+
283
+
If you provide an empty block for default, the following default values will be used:
284
+
terraform
285
+
postgres_servers = {
286
+
default = {
287
+
server_version = "15"
288
+
edition = "ENTERPRISE"
289
+
machine_type = "db-custom-4-16384"
290
+
}
291
+
}
273
292
274
293
| Name | Description | Type | Default | Notes |
275
294
| :--- | ---: | ---: | ---: | ---: |
276
-
| machine_type| The machine type for the PostgreSQL server VMs" | string | "db-custom-4-16384" | Google Cloud Postgres supports only shared-core machine types such as db-f1-micro, and custom machine types such as db-custom-2-13312. |
295
+
| machine_type| The machine type for the PostgreSQL server VMs" | string | "db-custom-4-16384" | Google Cloud Postgres supports only shared-core machine types such as db-f1-micro, and custom machine types such as db-custom-2-13312. Must match the PostgreSQL version requirements. |
296
+
| edition | Cloud SQL edition type | string | "ENTERPRISE" | Must be `"ENTERPRISE"` for PostgreSQL < 16 or `"ENTERPRISE_PLUS"` for PostgreSQL 16+. |
277
297
| storage_gb | Minimum storage allowed for the PostgreSQL server | number | 128 ||
| backups_start_time | Start time for postgres backups | string | "21:00" ||
@@ -289,15 +309,18 @@ Each server element, like `foo = {}`, can contain none, some, or all of the para
289
309
290
310
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.
291
311
292
-
Here is an example of the `postgres_servers` variable with the `default` server entry overriding only the `administrator_password` parameter and the `cds-postgres` entry overriding all of the parameters:
312
+
Here is an example of the `postgres_servers` variable with the `default` server entry and the `cds-postgres` entry, both with explicit edition and machine type configurations that match their PostgreSQL versions:
293
313
294
314
```terraform
295
315
postgres_servers = {
296
316
default = {
297
317
administrator_password = "D0ntL00kTh1sWay"
318
+
server_version = "16" # PostgreSQL 16
319
+
machine_type = "db-perf-optimized-N-8" # Required for PostgreSQL 16+
320
+
edition = "ENTERPRISE_PLUS" # Required for PostgreSQL 16+
298
321
},
299
322
cds-postgres = {
300
-
machine_type = "db-custom-4-16384"
323
+
machine_type = "db-custom-4-16384" # Required for PostgreSQL < 16
301
324
storage_gb = 128
302
325
backups_enabled = true
303
326
backups_start_time = "21:00"
@@ -306,7 +329,8 @@ postgres_servers = {
306
329
backup_count = 7 # Number of backups to retain, not in days
307
330
administrator_login = "cdsadmin"
308
331
administrator_password = "my$up3rS3cretPassw0rd"
309
-
server_version = "15"
332
+
server_version = "15" # PostgreSQL 15
333
+
edition = "ENTERPRISE" # Required for PostgreSQL < 16
310
334
availability_type = "ZONAL"
311
335
ssl_enforcement_enabled = true
312
336
database_flags = [{ name = "cloudsql.enable_pg_cron", value = "true"}, { name = "cloudsql.enable_pgaudit", value = "true"}]
error_message="ERROR: The database server name must start with a letter, cannot end with a hyphen, must be between 1-88 characters in length, and can only contain hyphens, letters, and numbers."
410
412
}
411
413
412
-
# Checking user provided login
413
-
414
-
# Checking user provided password
414
+
# Validate edition and machine type based on PostgreSQL version
0 commit comments