chore: import upstream snapshot with attribution
CF: Deploy Dev Docs / deploy (push) Has been cancelled
Sync Labels / build (push) Has been cancelled
tests / unit tests (macos-latest) (push) Has been cancelled
tests / unit tests (windows-latest) (push) Has been cancelled
tests / unit tests (ubuntu-latest) (push) Has been cancelled
CF: Deploy Dev Docs / deploy (push) Has been cancelled
Sync Labels / build (push) Has been cancelled
tests / unit tests (macos-latest) (push) Has been cancelled
tests / unit tests (windows-latest) (push) Has been cancelled
tests / unit tests (ubuntu-latest) (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Cloud SQL for SQL Server"
|
||||
weight: 1
|
||||
---
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: "Prebuilt Configs"
|
||||
type: docs
|
||||
description: "Prebuilt configurations for Cloud Sql Mssql."
|
||||
---
|
||||
@@ -0,0 +1,26 @@
|
||||
---
|
||||
title: "Cloud SQL for SQL Server"
|
||||
type: docs
|
||||
description: "Details of the Cloud SQL for SQL Server prebuilt configuration."
|
||||
---
|
||||
|
||||
## Cloud SQL for SQL Server
|
||||
|
||||
* `--prebuilt` value: `cloud-sql-mssql`
|
||||
* **Environment Variables:**
|
||||
* `CLOUD_SQL_MSSQL_PROJECT`: The GCP project ID.
|
||||
* `CLOUD_SQL_MSSQL_REGION`: The region of your Cloud SQL instance.
|
||||
* `CLOUD_SQL_MSSQL_INSTANCE`: The ID of your Cloud SQL instance.
|
||||
* `CLOUD_SQL_MSSQL_DATABASE`: The name of the database to connect to.
|
||||
* `CLOUD_SQL_MSSQL_USER`: The database username.
|
||||
* `CLOUD_SQL_MSSQL_PASSWORD`: The password for the database user.
|
||||
* `CLOUD_SQL_MSSQL_IP_TYPE`: (Optional) The IP type i.e. "Public" or
|
||||
"Private" (Default: Public).
|
||||
* **Permissions:**
|
||||
* **Cloud SQL Client** (`roles/cloudsql.client`) to connect to the
|
||||
instance.
|
||||
* Database-level permissions (e.g., `SELECT`, `INSERT`) are required to
|
||||
execute queries.
|
||||
* **Tools:**
|
||||
* `execute_sql`: Executes a SQL query.
|
||||
* `list_tables`: Lists tables in the database.
|
||||
@@ -0,0 +1,113 @@
|
||||
---
|
||||
title: "Cloud SQL for SQL Server Source"
|
||||
linkTitle: "Source"
|
||||
type: docs
|
||||
weight: 1
|
||||
description: >
|
||||
Cloud SQL for SQL Server is a fully-managed database service for SQL Server.
|
||||
no_list: true
|
||||
---
|
||||
|
||||
## About
|
||||
|
||||
[Cloud SQL for SQL Server][csql-mssql-docs] is a managed database service that
|
||||
helps you set up, maintain, manage, and administer your SQL Server databases on
|
||||
Google Cloud.
|
||||
|
||||
If you are new to Cloud SQL for SQL Server, you can try [creating and connecting
|
||||
to a database by following these instructions][csql-mssql-connect].
|
||||
|
||||
[csql-mssql-docs]: https://cloud.google.com/sql/docs/sqlserver
|
||||
[csql-mssql-connect]: https://cloud.google.com/sql/docs/sqlserver/connect-overview
|
||||
|
||||
## Available Tools
|
||||
|
||||
{{< list-tools dirs="/integrations/mssql/tools" >}}
|
||||
|
||||
|
||||
### Pre-built Configurations
|
||||
|
||||
- [Cloud SQL for SQL Server using MCP](../../documentation/connect-to/ides/cloud_sql_mssql_mcp.md)
|
||||
Connect your IDE to Cloud SQL for SQL Server using Toolbox.
|
||||
|
||||
## 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`
|
||||
|
||||
{{< notice tip >}}
|
||||
If you are connecting from Compute Engine, make sure your VM
|
||||
also has the [proper
|
||||
scope](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
|
||||
to connect using the Cloud SQL Admin API.
|
||||
{{< /notice >}}
|
||||
|
||||
[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
|
||||
|
||||
### Networking
|
||||
|
||||
Cloud SQL 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 Cloud SQL 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/sql/docs/sqlserver/configure-private-ip
|
||||
[public-ip]: https://cloud.google.com/sql/docs/sqlserver/configure-ip
|
||||
[conn-overview]: https://cloud.google.com/sql/docs/sqlserver/connect-overview
|
||||
|
||||
### Database User
|
||||
|
||||
Currently, this source only uses standard authentication. You will need to
|
||||
[create a SQL Server user][cloud-sql-users] to login to the database with.
|
||||
|
||||
[cloud-sql-users]: https://cloud.google.com/sql/docs/sqlserver/create-manage-users
|
||||
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: source
|
||||
name: my-cloud-sql-mssql-instance
|
||||
type: cloud-sql-mssql
|
||||
project: my-project
|
||||
region: my-region
|
||||
instance: my-instance
|
||||
database: my_db
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
# ipType: private
|
||||
```
|
||||
|
||||
{{< notice tip >}}
|
||||
Use environment variable replacement with the format ${ENV_NAME}
|
||||
instead of hardcoding your secrets into the configuration file.
|
||||
{{< /notice >}}
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-----------|:--------:|:------------:|------------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "cloud-sql-mssql". |
|
||||
| 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 Cloud SQL database to connect to (e.g. "my_db"). |
|
||||
| user | string | true | Name of the SQL Server user to connect as (e.g. "my-pg-user"). |
|
||||
| password | string | true | Password of the SQL Server user (e.g. "my-password"). |
|
||||
| ipType | string | false | IP Type of the Cloud SQL instance, must be either `public`, `private`, or `psc`. Default: `public`. |
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
title: "Tools"
|
||||
weight: 2
|
||||
shared_tools:
|
||||
- source: "/integrations/mssql/tools"
|
||||
header: "SQL Server Tools"
|
||||
---
|
||||
Reference in New Issue
Block a user