Create a free trial cluster

This page guides you through the process of creating and managing an AlloyDB free trial cluster.

For more information about AlloyDB free trial clusters, see AlloyDB free trial clusters overview.

Before your begin

  1. Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  3. Make sure that billing is enabled for your Google Cloud project.

  4. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  5. Make sure that billing is enabled for your Google Cloud project.

You are not charged for free trial clusters and instance resources, but you are charged for data transfer costs for connections outside the region, through the public internet, and for taking and storing your final backup. For more information, see Trial inclusions and conditions.

Create a free trial cluster

Console

When you create a free trial cluster, a primary instance is automatically created.

  1. In the Google Cloud console, go to the Clusters page.

    Go to Clusters

  2. Click Create Free Cluster.

  3. In the Cluster ID field of the Basic info section, enter a name for the cluster—for example, my-trial-cluster.

  4. In the Password field, enter a password you'd like. This password is used to connect to the default database.

  5. In the Region field of the Location section, select a region—for example, us-central1 (Iowa).

  6. In the Database version field, keep the default value.

  7. Under Networking, select default.

    If you have not set up private services access yet, a dialog labeled Private service access connection required appears.

    In the Private service access connection required dialog, to create private services access connection, complete the following:

    1. Click Set up connection.

      A new pane labeled Enable Service Networking API appears.

    2. In the pane, select Use an automatically allocated IP range.

    3. Click Continue.

    4. Click Create connection, and wait for the connection configuration to finish.

    The Enable Service Networking API pane is removed.

  8. Click Create Free Cluster.

After you create the free trial cluster, you are redirected to the Overview page. You can view your primary instance in the Instances in your cluster section, and other information about your cluster, such as days left on trial.

gcloud

To use the gcloud CLI, you can install and initialize the Google Cloud CLI, or you can use Cloud Shell.

Use the gcloud alloydb clusters create and gcloud alloydb instances create command to create a cluster and primary instance respectively.

gcloud alloydb clusters create CLUSTER_ID \
    --password=PASSWORD \
    --region=REGION_ID \
    --subscription-type=TRIAL
gcloud alloydb instances create INSTANCE_ID \
    --instance-type=PRIMARY \ 
    --cpu-count=8 \
    --region=REGION_ID \
    --cluster=CLUSTER_ID \

Replace the following:

  • CLUSTER_ID: the ID of the cluster that you are creating. It must begin with a lowercase letter and can contain lowercase letters, numbers, and hyphens.

  • PASSWORD: the password to use for the default postgres user.

  • REGION_ID: the region where you want the cluster placed.

  • CLUSTER_ID: The ID of the free trial cluster where you want the instance placed.

Add a read pool instance

You can add a single read pool instance of 8 vCPU compute capacity in a free trial cluster.

  1. In the Google Cloud console, go to the Clusters page.

    Go to Clusters

  2. Click the free trial cluster in the Resource Name column.

  3. Go to the Instances in your cluster section, and click Add read pool.

  4. Configure your read pool instance:

    1. In the Read pool instance ID field, enter an ID for the read pool instance.

    2. In the Node count field, the node count value is auto-set to 1 for a pool instance in a free trial cluster. This value cannot be changed.

    3. Click Create read pool.

Optional: Import your SQL file

You can import your SQL file that contains a logical backup of a PostgreSQL database to the free trial cluster.

Before you begin, do the following:

  • Upload your SQL file to a Cloud Storage bucket. For more information, see Import a SQL file.

    • Grant the AlloyDB service account permissions to the Cloud Storage bucket for the import operation.

      The format of the service account is as follows:

       service-PROJECT_NUMBER@gcp-sa-alloydb.iam.gserviceaccount.com
      

      Replace PROJECT_NUMBER with your project number—for example, 212340152241.

    • Ensure that the service account is granted the Storage Object Viewer (roles/storage.objectViewer) role.

  • Ensure that you are granted the AlloyDB Admin (roles/alloydb.admin) role. For custom roles, add the alloydb.clusters.import permission to the role.

  • (Optional). If you don't want to use the default database, connect to your instance and create a database.

To import your SQL file into an AlloyDB database, complete the following steps:

  1. Go to the Clusters page.

    Go to Clusters

  2. Click the free trial cluster in the Resource Name column.

  3. In the Overview page, expand the Get the most out of your free cluster menu.

  4. Click the Import data into AlloyDB step, and then click Import Data.

  5. In the Choose the file you'd like to import data from section, enter the path to the bucket and SQL file to use for the import, or browse to an existing file.

    The SQL file is a file with a sequence of SQL commands, like the output of the pg_dump utility.

  6. In the Destination section, select the database you want the data to be imported into.

  7. Select a database user in the User list.

  8. In the Password field, enter the password set for your database.

  9. Click Import to start the import.

Upgrade a free trial cluster

You can upgrade your free trial cluster anytime during your 30-day free trial period.

  1. In the Google Cloud console, go to the Clusters page.

    Go to Clusters

    1. Click the free trial cluster you created earlier in the Resource Name column.

    2. In the Overview page, click Upgrade now in the Days left on trial field.

    3. In the Machine type field of the Machine section, select the machine type you want to upgrade to.

    4. To start the upgrade, click Upgrade now.

      Screenshot of the AlloyDB Overview page in the Google Cloud console, highlighting the Upgrade now button.

After the upgrade completes, the Overview page no longer shows the days left on trial information, and any limitations that apply to the free trial cluster are removed.

What's next