All skills
google avatar

/alloydb-basics

@becc4b8
by googlegoogle/skills21k stars
1,698

Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and integrates with AlloyDB Model Context Protocol (MCP) tools for automated database operations. Use when creating, configuring, or administering AlloyDB databases. Do NOT use for general PostgreSQL instances (e.g. Cloud SQL) or other GCP databases.

Use this Skill: https://skilld.dev/gh/google/skills/alloydb-basics

This session only. Nothing lands on disk.

referencesiac-usage.md

≈853 tokens on demand. Your agent reads this file only when SKILL.md points to it.

AlloyDB Infrastructure as Code Usage

Manage AlloyDB resources declaratively using Terraform or Kubernetes Config Connector (KCC).

Table of Contents

Terraform

Resources

  • google_alloydb_cluster: Manages an AlloyDB cluster.
  • google_alloydb_instance: Manages an AlloyDB instance within a cluster.

Example

data "google_project" "project" {}
resource "google_compute_network" "default" {
  name = "alloydb-network"
}
resource "google_compute_global_address" "private_ip_alloc" {
  name          =  "alloydb-cluster"
  address_type  = "INTERNAL"
  purpose       = "VPC_PEERING"
  prefix_length = 16
  network       = google_compute_network.default.id
}
resource "google_service_networking_connection" "vpc_connection" {
  network                 = google_compute_network.default.id
  service                 = "servicenetworking.googleapis.com"
  reserved_peering_ranges = [google_compute_global_address.private_ip_alloc.name]
}
resource "google_alloydb_cluster" "default" {
  cluster_id = "alloydb-cluster"
  location   = "us-central1"
  network_config {
    network = google_compute_network.default.id
  }
  initial_user {
    password = "alloydb-cluster"
  }
  deletion_protection = false
}
resource "google_alloydb_instance" "default" {
  cluster       = google_alloydb_cluster.default.name
  instance_id   = "alloydb-instance"
  instance_type = "PRIMARY"
  machine_config {
    cpu_count = 2
  }
  depends_on = [google_service_networking_connection.vpc_connection]
}

For additional deployment context, see the Google Provider Reference.

Kubernetes Config Connector (KCC)

Resources

  • AlloyDBCluster: Manages an AlloyDB cluster.
  • AlloyDBInstance: Manages an AlloyDB instance within a cluster.

Example

apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeNetwork
metadata:
  name: alloydb-network-kcc
spec:
  routingMode: REGIONAL
  autoCreateSubnetworks: false
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeAddress
metadata:
  name: alloydb-kcc-addr
spec:
  location: global
  addressType: INTERNAL
  purpose: VPC_PEERING
  prefixLength: 16
  networkRef:
    name: alloydb-network-kcc
---
apiVersion: servicenetworking.cnrm.cloud.google.com/v1beta1
kind: ServiceNetworkingConnection
metadata:
  name: alloydb-vpc-connection-kcc
spec:
  networkRef:
    name: alloydb-network-kcc
  service: servicenetworking.googleapis.com
  reservedPeeringRanges:
    - name: alloydb-kcc-addr
---
apiVersion: alloydb.cnrm.cloud.google.com/v1beta1
kind: AlloyDBCluster
metadata:
  name: alloydb-cluster-kcc
spec:
  location: us-central1
  networkConfig:
    networkRef:
      name: alloydb-network-kcc
  initialUser:
    password:
      valueFrom:
        secretKeyRef:
          name: alloydb-secret
          key: password
---
apiVersion: alloydb.cnrm.cloud.google.com/v1beta1
kind: AlloyDBInstance
metadata:
  name: alloydb-instance-kcc
spec:
  clusterRef:
    name: alloydb-cluster-kcc
  instanceType: PRIMARY
  machineConfig:
    cpuCount: 2

For more information, see the Config Connector resources.

Source: SKILL.md on GitHub

No alerts9d3 checks · Risk SAFE
  • Gen Agent Trust Hub9d

    This skill provides comprehensive guidance for managing AlloyDB resources and incorporates numerous security best practices, such as recommending IAM authentication and private network configurations. It includes some external references and command templates that warrant standard review during use.

  • Socket9d

    No alerts

  • Snyk9d

    Risk: LOW · No issues

Signed by skilld at becc4b8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 weeks ago
metadata
{
  "version": "1.0.0",
  "category": "Databases"
}

README badge

README badge for google/skills/alloydb-basics