Skip to content

Conversation

@peachdawnleach
Copy link
Contributor

Addresses DOC-13254

Added a new sql reference page for ALTER EXTERNAL CONNECTION and updated relevant info on other pages

peachdawnleach and others added 2 commits October 16, 2025 17:06
Added a new sql reference page for ALTER EXTERNAL CONNECTION and updated relevant info on other pages
@netlify
Copy link

netlify bot commented Oct 17, 2025

Deploy Preview for cockroachdb-interactivetutorials-docs canceled.

Name Link
🔨 Latest commit 9fc21a9
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-interactivetutorials-docs/deploys/68f27962f0d4e40009d1d780

@netlify
Copy link

netlify bot commented Oct 17, 2025

Deploy Preview for cockroachdb-api-docs canceled.

Name Link
🔨 Latest commit 9fc21a9
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-api-docs/deploys/68f27962f0d4e40009d1d783

@github-actions
Copy link

@netlify
Copy link

netlify bot commented Oct 17, 2025

Deploy Preview for cockroachdb-interactivetutorials-docs canceled.

Name Link
🔨 Latest commit e160448
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-interactivetutorials-docs/deploys/68f940edaa6f380008dc72ea

@netlify
Copy link

netlify bot commented Oct 17, 2025

Deploy Preview for cockroachdb-api-docs canceled.

Name Link
🔨 Latest commit e160448
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-api-docs/deploys/68f940edcc66be000827e97b

@netlify
Copy link

netlify bot commented Oct 17, 2025

Deploy Preview for cockroachdb-docs failed. Why did it fail? →

Name Link
🔨 Latest commit 9fc21a9
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-docs/deploys/68f27962e064c100078b829f

Typo/broken link
….com:cockroachdb/docs into 20251016-DOC-13254-alter-external-connection
@netlify
Copy link

netlify bot commented Oct 17, 2025

Deploy Preview for cockroachdb-docs failed. Why did it fail? →

Name Link
🔨 Latest commit a7e63a7
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-docs/deploys/68f27969d066dd000809f855

@netlify
Copy link

netlify bot commented Oct 17, 2025

Netlify Preview

Name Link
🔨 Latest commit e160448
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-docs/deploys/68f940edf7c64700089e7ba3
😎 Deploy Preview https://deploy-preview-20654--cockroachdb-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Another typo/broken link
@peachdawnleach
Copy link
Contributor Author

peachdawnleach and others added 4 commits October 21, 2025 15:11
Typos and example variable names
Changed parameter names to match updated diagram
….com:cockroachdb/docs into 20251016-DOC-13254-alter-external-connection
Copy link

@kev-cao kev-cao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

docs_area: reference.sql
---

