From e475d90474bf161d68f97fa6efac1c2c2fe3e330 Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Tue, 24 Dec 2024 11:02:39 +0000 Subject: [PATCH 1/5] chore(docs/admin/infrastructure): call out and link to awsiamrds auth for aws rds --- codersdk/deployment.go | 2 +- docs/admin/infrastructure/architecture.md | 2 +- docs/reference/cli/server.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/codersdk/deployment.go b/codersdk/deployment.go index 7bb90848a8205..7864dba6b0518 100644 --- a/codersdk/deployment.go +++ b/codersdk/deployment.go @@ -2292,7 +2292,7 @@ when required by your organization's security policy.`, }, { Name: "Postgres Auth", - Description: "Type of auth to use when connecting to postgres.", + Description: "Type of auth to use when connecting to postgres. For AWS RDS, using IAM authentication (awsiamrds) is recommended.", Flag: "postgres-auth", Env: "CODER_PG_AUTH", Default: "password", diff --git a/docs/admin/infrastructure/architecture.md b/docs/admin/infrastructure/architecture.md index fb351e4da2d18..98ee1d1e049f0 100644 --- a/docs/admin/infrastructure/architecture.md +++ b/docs/admin/infrastructure/architecture.md @@ -94,7 +94,7 @@ external PostgreSQL 13+ database for production deployments. A managed PostgreSQL database, with daily backups, is recommended: -- For AWS: Amazon RDS for PostgreSQL +- For AWS: Amazon RDS for PostgreSQL using [RDS IAM authentication](../../reference/cli/server.md#--postgres-auth). - For Azure: Azure Database for PostgreSQL - Flexible Server For GCP: Cloud SQL for PostgreSQL diff --git a/docs/reference/cli/server.md b/docs/reference/cli/server.md index 02f5b6ff5f4be..b093da50dc02c 100644 --- a/docs/reference/cli/server.md +++ b/docs/reference/cli/server.md @@ -959,7 +959,7 @@ URL of a PostgreSQL database. If empty, PostgreSQL binaries will be downloaded f | YAML | pgAuth | | Default | password | -Type of auth to use when connecting to postgres. +Type of auth to use when connecting to postgres. For AWS RDS, using IAM authentication (awsiamrds) is recommended. ### --secure-auth-cookie From 26bd8b81c2e46d5dd47096b3c5bae61e4d31bafa Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Tue, 24 Dec 2024 11:07:54 +0000 Subject: [PATCH 2/5] chore(docs/reference/cli/server): call out URL-encoding requirement in CODER_PG_CONNECTION_URL --- codersdk/deployment.go | 2 +- docs/reference/cli/server.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/codersdk/deployment.go b/codersdk/deployment.go index 7864dba6b0518..bfd359402525f 100644 --- a/codersdk/deployment.go +++ b/codersdk/deployment.go @@ -2284,7 +2284,7 @@ when required by your organization's security policy.`, }, { Name: "Postgres Connection URL", - Description: "URL of a PostgreSQL database. If empty, PostgreSQL binaries will be downloaded from Maven (https://repo1.maven.org/maven2) and store all data in the config root. Access the built-in database with \"coder server postgres-builtin-url\".", + Description: "URL of a PostgreSQL database. If empty, PostgreSQL binaries will be downloaded from Maven (https://repo1.maven.org/maven2) and store all data in the config root. Access the built-in database with \"coder server postgres-builtin-url\". Note that any special characters in the URL must be URL-encoded.", Flag: "postgres-url", Env: "CODER_PG_CONNECTION_URL", Annotations: serpent.Annotations{}.Mark(annotationSecretKey, "true"), diff --git a/docs/reference/cli/server.md b/docs/reference/cli/server.md index b093da50dc02c..aa9b0cc0a3196 100644 --- a/docs/reference/cli/server.md +++ b/docs/reference/cli/server.md @@ -948,7 +948,7 @@ The directory to cache temporary files. If unspecified and $CACHE_DIRECTORY is s | Type | string | | Environment | $CODER_PG_CONNECTION_URL | -URL of a PostgreSQL database. If empty, PostgreSQL binaries will be downloaded from Maven (https://repo1.maven.org/maven2) and store all data in the config root. Access the built-in database with "coder server postgres-builtin-url". +URL of a PostgreSQL database. If empty, PostgreSQL binaries will be downloaded from Maven (https://repo1.maven.org/maven2) and store all data in the config root. Access the built-in database with "coder server postgres-builtin-url". Note that any special characters in the URL must be URL-encoded. ### --postgres-auth From 441602ea3a81268da6e77694bdbda96a229764be Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Tue, 24 Dec 2024 11:14:18 +0000 Subject: [PATCH 3/5] Apply suggestions from code review --- docs/admin/infrastructure/architecture.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/admin/infrastructure/architecture.md b/docs/admin/infrastructure/architecture.md index 98ee1d1e049f0..2022b8e55cbd2 100644 --- a/docs/admin/infrastructure/architecture.md +++ b/docs/admin/infrastructure/architecture.md @@ -94,7 +94,7 @@ external PostgreSQL 13+ database for production deployments. A managed PostgreSQL database, with daily backups, is recommended: -- For AWS: Amazon RDS for PostgreSQL using [RDS IAM authentication](../../reference/cli/server.md#--postgres-auth). +- For AWS: Amazon RDS for PostgreSQL (preferably using [RDS IAM authentication](../../reference/cli/server.md#--postgres-auth)). - For Azure: Azure Database for PostgreSQL - Flexible Server For GCP: Cloud SQL for PostgreSQL From 18805e29e1deb5c3c5e343a14423f4dd517a7dd2 Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Tue, 24 Dec 2024 11:27:01 +0000 Subject: [PATCH 4/5] fumpt is a perfectly cromulent word --- docs/admin/infrastructure/architecture.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/admin/infrastructure/architecture.md b/docs/admin/infrastructure/architecture.md index 2022b8e55cbd2..9b2c2365a4966 100644 --- a/docs/admin/infrastructure/architecture.md +++ b/docs/admin/infrastructure/architecture.md @@ -94,7 +94,8 @@ external PostgreSQL 13+ database for production deployments. A managed PostgreSQL database, with daily backups, is recommended: -- For AWS: Amazon RDS for PostgreSQL (preferably using [RDS IAM authentication](../../reference/cli/server.md#--postgres-auth)). +- For AWS: Amazon RDS for PostgreSQL (preferably using + [RDS IAM authentication](../../reference/cli/server.md#--postgres-auth)). - For Azure: Azure Database for PostgreSQL - Flexible Server For GCP: Cloud SQL for PostgreSQL From 5876d5fa6a328cf9e673adef0f427672afed7c3e Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Tue, 24 Dec 2024 11:58:30 +0000 Subject: [PATCH 5/5] i love gooooold --- cli/testdata/coder_server_--help.golden | 6 ++++-- cli/testdata/server-config.yaml.golden | 3 ++- enterprise/cli/testdata/coder_server_--help.golden | 6 ++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/cli/testdata/coder_server_--help.golden b/cli/testdata/coder_server_--help.golden index 516aa9544e641..31519be00b753 100644 --- a/cli/testdata/coder_server_--help.golden +++ b/cli/testdata/coder_server_--help.golden @@ -51,13 +51,15 @@ OPTIONS: all available experiments. --postgres-auth password|awsiamrds, $CODER_PG_AUTH (default: password) - Type of auth to use when connecting to postgres. + Type of auth to use when connecting to postgres. For AWS RDS, using + IAM authentication (awsiamrds) is recommended. --postgres-url string, $CODER_PG_CONNECTION_URL URL of a PostgreSQL database. If empty, PostgreSQL binaries will be downloaded from Maven (https://repo1.maven.org/maven2) and store all data in the config root. Access the built-in database with "coder - server postgres-builtin-url". + server postgres-builtin-url". Note that any special characters in the + URL must be URL-encoded. --ssh-keygen-algorithm string, $CODER_SSH_KEYGEN_ALGORITHM (default: ed25519) The algorithm to use for generating ssh keys. Accepted values are diff --git a/cli/testdata/server-config.yaml.golden b/cli/testdata/server-config.yaml.golden index 50c80c737aecd..29b5d1f46cfa5 100644 --- a/cli/testdata/server-config.yaml.golden +++ b/cli/testdata/server-config.yaml.golden @@ -446,7 +446,8 @@ cacheDir: [cache dir] # Controls whether data will be stored in an in-memory database. # (default: , type: bool) inMemoryDatabase: false -# Type of auth to use when connecting to postgres. +# Type of auth to use when connecting to postgres. For AWS RDS, using IAM +# authentication (awsiamrds) is recommended. # (default: password, type: enum[password\|awsiamrds]) pgAuth: password # A URL to an external Terms of Service that must be accepted by users when diff --git a/enterprise/cli/testdata/coder_server_--help.golden b/enterprise/cli/testdata/coder_server_--help.golden index cf47e82016af7..b8e1eb43c577e 100644 --- a/enterprise/cli/testdata/coder_server_--help.golden +++ b/enterprise/cli/testdata/coder_server_--help.golden @@ -52,13 +52,15 @@ OPTIONS: all available experiments. --postgres-auth password|awsiamrds, $CODER_PG_AUTH (default: password) - Type of auth to use when connecting to postgres. + Type of auth to use when connecting to postgres. For AWS RDS, using + IAM authentication (awsiamrds) is recommended. --postgres-url string, $CODER_PG_CONNECTION_URL URL of a PostgreSQL database. If empty, PostgreSQL binaries will be downloaded from Maven (https://repo1.maven.org/maven2) and store all data in the config root. Access the built-in database with "coder - server postgres-builtin-url". + server postgres-builtin-url". Note that any special characters in the + URL must be URL-encoded. --ssh-keygen-algorithm string, $CODER_SSH_KEYGEN_ALGORITHM (default: ed25519) The algorithm to use for generating ssh keys. Accepted values are pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy