alloydb-basics

Manages AlloyDB clusters, instances, and backups using gcloud CLI and MCP tools.

Updated Dec 9, 2025
One-click install
npx skills add https://github.com/Aki2022/skills --skill alloydb-basics-aki2022
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: alloydb-basics
Source: https://github.com/Aki2022/skills/tree/main/alloydb-basics
Command: npx skills add https://github.com/Aki2022/skills --skill alloydb-basics-aki2022

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Setting up and operating AlloyDB for PostgreSQL requires navigating many commands, connection methods, and security options. This Skill consolidates the essential workflows for provisioning clusters, creating instances, managing backups, and connecting applications securely. ## Core Features & Use Cases - Cluster and Instance Management: Create, list, describe, restart, and delete AlloyDB clusters and instances using gcloud alloydb commands. - Application Connectivity: Connect from Python, Java, and Go using AlloyDB Language Connectors, the Auth Proxy, or standard PostgreSQL drivers. - Infrastructure as Code: Deploy AlloyDB resources with Terraform or Kubernetes Config Connector using ready-made examples. - Security & IAM Guidance: Apply predefined IAM roles, IAM database authentication, Private IP/PSC connectivity, and encryption best practices. - Use Case: A developer needs to stand up a PostgreSQL-compatible database for a new service. Use this Skill to enable the API, create a cluster and primary instance, then connect a Python app via the AlloyDB connector with IAM authentication. ## Quick Start Ask the assistant to create an AlloyDB cluster named my-cluster in us-central1 with a primary instance using the gcloud CLI.

Frequently Asked Questions about alloydb-basics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create an AlloyDB cluster and instance with gcloud?

Enable the AlloyDB API, then run `gcloud alloydb clusters create` with a region, network, and password, followed by `gcloud alloydb instances create` with `--instance-type=PRIMARY` and a CPU count. Both commands target a specific region.

How do I connect a Python application to AlloyDB?

Install `google-cloud-alloydb-connector[pg8000]` with SQLAlchemy, then use the Connector class with your instance URI to create a connection pool. The connector handles SSL certificates and IAM authentication automatically.

AlloyDB Auth Proxy vs language connectors, which should I use?

Language connectors for Python, Java, and Go integrate directly into your application without running a separate binary. The Auth Proxy is a standalone tool better suited as a sidecar or for environments where in-process libraries are not practical.

Does AlloyDB support Terraform deployment?

Yes, AlloyDB supports Terraform through the `google_alloydb_cluster` and `google_alloydb_instance` resources in the Google Cloud Provider. Kubernetes Config Connector is also supported via AlloyDBCluster and AlloyDBInstance resources.

Should I use Private IP or Public IP for AlloyDB?

Private IP is recommended, preferably with Private Service Connect, when your application runs within Google Cloud. If Public IP is necessary, always restrict access with Authorized Networks and never use 0.0.0.0/0.

What IAM roles are available for AlloyDB access control?

AlloyDB provides four predefined roles: roles/alloydb.admin for full control, roles/alloydb.client for connectivity, roles/alloydb.databaseUser for authenticated database access, and roles/alloydb.viewer for read-only access.