You can use external connections to specify and interact with resources that are external from CockroachDB. When creating an external connection, you define a name for an external connection while passing the provider URI and query parameters. `ALTER EXTERNAL CONNECTION` allows you to change the [storage/sink]({% link {{ page.version.version }}/create-external-connection.md %}#supported-external-storage-and-sinks) URI that an external connection references.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can use external connections to specify and interact with resources that are external from CockroachDB. When creating an external connection, you define a name for an external connection while passing the provider URI and query parameters. `ALTER EXTERNAL CONNECTION` allows you to change the [storage/sink]({% link {{ page.version.version }}/create-external-connection.md %}#supported-external-storage-and-sinks) URI that an external connection references.
You can use external connections to specify and interact with resources that are external to CockroachDB. When creating an external connection, you can define a name for an external connection while passing the provider URI and query parameters. `ALTER EXTERNAL CONNECTION` allows you to change the [storage/sink]({% link {{ page.version.version }}/create-external-connection.md %}#supported-external-storage-and-sinks) URI that an external connection references.

docs_area: reference.sql
---

You can use external connections to specify and interact with resources that are external from CockroachDB. When creating an external connection, you define a name for an external connection while passing the provider URI and query parameters. `ALTER EXTERNAL CONNECTION` allows you to change the [storage/sink]({% link {{ page.version.version }}/create-external-connection.md %}#supported-external-storage-and-sinks) URI that an external connection references.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the other pages in this section begin like this "The ALTER EXTERNAL CONNECTION statement..." so for the sake of consistency I'd recommend following suit.


You can use external connections to specify and interact with resources that are external from CockroachDB. When creating an external connection, you define a name for an external connection while passing the provider URI and query parameters. `ALTER EXTERNAL CONNECTION` allows you to change the [storage/sink]({% link {{ page.version.version }}/create-external-connection.md %}#supported-external-storage-and-sinks) URI that an external connection references.

Use `ALTER EXTERNAL CONNECTION` to rotate your authentication token for an external connection by updating the connection string for the external connection to use a new auth token before the old auth token expires.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence is long and confusing but I don't know enough about this functionality to recommend a specific change.

docs_area: reference.sql
---

You can use external connections to specify and interact with resources that are external from CockroachDB. When creating an external connection, you define a name for an external connection while passing the provider URI and query parameters. `ALTER EXTERNAL CONNECTION` allows you to change the [storage/sink]({% link {{ page.version.version }}/create-external-connection.md %}#supported-external-storage-and-sinks) URI that an external connection references.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the "Supported external storage and sinks" table on this page is identical to the table on the "Create External Connection" page that you're linking to, I'd link instead to the table below, for the sake of keeping the reader on this page.


### Update the URI of an external connection

In this example, you update the `backup_bucket` external connection to a new Amazon S3 URI to rotate your auth token.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the pages in this section use the following template to explain Examples: "To [desired effect], [thing you should do]". I'd recommend following that template, as it'll allow you to avoid an awkward usage of the second person.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that it's an awkward usage of the second person here, but it follows a precedent set in CREATE EXTERNAL CONNECTION , which is the most closely related page to this one. This page is effectively a continuation of that one for anyone actually using external connections, so I think it's best to leave it this way to maintain consistency over the two pages.

{% include_cached copy-clipboard.html %}
~~~sql
ALTER EXTERNAL CONNECTION backup_bucket AS 's3://bucket name?AWS_ACCESS_KEY_ID={new access key}&AWS_SECRET_ACCESS_KEY={new secret access key}';
~~~ No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most pages in this section end with a "See also" header. I'd recommend following suit for consistency's sake.


`CREATE EXTERNAL CONNECTION` will validate the URI by writing, reading, and listing a test file to the external storage URI. If you're using a [KMS URI]({% link {{ page.version.version }}/take-and-restore-encrypted-backups.md %}), `CREATE EXTERNAL CONNECTION` will encrypt and decrypt a file. You'll find a `crdb_external_storage_location` file in your external storage as a result of this test. Each of the operations that access the external connection is aware of the raw URI that is parsed to configure, authenticate, and interact with the connection.

You may need to periodically rotate your authentication token for an external connection by updating the URI for the connection to use a new auth token before the old auth token expires. For information on how to do this, consult [`ALTER EXTERNAL CONNECTION`]({% link {{ page.version.version }}/alter-external-connection.md %}).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above.

@@ -0,0 +1,74 @@
---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something strange is happening in the sidebar on this page, and I'm not sure why. When I go to http://localhost:4000/docs/v25.4/alter-external-connection I see "ALTER EXTERNAL CONNECTION" in the sidebar, but then when I click a different page in that section (for example, "ALTER BACKUP") the "ALTER EXTERNAL CONNECTION link in the sidebar disappears. But randomly it'll appear again if you specifically navigate to the "ALTER DATABASE" page? I'm not sure why. I haven't tested all of the pages, so I'm not sure when/why it re-appears, but this link should never disappear.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is just a weird anomaly with local builds. If you look at the preview build linked above, it doesn't have this same bug.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh strange, yeah you're right about that.

Changes from doc review- all small
Copy link
Contributor

@bsanchez-the-roach bsanchez-the-roach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@peachdawnleach peachdawnleach enabled auto-merge (squash) October 22, 2025 20:27
@peachdawnleach peachdawnleach merged commit b0f6ab9 into main Oct 22, 2025
5 checks passed
@peachdawnleach peachdawnleach deleted the 20251016-DOC-13254-alter-external-connection branch October 22, 2025 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants