Skip to content

deployment_cloud_sql_database_attach

Attach a managed Postgres database to a service in an environment; injects DATABASE_URL (and PG* vars) as a secret.

Tool

deployment_cloud_sql_database_attach

Attach a managed Postgres database to a service in an environment; injects DATABASE_URL (and PG* vars) as a secret.

Attach a managed Postgres database to a service in an environment; injects DATABASE_URL (and PG* vars) as a secret.

Behavior

HTTP
POST /deployment/cloud-sql/databases/attach

Arguments

Name
Type
Required
Description
serviceId
string
•
No description in the catalog.
databaseId
string
•
No description in the catalog.
environmentId
string
•
No description in the catalog.

Response

Field
Type
Always
Description
id
string
•
status
string
•
serviceId
string
•
databaseId
string
•
environmentId
string
•

Try it

Attach a managed Postgres database to a service in an environment; injects DATABASE_URL (and PG* vars) as a secret.

When to use

Attach a managed Postgres database to a service in an environment; injects DATABASE_URL (and PG* vars) as a secret.

Example

Ask your agent something like this:

Attach a managed Postgres database to a service in an environment; injects DATABASE_URL (and PG* vars) as a secret.

The agent will invoke deployment_cloud_sql_database_attach with these arguments:

{
  "serviceId": "<serviceId>",
  "databaseId": "<databaseId>",
  "environmentId": "<environmentId>"
}

Esc

Start typing to search the docs.

↑↓navigate↵select