Renew commitments automatically


If you have workloads with predictable resource requirements, you can lower your costs through resource-based committed use discounts (CUDs). You can receive resource-based CUDs by purchasing resource-based commitments for a term of either 1 or 3 years. By default, resource-based commitments expire at the end of their term. After a commitment's expiry, you must purchase a new commitment to continue receiving CUDs. Auto-renewal of your resource-based commitment removes the need for you to manually repurchase the commitment every time it expires. Auto-renewal of a commitment allows you to indefinitely extend an existing commitment and continue receiving CUDs for those committed resources.

This document explains how auto-renewal works and shows you how to do the following:

  • Enable auto-renewal when you purchase new commitments.
  • Enable and disable auto-renewal on your existing active commitments.

Limitations

  • You can enable auto-renewal only on your resource-based commitments.
  • You can enable auto-renewal only on your active commitments.
  • To create a commitment that renews automatically, you must use the gcloud CLI and the Compute Engine API. You can't do so by using the Google Cloud console. However, you can enable auto-renewal on an already active commitment by using the gcloud CLI, the Compute Engine API, or the Google Cloud console.

How auto-renewal works

When you enable auto-renewal on a resource-based commitment, each time your commitment reaches the end of its term, Compute Engine automatically renews that commitment for a new term. After you enable auto-renewal on a commitment, the setting remains enabled until you manually disable it. You can disable auto-renewal on your commitment anytime before 12 AM US and Canadian Pacific Time (UTC-8, or UTC-7 during daylight saving time) on its renewal date.

You can enable auto-renewal on your commitments on both new and existing commitments.

  • For new commitments, when you purchase a commitment, you have the option to specify whether you want the commitment to renew automatically.
  • For existing commitments that are active and don't have auto-renewal enabled, you can modify the commitment's properties and enable auto-renewal. You can't enable auto-renewal for expired commitments.

You must enable auto-renewal separately on each commitment that you want to automatically renew in a project.

After you enable auto-renewal on a commitment, the current end date of your commitment becomes its renewal date. All other properties of your commitment remain the same. At 12 AM US and Canadian Pacific Time (UTC-8, or UTC-7) on the current end date (the renewal date), your commitment's renewed term automatically begins. The term length of your renewed commitment remains the same as the original commitment and you receive the same discount percentage. At the end of the renewed term, Compute Engine again renews your commitment for a new term, unless you manually disable auto-renewal during the commitment's term.

By activating auto-renewal on a commitment, you agree to the following:

  • You have your commitment automatically renew for a new term on its current end date.
  • You continue paying for your committed resources over the new term.

Example of auto-renewal

Consider an example 1-year commitment my-commitment-1 that does not renew automatically. Suppose you purchase this commitment on January 1, 2020 for 100 N2 vCPUs. The term of your commitment is scheduled to end on January 1, 2021. Suppose you perform the following series of operations on this commitment:

  1. You enable auto-renewal on this commitment before its end date.
  2. After the commitment's term gets renewed 2 times, you disable auto-renewal on the commitment and let your commitment expire on its new end date.

The following table shows how the commitment's properties behave throughout the lifetime of this commitment:

Original term
(Before enabling auto-renewal)
Original term
(After enabling auto-renewal)
First automatically renewed term
(Auto-renewal remains enabled)
Second automatically renewed term
(Before disabling auto-renewal)
Second automatically renewed term
(After disabling auto-renewal)
Term duration 1 year 1 year 1 year 1 year 1 year
Discount 37% 37% 37% 37% 37%
Start date* January 1, 2020 January 1, 2020 January 1, 2020 January 1, 2020 January 1, 2020
End date or renewal date January 1, 2021 January 1, 2021 January 1, 2022 January 1, 2023 January 1, 2023
Action on the end or renewal date Commitment scheduled to end Commitment scheduled to renew Commitment scheduled to renew Commitment scheduled to renew Commitment scheduled to end

*The commitment starts at 12 AM US and Canadian Pacific Time (UTC-8, or UTC-7) on the specified start date.
The commitment ends or gets renewed at 12 AM US and Canadian Pacific Time (UTC-8, or UTC-7) on the specified end date.
Even if the total duration of your commitment period becomes 3 years or more, the discount percentage for your auto-renewed commitment remains unchanged because the duration of each term is still 1 year.

Quota implications for auto-renewal

You do not need to request additional quota because renewed commitments use the same quota as the original commitment. For more information about quota for commitments, see Quotas for commitments and committed resources.

Pricing implications for auto renewal

Your commitment fee is the sum of the discounted prices of all your committed resources. When you renew your commitment's term, the discounted prices of all your committed resources are recalculated and might change. To do this recalculation, Compute Engine uses the prevailing on-demand prices of the resources on the day your renewed term becomes active. You retain these prices for your resources throughout your new term, even if the on-demand prices change.

Purchase a commitment that renews automatically

Purchase a commitment that renews automatically by using the gcloud CLI or the Compute Engine API.

Permissions required for this task

To perform this task, you must have the following permissions:

  • compute.commitments.create on the project

