If you have workloads with predictable resource requirements, you can lower your costs by purchasing a committed use discount. You purchase a committed use discount by creating a commitment.
By default, commitments don't automatically renew. If you want a commitment to automatically renew, you must manually enable the auto renew setting on each commitment.
For new commitments, you must specify a length of 1 year or 3 years, and you can optionally specify whether the commitment renews automatically. If you specify for the commitment to auto renew, the length of the renewed commitment is the same length as the original commitment. If you create a non-renewing commitment, you can change it to an automatically renewing commitment as long as the commitment is active and not expired.
By activating auto renew, you agree to have your committed use discount automatically renew on the end date unless you cancel auto renew, which you can do anytime up to the renewal date at 12 AM US and Canadian Pacific Time (UTC-8, or UTC-7 during daylight saving time).
This document shows you how to:
- Create commitments that renew automatically.
- Create commitments that do not renew automatically.
- Enable automatic renewal on existing commitments.
- Disable automatic renewal on existing commitments.
Limitations
- You cannot create a commitment that renews automatically by using the Google Cloud console.
Quota
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.
Create a commitment that renews automatically
Create 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
Create 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.
API
Create 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.
Create a commitment that does not renew automatically
Create 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
In the Google Cloud console, go to the Committed use discounts page.
Click Purchase commitment.
Specify the details of the commitment. For more information, see Purchase commitments for machine types.
Click Purchase.
gcloud
Create a commitment that does not renew automatically by using the gcloud
commitments create
command.
For example, the following gcloud CLI command creates 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.
API
Create 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 renew on an existing commitment
Enable auto renew 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
In the Google Cloud console, go to the Committed use discounts page.
In the Commitment list, under Hardware commitments, click the Name of the commitment.
On the Hardware commitment details page, click the Auto renew toggle.
gcloud
Enable auto renew 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.
API
Enable auto renew on an existing commitment by using the
regionCommitments.update
method.
For example, the following Compute Engine API request enables
auto-renew on 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 renew on an existing commitment
Disable auto renew 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
In the Google Cloud console, go to the Committed use discounts page.
In the Commitment list, under Hardware commitments, click the Name of the commitment.
On the Hardware commitment details page, click the Auto renew toggle.
gcloud
Disable auto renew 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.
API
Disable auto renew on an existing commitment by using the
regionCommitments.update
method.
For example, the following Compute Engine API request disables
auto renew on 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
- Learn how to troubleshoot auto renewal for resource-based commitments.
- Learn how to merge and split resource-based commitments.
- Learn how to upgrade the term of resource-based commitments.
- Learn how to analyze the effectiveness of your resource-based committed use discounts.