alloydb-create-cluster

The “alloydb-create-cluster” tool creates a new AlloyDB for PostgreSQL cluster in a specified project and location.

About

The alloydb-create-cluster tool creates a new AlloyDB for PostgreSQL cluster in a specified project and location. It is compatible with alloydb-admin source. This tool provisions a cluster with a private IP address within the specified VPC network.

Permissions & APIs Required: Before using, ensure the following on your GCP project:

  1. The AlloyDB API is enabled.

  2. The user or service account executing the tool has one of the following IAM roles:

    • roles/alloydb.admin (the AlloyDB Admin predefined IAM role)
    • roles/owner (the Owner basic IAM role)
    • roles/editor (the Editor basic IAM role)

The tool takes the following input parameters:

ParameterTypeDescriptionRequired
projectstringThe GCP project ID where the cluster will be created.Yes
clusterstringA unique identifier for the new AlloyDB cluster.Yes
passwordstringA secure password for the initial user.Yes
locationstringThe GCP location where the cluster will be created. Default: us-central1. If quota is exhausted then use other regions.No
networkstringThe name of the VPC network to connect the cluster to. Default: default.No
userstringThe name for the initial superuser. Default: postgres.No

Example

tools:
  create_cluster:
    kind: alloydb-create-cluster
    source: alloydb-admin-source
    description: Use this tool to create a new AlloyDB cluster in a given project and location.

Reference

fieldtyperequireddescription
kindstringtrueMust be alloydb-create-cluster.
sourcestringtrueThe name of an alloydb-admin source.
descriptionstringfalseDescription of the tool that is passed to the agent.