-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: move sources documentation to docsite (#225)
Migrates the docs/sources documentation to the new docsite. --------- Co-authored-by: Anubhav Dhawan <anubhav756@gmail.com>
- Loading branch information
1 parent
e2faaf2
commit 1de3853
Showing
8 changed files
with
245 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
--- | ||
title: "Cloud SQL for PostgreSQL" | ||
linkTitle: "Cloud SQL (Postgres)" | ||
type: docs | ||
weight: 1 | ||
description: > | ||
Cloud SQL for PostgreSQL is a fully-managed database service for Postgres. | ||
--- | ||
|
||
## About | ||
|
||
[Cloud SQL for PostgreSQL][csql-pg-docs] is a fully-managed database service | ||
that helps you set up, maintain, manage, and administer your PostgreSQL | ||
relational databases on Google Cloud Platform. | ||
|
||
If you are new to Cloud SQL for PostgreSQL, you can try [creating and connecting | ||
to a database by following these instructions][csql-pg-quickstart]. | ||
|
||
[csql-pg-docs]: https://cloud.google.com/sql/docs/postgres | ||
[csql-pg-quickstart]: https://cloud.google.com/sql/docs/postgres/connect-instance-local-compaduter | ||
|
||
## Requirements | ||
|
||
### IAM Permissions | ||
|
||
By default, this source uses the [Cloud SQL Go Connector][csql-go-conn] to | ||
authorize and establish mTLS connections to your Cloud SQL instance. The Go | ||
connector uses your [Application Default Credentials (ADC)][adc] to authorize | ||
your connection to Cloud SQL. | ||
|
||
In addition to [setting the ADC for your server][set-adc], you need to ensure | ||
the IAM identity has been given the following IAM roles (or corresponding | ||
permissions): | ||
|
||
- `roles/cloudsql.client` | ||
|
||
> **_NOTE:_** | ||
> If you are connecting from Compute Engine, make sure your VM also has the | ||
> [proper scope][gce-access-scopes] to connect using the Cloud SQL Admin API. | ||
[csql-go-conn]: /~https://github.com/GoogleCloudPlatform/cloud-sql-go-connector | ||
[adc]: https://cloud.google.com/docs/authentication#adc | ||
[set-adc]: https://cloud.google.com/docs/authentication/provide-credentials-adc | ||
[gce-access-scopes]: https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam | ||
|
||
### Networking | ||
|
||
AlloyDB supports connecting over both from external networks via the internet | ||
([public IP][public-ip]), and internal networks ([private IP][private-ip]). | ||
For more information on choosing between the two options, see the AlloyDB page | ||
[Connection overview][conn-overview]. | ||
|
||
You can configure the `ipType` parameter in your source configuration to | ||
`public` or `private` to match your cluster's configuration. Regardless of which | ||
you choose, all connections use IAM-based authorization and are encrypted with | ||
mTLS. | ||
|
||
[private-ip]: https://cloud.google.com/alloydb/docs/private-ip | ||
[public-ip]: https://cloud.google.com/alloydb/docs/connect-public-ip | ||
[conn-overview]: https://cloud.google.com/alloydb/docs/connection-overview | ||
|
||
### Database User | ||
|
||
Current, this source only uses standard authentication. You will need to [create | ||
a PostreSQL user][cloud-sql-users] to login to the database with. | ||
|
||
[cloud-sql-users]: https://cloud.google.com/sql/docs/postgres/create-manage-users | ||
|
||
## Example | ||
|
||
```yaml | ||
sources: | ||
my-cloud-sql-pg-source: | ||
kind: "cloud-sql-postgres" | ||
project: "my-project-id" | ||
region: "us-central1" | ||
instance: "my-instance" | ||
database: "my_db" | ||
user: "my-user" | ||
password: "my-password" | ||
# ipType: "public" | ||
``` | ||
|
||
## Reference | ||
|
||
| **field** | **type** | **required** | **description** | | ||
|-----------|:--------:|:------------:|---------------------------------------------------------------------------------------------| | ||
| kind | string | true | Must be "cloud-sql-postgres". | | ||
| project | string | true | Id of the GCP project that the cluster was created in (e.g. "my-project-id"). | | ||
| region | string | true | Name of the GCP region that the cluster was created in (e.g. "us-central1"). | | ||
| instance | string | true | Name of the Cloud SQL instance within the cluster (e.g. "my-instance"). | | ||
| database | string | true | Name of the Postgres database to connect to (e.g. "my_db"). | | ||
| user | string | true | Name of the Postgres user to connect as (e.g. "my-pg-user"). | | ||
| password | string | true | Password of the Postgres user (e.g. "my-password"). | | ||
| ipType | string | false | IP Type of the Cloud SQL instance; must be one of `public` or `private`. Default: `public`. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 11 additions & 2 deletions
13
docs/sources/postgres.md → docs/en/resources/sources/postgres.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
title: "Spanner" | ||
type: docs | ||
weight: 1 | ||
description: > | ||
Spanner is a fully managed database service from Google Cloud that combines | ||
relational, key-value, graph, and search capabilities. | ||
--- | ||
|
||
# Spanner Source | ||
|
||
[Spanner][spanner-docs] is a fully managed, mission-critical database service | ||
that brings together relational, graph, key-value, and search. It offers | ||
transactional consistency at global scale, automatic, synchronous replication | ||
for high availability, and support for two SQL dialects: GoogleSQL (ANSI 2011 | ||
with extensions) and PostgreSQL. | ||
|
||
If you are new to Spanner, you can try to [create and query a database using | ||
the Google Cloud console][spanner-quickstart]. | ||
|
||
[spanner-docs]: https://cloud.google.com/spanner/docs | ||
[spanner-quickstart]: | ||
https://cloud.google.com/spanner/docs/create-query-database-console | ||
|
||
## Requirements | ||
|
||
### IAM Permissions | ||
|
||
Spanner uses [Identity and Access Management (IAM)][iam-overview] to control | ||
user and group access to Spanner resources at the project, Spanner instance, and | ||
Spanner database levels. Toolbox will use your [Application Default Credentials | ||
(ADC)][adc] to authorize and authenticate when interacting with Spanner. | ||
|
||
In addition to [setting the ADC for your server][set-adc], you need to ensure | ||
the IAM identity has been given the correct IAM permissions for the query | ||
provided. See [Apply IAM roles][grant-permissions] for more information on | ||
applying IAM permissions and roles to an identity. | ||
|
||
[iam-overview]: https://cloud.google.com/spanner/docs/iam | ||
[adc]: https://cloud.google.com/docs/authentication#adc | ||
[set-adc]: https://cloud.google.com/docs/authentication/provide-credentials-adc | ||
[grant-permissions]: https://cloud.google.com/spanner/docs/grant-permissions | ||
|
||
## Example | ||
|
||
```yaml | ||
sources: | ||
my-spanner-source: | ||
kind: "spanner" | ||
project: "my-project-id" | ||
instance: "my-instance" | ||
database: "my_db" | ||
# dialect: "googlesql" | ||
``` | ||
|
||
## Reference | ||
|
||
| **field** | **type** | **required** | **description** | | ||
|-----------|:--------:|:------------:|---------------------------------------------------------------------------------------------------------------------| | ||
| kind | string | true | Must be "spanner". | | ||
| project | string | true | Id of the GCP project that the cluster was created in (e.g. "my-project-id"). | | ||
| instance | string | true | Name of the Spanner instance. | | ||
| database | string | true | Name of the database on the Spanner instance | | ||
| dialect | string | false | Name of the dialect type of the Spanner database, must be either `googlesql` or `postgresql`. Default: `googlesql`. | |
Oops, something went wrong.