mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-02-03 11:45:10 -05:00
## Description --- This pull request introduces a new tool, `cloud-sql-postgres-create-instance`, which allows users to create Cloud SQL PG instances directly from the toolbox. The tool is designed to simplify the instance creation process by providing sensible defaults while still offering flexibility for advanced configurations. __Key Features of the New Tool:__ - __Simplified Instance Creation:__ The tool introduces an `editionPreset` parameter that can be set to either `"Production"` or `"Development"`. This allows users to easily create instances with appropriate settings for their environment without needing to specify low-level configuration details. - __Production Preset:__ Configures a high-availability, performance-optimized instance. - __Development Preset:__ Configures a cost-effective, general-purpose instance suitable for testing and development. ## PR Checklist --- > Thank you for opening a Pull Request! Before submitting your PR, there are a > few things you can do to make sure it goes smoothly: - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [ ] Make sure to add `!` if this involve a breaking change 🛠️ Fixes #<issue_number_goes_here>
43 lines
2.8 KiB
Markdown
43 lines
2.8 KiB
Markdown
---
|
|
title: cloud-sql-postgres-create-instance
|
|
type: docs
|
|
weight: 10
|
|
description: Create a Cloud SQL for PostgreSQL instance.
|
|
---
|
|
|
|
The `cloud-sql-postgres-create-instance` tool creates a Cloud SQL for PostgreSQL instance using the Cloud SQL Admin API.
|
|
|
|
{{< notice info >}}
|
|
This tool uses a `source` of kind `cloud-sql-admin`.
|
|
{{< /notice >}}
|
|
|
|
## Example
|
|
|
|
```yaml
|
|
tools:
|
|
create-sql-instance:
|
|
kind: cloud-sql-postgres-create-instance
|
|
source: cloud-sql-admin-source
|
|
description: "Creates a Postgres instance using `Production` and `Development` presets. For the `Development` template, it chooses a 2 vCPU, 16 GiB RAM, 100 GiB SSD configuration with Non-HA/zonal availability. For the `Production` template, it chooses an 8 vCPU, 64 GiB RAM, 250 GiB SSD configuration with HA/regional availability. The Enterprise Plus edition is used in both cases. The default database version is `POSTGRES_17`. The agent should ask the user if they want to use a different version."
|
|
```
|
|
|
|
## Reference
|
|
|
|
### Tool Configuration
|
|
|
|
| **field** | **type** | **required** | **description** |
|
|
| ----------- | :------: | :----------: | ------------------------------------------------ |
|
|
| kind | string | true | Must be "cloud-sql-postgres-create-instance". |
|
|
| source | string | true | The name of the `cloud-sql-admin` source to use. |
|
|
| description | string | false | A description of the tool. |
|
|
|
|
### Tool Inputs
|
|
|
|
| **parameter** | **type** | **required** | **description** |
|
|
| --------------- | :------: | :----------: | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
| project | string | true | The project ID. |
|
|
| name | string | true | The name of the instance. |
|
|
| databaseVersion | string | false | The database version for Postgres. If not specified, defaults to the latest available version (e.g., POSTGRES_17). |
|
|
| rootPassword | string | true | The root password for the instance. |
|
|
| editionPreset | string | false | The edition of the instance. Can be `Production` or `Development`. This determines the default machine type and availability. Defaults to `Development`. |
|