Skip to content

Deployment

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

NameTypeRequiredDescription
serviceIdstringNo description in the catalog.
databaseIdstringNo description in the catalog.
environmentIdstringNo description in the catalog.

Response

FieldTypeAlwaysDescription
idstring
statusstring
serviceIdstring
databaseIdstring
environmentIdstring

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.

navigateselect