You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: skills/cloudsql-postgres-admin/SKILL.md
+10-60Lines changed: 10 additions & 60 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
name: cloudsql-postgres-admin
3
-
description: skill for performing administrative operations on cloudsql postgres
3
+
description: Use these tools when you need to provision new Cloud SQL instances, create databases and users, clone existing environments, and monitor the progress of long-running operations.
4
4
---
5
5
6
6
## Usage
@@ -15,6 +15,7 @@ All scripts can be executed using Node.js. Replace `<param_name>` and `<param_va
15
15
16
16
Note: The scripts automatically load the environment variables from various .env files. Do not ask the user to set vars unless skill executions fails due to env var absence.
17
17
18
+
18
19
## Scripts
19
20
20
21
@@ -26,30 +27,14 @@ Clone an existing Cloud SQL instance into a new instance. The clone can be a dir
26
27
27
28
| Name | Type | Description | Required | Default |
28
29
| :--- | :--- | :--- | :--- | :--- |
29
-
| project | string | The project ID| Yes||
30
+
| project | string | The GCP project ID. This is pre-configured; do not ask for it unless the user explicitly provides a different one. | No||
30
31
| sourceInstanceName | string | The name of the instance to be cloned. | Yes ||
31
32
| destinationInstanceName | string | The name of the new instance that will be created by cloning the source instance. | Yes ||
32
33
| pointInTime | string | The timestamp in RFC 3339 format to which the source instance should be cloned. | No ||
33
34
| preferredZone | string | The preferred zone for the new instance. | No ||
34
35
| preferredSecondaryZone | string | The preferred secondary zone for the new instance. | No ||
35
36
36
37
37
-
---
38
-
39
-
### create_backup
40
-
41
-
Creates a backup on a Cloud SQL instance.
42
-
43
-
#### Parameters
44
-
45
-
| Name | Type | Description | Required | Default |
46
-
| :--- | :--- | :--- | :--- | :--- |
47
-
| project | string | The project ID | Yes ||
48
-
| instance | string | Cloud SQL instance ID. This does not include the project ID. | Yes ||
49
-
| location | string | Location of the backup run. | No ||
50
-
| backup_description | string | The description of this backup run. | No ||
51
-
52
-
53
38
---
54
39
55
40
### create_database
@@ -60,7 +45,7 @@ Creates a backup on a Cloud SQL instance.
60
45
61
46
| Name | Type | Description | Required | Default |
62
47
| :--- | :--- | :--- | :--- | :--- |
63
-
| project | string | The project ID| Yes||
48
+
| project | string | The GCP project ID. This is pre-configured; do not ask for it unless the user explicitly provides a different one. | No||
64
49
| instance | string | The ID of the instance where the database will be created. | Yes ||
65
50
| name | string | The name for the new database. Must be unique within the instance. | Yes ||
66
51
@@ -75,7 +60,7 @@ Creates a backup on a Cloud SQL instance.
75
60
76
61
| Name | Type | Description | Required | Default |
77
62
| :--- | :--- | :--- | :--- | :--- |
78
-
| project | string | The project ID| Yes||
63
+
| project | string | The GCP project ID. This is pre-configured; do not ask for it unless the user explicitly provides a different one. | No||
79
64
| name | string | The name of the instance | Yes ||
80
65
| databaseVersion | string | The database version for Postgres. If not specified, defaults to the latest available version (e.g., POSTGRES_17). | No |`POSTGRES_17`|
81
66
| rootPassword | string | The root password for the instance | Yes ||
@@ -92,7 +77,7 @@ Creates a backup on a Cloud SQL instance.
92
77
93
78
| Name | Type | Description | Required | Default |
94
79
| :--- | :--- | :--- | :--- | :--- |
95
-
| project | string | The project ID| Yes||
80
+
| project | string | The GCP project ID. This is pre-configured; do not ask for it unless the user explicitly provides a different one. | No||
96
81
| instance | string | The ID of the instance where the user will be created. | Yes ||
97
82
| name | string | The name for the new user. Must be unique within the instance. | Yes ||
98
83
| password | string | A secure password for the new user. Not required for IAM users. | No ||
@@ -109,7 +94,7 @@ Creates a backup on a Cloud SQL instance.
109
94
110
95
| Name | Type | Description | Required | Default |
111
96
| :--- | :--- | :--- | :--- | :--- |
112
-
| projectId | string | The project ID| Yes||
97
+
| projectId | string | The GCP project ID. This is pre-configured; do not ask for it unless the user explicitly provides a different one. | No||
113
98
| instanceId | string | The instance ID | Yes ||
114
99
115
100
@@ -123,7 +108,7 @@ Lists all databases for a Cloud SQL instance.
123
108
124
109
| Name | Type | Description | Required | Default |
125
110
| :--- | :--- | :--- | :--- | :--- |
126
-
| project | string | The project ID| Yes||
111
+
| project | string | The GCP project ID. This is pre-configured; do not ask for it unless the user explicitly provides a different one. | No||
127
112
| instance | string | The instance ID | Yes ||
128
113
129
114
@@ -137,42 +122,7 @@ Lists all type of Cloud SQL instances for a project.
137
122
138
123
| Name | Type | Description | Required | Default |
139
124
| :--- | :--- | :--- | :--- | :--- |
140
-
| project | string | The project ID | Yes ||
141
-
142
-
143
-
---
144
-
145
-
### postgres_upgrade_precheck
146
-
147
-
Analyzes a Cloud SQL PostgreSQL instance for major version upgrade readiness. Results are provided to guide customer actions:
148
-
ERROR: Action Required. These are critical issues blocking the upgrade. Customers must resolve these using the provided actions_required steps before attempting the upgrade.
149
-
WARNING: Review Recommended. These are potential issues. Customers should review the message and actions_required. While not blocking, addressing these is advised to prevent future problems or unexpected behavior post-upgrade.
150
-
INFO: No Action Needed. Informational messages only. This pre-check helps customers proactively fix problems, preventing upgrade failures and ensuring a smoother transition.
151
-
152
-
#### Parameters
153
-
154
-
| Name | Type | Description | Required | Default |
155
-
| :--- | :--- | :--- | :--- | :--- |
156
-
| project | string | The project ID | Yes ||
157
-
| instance | string | The name of the instance to check | Yes ||
158
-
| targetDatabaseVersion | string | The target PostgreSQL version for the upgrade (e.g., POSTGRES_18). If not specified, defaults to the PostgreSQL 18. | No |`POSTGRES_18`|
159
-
160
-
161
-
---
162
-
163
-
### restore_backup
164
-
165
-
Restores a backup on a Cloud SQL instance.
166
-
167
-
#### Parameters
168
-
169
-
| Name | Type | Description | Required | Default |
170
-
| :--- | :--- | :--- | :--- | :--- |
171
-
| target_project | string | The project ID | Yes ||
172
-
| target_instance | string | Cloud SQL instance ID of the target instance. This does not include the project ID. | Yes ||
173
-
| backup_id | string | Identifier of the backup being restored. Can be a BackupRun ID, backup name, or BackupDR backup name. Use the full backup ID as provided, do not try to parse it | Yes ||
174
-
| source_project | string | GCP project ID of the instance that the backup belongs to. Only required if the backup_id is a BackupRun ID. | No ||
175
-
| source_instance | string | Cloud SQL instance ID of the instance that the backup belongs to. Only required if the backup_id is a BackupRun ID. | No ||
125
+
| project | string | The GCP project ID. This is pre-configured; do not ask for it unless the user explicitly provides a different one. | No ||
176
126
177
127
178
128
---
@@ -185,7 +135,7 @@ Restores a backup on a Cloud SQL instance.
185
135
186
136
| Name | Type | Description | Required | Default |
187
137
| :--- | :--- | :--- | :--- | :--- |
188
-
| project | string | The project ID| Yes||
138
+
| project | string | The GCP project ID. This is pre-configured; do not ask for it unless the user explicitly provides a different one. | No||
0 commit comments