gcloud

Purchase a commitment that renews automatically by using the gcloud commitments create command.

For example, the following gcloud CLI command creates a 3-year commitment that renews automatically.

gcloud compute commitments create COMMITMENT \
    --auto-renew \
    --plan=36-month \
    --region=us-west1 \
    --project=PROJECT_ID \
    --resources=vcpu=4,memory=9

Replace the following:

  • COMMITMENT: the name of the new commitment.
  • PROJECT_ID: the project ID of the project where you want to create the commitment.

REST

Purchase a commitment that renews automatically by using the regionCommitments.insert method.

For example, the following Compute Engine API request creates a 3-year commitment that renews automatically.

POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/us-west1/commitments

{
  "name": "COMMITMENT",
  "plan": "THIRTY_SIX_MONTH",
  "resources": [
    {
      "type": "VCPU",
      "amount": 4
    },
    {
      "type": "MEMORY",
      "amount": 9
    }
  ],
  "autoRenew": true
}

Replace the following:

  • COMMITMENT: the name of the new commitment.
  • PROJECT_ID: the project ID of the project where you want to create the commitment.

Purchase a commitment that does not renew automatically

Purchase a commitment that does not renew automatically by using the Google Cloud console, gcloud CLI or the Compute Engine API.

Permissions required for this task

To perform this task, you must have the following permissions:

  • compute.commitments.create on the project or organization

Console

  1. In the Google Cloud console, go to the Committed use discounts page.

    Go to Committed use discounts

  2. Click Purchase commitment.

  3. Specify the details of the commitment. For more information, see Purchase commitments for machine types.

  4. Click Purchase.

gcloud

Purchase a commitment that does not renew automatically by using the gcloud commitments create command.

For example, using the following gcloud CLI, you purchase a new 3-year commitment that does not renew automatically.

gcloud compute commitments create COMMITMENT \
    --plan=36-month \
    --region=us-west1 \
    --project=PROJECT_ID \
    --resources=vcpu=4,memory=9

Replace the following:

  • COMMITMENT: the name of the new commitment.
  • PROJECT_ID: the project ID of the project where you want to create the commitment.

REST

Purchase a commitment that does not renew automatically by using the regionCommitments.insert method.

For example, the following Compute Engine API request creates a new 3-year commitment that does not renew automatically.

POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/us-west1/commitments

{
  "name": "COMMITMENT",
  "plan": "THIRTY_SIX_MONTH",
  "resources": [
    {
      "type": "VCPU",
      "amount": 4
    },
    {
      "type": "MEMORY",
      "amount": 9
    }
  ],
}

Replace the following:

  • COMMITMENT: the name of the new commitment.
  • PROJECT_ID: the project ID of the project where you want to create the commitment.

Enable auto-renewal on an existing commitment

Enable auto-renewal on an existing commitment by using the Google Cloud console, gcloud CLI, or the Compute Engine API.

Permissions required for this task

To perform this task, you must have the following permissions:

  • compute.commitments.update on the project or organization

Console

  1. In the Google Cloud console, go to the Committed use discounts page.

    Go to Committed use discounts

  2. In the Commitment list, under Hardware commitments, click the Name of the commitment.

  3. On the Hardware commitment details page, click the Auto renew toggle.

gcloud

Enable auto-renewal on an existing commitment by using the gcloud commitments update command.

gcloud compute commitments update COMMITMENT \
    --auto-renew

Replace COMMITMENT with the name of the commitment.

REST

Enable auto-renewal on an existing commitment by using the regionCommitments.update method.

For example, the following Compute Engine API request enables auto-renew for a commitment in the us-west1 region.

PATCH https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/us-west1/commitments

{
  "name": "COMMITMENT",
  "autoRenew": true
}

Replace the following:

  • COMMITMENT: the name of the commitment to update.
  • PROJECT_ID: the project ID of the project where you want to update the commitment.

Disable auto-renewal on an existing commitment

Disable auto-renewal on an existing commitment by using the Google Cloud console, gcloud CLI, or the Compute Engine API.

Permissions required for this task

To perform this task, you must have the following permissions:

  • compute.commitments.update on the project or organization

Console

  1. In the Google Cloud console, go to the Committed use discounts page.

    Go to Committed use discounts

  2. In the Commitment list, under Hardware commitments, click the Name of the commitment.

  3. On the Hardware commitment details page, click the Auto renew toggle.

gcloud

Disable auto-renewal on an existing commitment by using the gcloud commitments update command.

gcloud compute commitments update COMMITMENT --no-auto-renew

Replace COMMITMENT with the name of the commitment.

REST

Disable auto-renewal on an existing commitment by using the regionCommitments.update method.

For example, the following Compute Engine API request disables auto-renewal for a commitment in the us-west1 region.

PATCH https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/us-west1/commitments

{
  "name": "COMMITMENT",
  "autoRenew": false
}

Replace the following:

  • COMMITMENT: the name of the commitment to update.
  • PROJECT_ID: the project ID of the project where you want to update the commitment.

What's next