Merge and split commitments Stay organized with collections Save and categorize content based on your preferences.
To help you manage the resource requirements for your projects,Compute Engine lets you merge or split your existing commitmentsand redistribute your resources to match the granularity required foryour projects.
This document describes the benefits and process of merging and splittingcommitments, along with the limitations and requirements that apply.
Before you begin
- If you haven't already, set upauthentication. Authentication verifies your identity for access to Google Cloud services and APIs. To run code or samples from a local development environment, you can authenticate to Compute Engine by selecting one of the following options:
Select the tab for how you plan to use the samples on this page:
Console
When you use the Google Cloud console to access Google Cloud services and APIs, you don't need to set up authentication.
gcloud
Install the Google Cloud CLI. After installation,initialize the Google Cloud CLI by running the following command:
gcloudinit
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
Note: If you installed the gcloud CLI previously, make sure you have the latest version by runninggcloud components update.- Set a default region and zone.
REST
To use the REST API samples on this page in a local development environment, you use the credentials you provide to the gcloud CLI.
Install the Google Cloud CLI. After installation,initialize the Google Cloud CLI by running the following command:
gcloudinit
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
Note: If you installed the gcloud CLI previously, make sure you have the latest version by runninggcloud components update.For more information, seeAuthenticate for using REST in the Google Cloud authentication documentation.
Merge commitments
You can merge multiple compatible commitments to create a new larger commitment.By merging commitments together, you can track and manage them as a singleentity. Merging commitments helps you avoid staggered commitment enddates by co-terming the individual commitments to expire at the same time.Merging also lets you gradually ramp up your workloads. For example, youcan purchase newer, smaller commitments when the need arises and choose to mergethem together or with an existing commitment.
Caution: When you merge commitments, all prioritized attributionrules that are associated with those commitments get deleted and cannot berecovered. If you want to continue using the prioritized attribution ruleson merged commitments, you must recreate the rules after therespective operation.How merging works
When you merge individual commitments (source commitments) together, you createa new commitment (merged commitment) with the combined resources from all thesource commitments. At 12 AM US and Canadian Pacific Time (UTC-8, or UTC-7during daylight saving time) on the following day, the merged commitmentbecomes active and the source commitments get cancelled. This date ofactivation becomes the start date for the merged commitment and the mergeoperation ends.
Additionally, the newly created merged commitment inherits thefollowing properties, regardless of whether the source commitments have thepreset term length or a custom term length:
- The end date that is furthest in the future among the source commitments.
- The term extension eligibility window that ends the earliest among thesource commitments.
Because the merged commitment gets created only after your source commitmentsare already active, the merged commitment might have a custom term length andnot the preset 1 or 3 years. However, the merged commitment retainsthe 1- or 3-year commitment plan of the source commitments.
For example, consider two source commitments that start on January 1, 2020, andDecember 1, 2020, respectively. The commitments have their end dates as January1, 2023, and December 1, 2023, respectively. The term extension eligibilitywindow for the first commitment remains open until May 1, 2020, and for thesecond commitment until April 1, 2021. If you merge these commitments on March1, 2022, then your merged commitment is a custom term commitment that hasa start date of March 2, 2022 and an end date of December 1, 2023.The term extension eligibility window for the merged commitment would havealready ended by May 1, 2020.
If any of the source commitments have reservations attached, then thereservations are preserved during the merge and are attached to the mergedcommitment after its creation. To learn more about commitments with attachedreservations, seeAttach reservations to resource-based commitments.
Example of a merged commitment
The following table shows the properties of source and merged commitments in ascenario where two commitments (source-commitment-1 andsource-commitment-2)are merged into one single commitment (merged-commitment) onMarch 1, 2022:
| First source commitment (before merge) | Second source commitment (before merge) | Merged commitment | |
|---|---|---|---|
| Name | source-commitment-1 | source-commitment-2 | merged-commitment |
| Type | N2 | N2 | N2 |
| Region | us-central-1 | us-central-1 | us-central-1 |
| Resources |
|
|
|
| Term | 3 years | 3 years | 3 years |
| Start date* | January 1, 2020 | December 1, 2020 | March 2, 2022 (the day after the merge) |
| End date† | January 1, 2023 | December 1, 2023 | December 1, 2023 |
| Term extension eligibility window open until | May 1, 2020 | April 1, 2021 | May 1, 2020 |
*All commitments start at 12 AM US and Canadian Pacific Time(UTC-8 or UTC-7) on the specified start date.†All commitments expire at 12 AM US and Canadian Pacific Time(UTC-8 or UTC-7) on the specified end date.
Pricing implications
Your commitment fee is the sum of the discounted prices of all your committedresources. When you merge your commitment, the discounted prices of your mergedcommitment's resources might change on the day your merged commitment becomesactive. This new discounted price for each resource stays the same until theend of your merged commitment's term, even if the on-demand prices change.However, if you merge or split this commitment again in the future, thediscounted prices of the resources might change again.
Limitations
- You can't merge license commitments.
- At the time of creation of merged commitments, you can't create anynew reservations and attach them to those commitments.
- You can't merge commitments that have expired or are cancelled.
- By default, when you create merged commitments, the auto-renewsetting is disabled on the new commitments even if all the sourcecommitments were set to renew automatically. If you want your mergedcommitments to renew automatically, you must manually enable theauto-renew setting on those commitments. You can do so eitherat the time of their creationorafter their creation.
Requirements
When you merge individual source commitments to create a new merged commitment,your source and merged commitments must meet the followingrequirements:
- The source commitments must have the same project, region, commitment plan,commitment type, and commitment category.
- The new merged commitment must have the same project, region,commitment plan, commitment type, and commitmentcategory as the source commitments. However, you can choose a new name foryour merged commitment.
- The resource types you specify for your merged commitment must be the exactsame resources types that are in the source commitments. Additionally, theamount of resources for each resource type in your new merged commitmentmust be equal to the sum of the amounts of resources for that resource typein all the source commitments. For example, if the first source commitmenthas 100 vCPUs and 100 GB memory and the second source commitment has200 vCPUs and 300 GB memory, then you must create your mergedcommitment with 300 vCPUs and 400 GB memory.
- The source and merged commitments must be for hardware resources (vCPUs,memory, GPUs, and Local SSD disks).
Create merged commitments
Create a merged commitment by using the gcloud CLI or theREST.Before you merge commitments, review thelimitations for merging.
Permissions required for this task
To perform this task, you must have the followingpermissions:
compute.commitments.createon the project or organization.
Console
In the Google Cloud console, select the project where you want tomerge commitments and go to theCommitted use discounts page.
To initiate the merge operation for a set of commitments, in theHardware commitments tab of theCommitment list page,clickMerge.
Alternatively, you can also select the commitments that you want to merge from the list and then clickMerge.
On theChoose commitment tab of theMerge page that opens, dothe following:
UnderChoose commitments to merge, select the commitmentsthat you want to merge from the list.If you already selected these commitments on theCommitment listpage, then verify your selected commitments on this tab.
Optional: you can also specify thePlan,Region, andCommitment type values that you want for your merged commitmentbefore you select the individual commitments for merging. Doing thisfilters the commitment list to display only those commitments thatyou can merge for the specified attributes.
ClickNext. TheReview tab opens.
On theReview tab of theMerge page, do the following:
- Review and confirm the details of the merged commitment.To modify the list of individual commitments that you want to merge,select theChoose commitment tab on the left side of the windowand repeat step 3.
- In theNew commitment name field, enter a name for your mergedcommitment.
- Optional: To enable auto renew on your merged commitment, selecttheEnable auto renew checkbox.
- Read theTerms and conditions.
- To finish creating your merged commitment and return to theCommitment list page, clickMerge.
gcloud
To merge existing commitments into a single commitment, use thegcloud compute commitments create commandwith the--merge-source-commitment flag.
gcloud compute commitments createCOMMITMENT_NAME \ --region=REGION \ --project=PROJECT_ID \ --plan=COMMITMENT_PLAN \ --type=COMMITMENT_TYPE \ --resources=vcpu=NUMBER_VCPUS,memory=MEMORY \ --merge-source-commitments=SOURCE_COMMITMENT_URLS
Replace the following:
COMMITMENT_NAME: the name of your new mergedcommitment.NUMBER_VCPUS: the sum of the numbers of vCPUs inthe source commitments.COMMITMENT_TYPE: the same commitment type as yoursource commitments, one of the following:- For A2 machine types, use
accelerator-optimized - For A3 Edge and A3 High machine types, use
accelerator-optimized-a3 - For A3 Mega machine types, use
accelerator-optimized-a3-megaNote: For A4X, A4, or A3 Ultra machine types, you must purchase your commitments by using thefuture reservations in AI Hypercomputer consumption option. For more information, see Reserve capacity through your account team. - For G2 machine types, use
graphics-optimized - For G4 machine types, use
graphics-optimized-g4 - For C2 machine types, use
compute-optimized - For C2D machine types, use
compute-optimized-c2d - For C3 machine types, use
compute-optimized-c3 - For C3D machine types, use
compute-optimized-c3dCaution: For C3 and C3D commitment types, the machine family that is specified by the commitment type changes depending on the interface:- In the gcloud CLI and REST, the commitment type values useCompute-optimized as the machine family, even though C3 and C3D are part of the general-purpose machine family.
- In the Google Cloud console, the commitment type values use the correct machine series:General-Purpose.
- For H3 machine types, use
compute-optimized-h3 - For H4D machine types, use
compute-optimized-h4d - For N1 machine types, use
general-purpose - For C4 machine types, use
general-purpose-c4 - For C4A machine types, use
general-purpose-c4a - For C4D machine types, use
general-purpose-c4d - For E2 machine types, use
general-purpose-e2 - For N2 machine types, use
general-purpose-n2 - For N2D machine types, use
general-purpose-n2d - For N4 machine types, use
general-purpose-n4 - For N4D machine types, use
general-purpose-n4d - For N4A machine types, use
general-purpose-n4a(In Preview; CUDs available at GA) - For Tau T2D machine types, use
general-purpose-t2d - For M1 or M2 machine types, use
memory-optimized - For M3 machine types, use
memory-optimized-m3 - For M4 machine types, use
memory-optimized-m4 - For M4 machine types with 6 TB of memory, use
memory-optimized-m4-6tb - For X4 machine types with 6 TB of memory, use
memory-optimized-x4-6t - For X4 machine types with 8 TB of memory, use
memory-optimized-x4-8t - For X4 machine types with 12 TB of memory, use
memory-optimized-x4-12t - For X4 machine types with 16 TB of memory, use
memory-optimized-x4-960-16t - For X4 machine types with 24 TB of memory, use
memory-optimized-x4-1440-24t - For X4 machine types with 32 TB of memory, use
memory-optimized-x4-1920-32t - For Z3 machine types, use
storage-optimized-z3
- For A2 machine types, use
REGION: the same region as your sourcecommitments.PROJECT_ID: the project ID of the project forwhich you want to merge commitments.COMMITMENT_PLAN: the same commitment plan as yoursource commitments, either12-monthor36-month.MEMORY: the sum of the amounts, in MB or GB,of memory in the source commitments. For example, 1000 MB. If theunits are not specified, the default unit used is GB.SOURCE_COMMITMENT_URLS: Specify a list ofdistinct source commitment URLs, separating each URL with a comma.Don't add a whitespace between the URLs. In the list, you must specify atleast two source commitment URLs.
For example, consider two source commitments in the regionus-east1 withtheir resources specified as (4 N2 vCPUs and 2048 MB) and(3 N2 vCPUs and 2048 MB) respectively. The commitment plan of each ofthe source commitments is12-month. The following gcloud CLIcommand lets you merge the two commitments and create a new commitmentcalledmerged-commitment. The merged commitment specifies its resources as7 N2 vCPUs and '4096 MB and has a commitment plan of12-month:
gcloud compute commitments create merged-commitment \ --plan=12-month \ --project=myproject \ --region=us-east1 \ --type=general-purpose-n2 \ --resources=vcpu=7,memory=4096MB \ --merge-source-commitments=projects/myproject/regions/us-central1/commitments/source-commitment-1,projects/myproject/regions/us-central1/commitments/source-commitment-2
REST
To merge existing commitments into a single commitment, use theregionCommitments.insert method.
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/commitments{ "name":COMMITMENT_NAME, "plan":COMMITMENT_PLAN, "type":COMMITMENT_TYPE, "region":REGION, "resources": [ { "type": "vCPUs", "amount":NUMBER_VCPUS } { "type": "MEMORY", "amount":MEMORY } ], "mergeSourceCommitments": [SOURCE_COMMITMENT_URL ...]}Replace the following:
PROJECT_ID: the project ID of the project forwhich you want to merge commitments.REGION: the same region as your sourcecommitments.COMMITMENT_TYPE: the same commitment type as yoursource commitments, one of the following:- For A2 machine types, use
ACCELERATOR_OPTIMIZED - For A3 Edge and A3 High machine types, use
ACCELERATOR_OPTIMIZED_A3 - For A3 Mega machine types, use
ACCELERATOR_OPTIMIZED_A3_MEGANote: For A4X, A4, or A3 Ultra machine types, you must purchase your commitments by using thefuture reservations in AI Hypercomputer consumption option. For more information, see Reserve capacity through your account team. - For G2 machine types, use
GRAPHICS_OPTIMIZED - For G4 machine types, use
GRAPHICS_OPTIMIZED_G4 - For C2 machine types, use
COMPUTE_OPTIMIZED - For C2D machine types, use
COMPUTE_OPTIMIZED_C2D - For C3 machine types, use
COMPUTE_OPTIMIZED_C3 - For C3D machine types, use
COMPUTE_OPTIMIZED_C3DCaution: For C3 and C3D commitment types, the machine family that is specified by the commitment type changes depending on the interface:- In the gcloud CLI and REST, the commitment type values useCompute-optimized as the machine family, even though C3 and C3D are part of the general-purpose machine family.
- In the Google Cloud console, the commitment type values use the correct machine series:General-Purpose.
- For H3 machine types, use
COMPUTE_OPTIMIZED_H3 - For H4D machine types, use
COMPUTE_OPTIMIZED_H4D - For N1 machine types, use
GENERAL_PURPOSE - For C4 machine types, use
GENERAL_PURPOSE_C4 - For C4A machine types, use
GENERAL_PURPOSE_C4A - For C4D machine types, use
GENERAL_PURPOSE_C4D - For E2 machine types, use
GENERAL_PURPOSE_E2 - For N2 machine types, use
GENERAL_PURPOSE_N2 - For N2D machine types, use
GENERAL_PURPOSE_N2D - For N4 machine types, use
GENERAL_PURPOSE_N4 - For N4D machine types, use
GENERAL_PURPOSE_N4D - For N4A machine types, use
GENERAL_PURPOSE_N4A(In Preview; CUDs available at GA) - For Tau T2D machine types, use
GENERAL_PURPOSE_T2D - For M1 or M2 machine types, use
MEMORY_OPTIMIZED - For M3 machine types, use
MEMORY_OPTIMIZED_M3 - For M4 machine types, use
MEMORY_OPTIMIZED_M4 - For M4 machine types with 6 TB of memory, use
MEMORY_OPTIMIZED_M4_6TB - For X4 machine types with 6 TB of memory, use
MEMORY_OPTIMIZED_X4_480_6T - For X4 machine types with 8 TB of memory, use
MEMORY_OPTIMIZED_X4_480_8T - For X4 machine types with 12 TB of memory, use
MEMORY_OPTIMIZED_X4_960_12T - For X4 machine types with 16 TB of memory, use
MEMORY_OPTIMIZED_X4_960_16T - For X4 machine types with 24 TB of memory, use
MEMORY_OPTIMIZED_X4_1440_24T - For X4 machine types with 32 TB of memory, use
MEMORY_OPTIMIZED_X4_1920_32T - For Z3 machine types, use
STORAGE_OPTIMIZED_Z3
- For A2 machine types, use
COMMITMENT_PLAN: the same commitment plan as yoursource commitments, eitherTWELVE_MONTHorTHIRTY_SIX_MONTH.COMMITMENT_NAME: the name of your new mergedcommitment.NUMBER_VCPUS: the sum of the numbers of vCPUs inthe source commitments.MEMORY: the sum of the amounts, in MB, of memoryin the source commitments. For example, 1000 MB. If theunits are not specified, the default unit used is MB.SOURCE_COMMITMENT_URL: the URL of the sourcecommitment that you want to merge. You must specify a comma-separatedlist of distinct source commitment URLs.
For example, consider two source commitments (source-commitment-1 andsource-commitment-2) in the regionus-east1 with their resourcesspecified as (4 N2 vCPUs and 2048 MB) and (3 N2 vCPUs and 2048 MB)respectively. The commitment plan of each of the source commitments isTWELVE_MONTH. The followingPOST request lets you merge the sourcecommitments and create a new commitment calledmerged-commitment. Themerged commitment specifies its resources as 7 N2 vCPUs and '4096 MBand has a commitment plan ofTWELVE_MONTH.
POST https://compute.googleapis.com/compute/v1/projects/myproject/regions/us-central1/commitments{ "name": "merged-commitment", "plan": "TWELVE_MONTH", "type": "GENERAL_PURPOSE_N2", "region": "us-east1", "resources": [ { "type": "VCPU", "amount": "7" } { "type": "MEMORY", "amount": "4096" } ], "mergeSourceCommitments": [ "projects/myproject/regions/us-central1/commitments/source-commitment-1", "projects/myproject/regions/us-central1/commitments/source-commitment-2", ... ]}Split commitments
You can transfer resources out of an existing commitment and split thecommitment into smaller commitments. Splitting lets you closelymonitor and manage portions of one large commitment in the form of smallerindividual commitments. For example, you can set only a portion of a commitmenttorenew automaticallyby splitting it and enabling automatic renewal for only one of the childcommitments. With splitting, you can also distribute your committed usediscounts at a more granular level by usingprioritized attribution for the splitcommitments.
Caution: When you split commitments, all prioritized attributionrules that are associated with those commitments get deleted and cannot berecovered. If you want to continue using the prioritized attribution ruleson merged or split commitments, you must recreate the rules after therespective operation.How splitting works
When you split an existing commitment (source commitment), you transferresources out of your source commitment, create one or more new commitments(split commitments), and redistribute the transferred resources among the newsplit commitments. Both the activation of the new split commitments and theresizing of the source commitment take place at 12 AM US and Canadian PacificTime (UTC-8, or UTC-7 during daylight saving time) on the following day.Compute Engine sets this date of activation as the start date for the splitcommitments. At the completion of the split operation you have the followingcommitments:
- The resized source commitment with the resources that remain after the split.
- The newly created split commitments with the redistributed resources.
The source commitment, although resized, retains all of its other attributes,including its start and end dates, and continues to operate normally.The split commitments retain the same end date andterm extension eligibility windowas the source commitment.
Because the new split commitments get created only after your source commitmentis already active, the split commitments might have a custom length and notthe preset 1 or 3 years. However, the split commitments retain the1- or 3-year commitment plan of the source commitment.
You can create only one new split commitment at a time by using theREST and the gcloud CLI. You can create multiplenew split commitments in a single operation by using the Google Cloud console.
You can't split a commitment when it has attached reservations. To learn moreabout commitments with attached reservations, seeCombining reservations with committed use discounts.
Example of a split commitment
The following table shows the commitment properties when an existing commitment(source-commitment) gets split into two distinct commitments(resizedsource-commitment andsplit-commitment) on March 1, 2022:
| Source commitment (before split) | Split commitment | Source commitment (after split) | |
|---|---|---|---|
| Name | source-commitment | split-commitment | source-commitment |
| Type | N2 | N2 | N2 |
| Region | us-central-1 | us-central-1 | us-central-1 |
| Resources |
|
|
|
| Term | 3 years | 3 years | 3 years |
| Start date* | January 1, 2020 | March 2, 2022 (the day after the split) | January 1, 2020 |
| End date† | January 1, 2023 | January 1, 2023 | January 1, 2023 |
| Term extension eligibility window open until | January 1, 2021 | January 1, 2021 | January 1, 2021 |
*All commitments start at 12 AM US and Canadian Pacific Time(UTC-8 or UTC-7) on the specified start date.†All commitments expire at 12 AM US and Canadian Pacific Time(UTC-8 or UTC-7) on the specified end date.
Pricing implications
Your commitment fee is the sum of the discounted prices of all your committedresources. Splitting a commitment affects your resource costs in the followingway:
- Resized source commitment: The discounted prices of the resources fromyour resized source commitment remain the same.
- Split commitment: The discounted prices of your newly split commitment'sresources might change on the day your split commitment becomes active.This new discounted price for each resource stays the same until the end ofyour new split commitment's term, even if the on-demand prices change.
However, if you merge or split either of these commitments again in the future,the discounted prices might change again.
Limitations
- You can't split license commitments.
- You can't splitcommitments that have attached reservations.Consequently, you can't split commitments that have GPUs, Local SSD disks,or both, as commitments with these resources always have attachedreservations.
- At the time of creation of split commitments, you can't create anynew reservations and attach them to those commitments.
- You can't split commitments that have expired or are cancelled.
- By default, when you create split commitments, the auto-renewsetting is disabled on the new commitments even if all the sourcecommitments were set to renew automatically. If you want yoursplit commitments to renew automatically, you must manually enable theauto-renew setting on those commitments. You can do so eitherat the time of their creationorafter their creation.
- You can create only one new split commitment at a time using theREST or the gcloud CLI. As a result, you can split yoursource commitment into a maximum of two commitments in a single operationwhen you use these interfaces. To split your source commitmentinto three or more commitments in a single operation, use theGoogle Cloud console.
- In the Google Cloud console, you can specify memory only inincrements of 0.25 GB. To specify a custom memory value for yourcommitment, use gcloud CLI or REST instead.
Requirements
When you split a source commitment and create one or more split commitments,your source and split commitments must meet the following requirements:
- The new split commitments must have the same project, commitment type,region, and commitment plan as the source commitment. However, you mustchoose new names for your split commitments.
- The resource types you specify for the new split commitments must match someor all of the resource types in the source commitment. Additionally, thecombined amount of resources that you specify for the new split commitmentsmust be a portion of the resources in the source commitment. You have toretain a portion of the resources in your source commitment. For example,suppose your source commitment is for 200 vCPUs and 300 GB memory,the following resize and redistribution scenarios are applicable:
- You can redistribute a portion of the 200 vCPUs and a portion of the300 GB memory among your new split commitments.
- You can redistribute all of the 200 vCPUs, but you must retain aportion of the memory in your source commitment.
- You can redistribute all of the 300 GB memory but you must retain aportion of the vCPUs in your source commitment.
- You can't redistribute all of the 200 vCPUs and all of the300 GB memory among your new split commitments
- The source and split commitments must be for hardware resources that arevCPUs, memory, or a combination of both.
Additionally, to use the Google Cloud CLI to split a source commitment, update the Google Cloud CLIto version 423.0.0 or later. If you attempt to split a source commitmentusing an earlier gcloud CLI version, your split operation fails andCompute Engine throws an error.
Create split commitments
Create one new split commitment at a time by using the gcloud CLIor the Compute Engine API. Create multiple new split commitments at a timeby using the Google Cloud console. Before you split a commitment, review thelimitations for splitting.
Permissions required for this task
To perform this task, you must have the followingpermissions:
compute.commitments.createon the project or organization.
Console
In the Google Cloud console, select the project where you want tosplit a commitment and go to theCommitted use discounts page.
To initiate the split operation for a commitment, do either of thefollowing in theHardware commitments tab of theCommitment listpage:
- Select the commitment that you want to split from the list and clickSplit.
- In theName column, click the name of the commitment that youwant to split. On theHardware commitment details page that opens,clickSplit.
On theResize tab of theSplit commitment page that opens, dothe following:
- In thevCPUs andMemory fields, specify the number of vCPUsand memory that you want to retain in your original commitment. Theremaining resources are available for redistribution to your splitcommitment. The source commitment can't be empty after you resize it.
- ClickNext. TheRedistribute tab opens.
On theRedistribute tab of theSplit commitment page, do thefollowing:
- In theName field, specify a name for your split commitment.
- In thevCPUs andMemory fields, specify the number of vCPUsand memory that you want in your split commitment.
- If you want to create multiple split commitments, specify only aportion of the redistributed resources.
- Otherwise, specify all of your redistributed resources.
You can specify memory only in increments of 0.25 GB. To specify acustom memory value for your commitment, use gcloud CLIor REST instead.1. Optional: To enable auto renew on your split commitment, select theEnable auto renew checkbox.1. ClickDone.1. Optional: To create additional split commitments, clickAdd an item and repeat the preceding steps.1. ClickNext. TheReview tab opens.
On theReview tab of theSplit commitment page, do thefollowing:
- Review and confirm the details of the resized commitment and the splitcommitments.
- To modify the resource allocation from your original commitment,select theResize tab on the left side of the window and repeatstep 3.
- To modify your resource redistribution among your split commitments,select theRedistribute tab on the left side of the window andrepeat step 4.
- Read theTerms and conditions.
- To finish creating your split commitments and return to theCommitment list page, clickSubmit.
- Review and confirm the details of the resized commitment and the splitcommitments.
gcloud
Important: To use the Google Cloud CLI to split a source commitment, update the Google Cloud CLIto version 423.0.0 or later. If you attempt to split a source commitmentusing an earlier gcloud CLI version, your split operation fails andCompute Engine throws an error.To split an existing commitment into two commitments, use thegcloud compute commitments create commandwith the--split-source-commitment flag.
gcloud compute commitments createCOMMITMENT_NAME \ --region=REGION \ --project=PROJECT_ID \ --plan=COMMITMENT_PLAN \ --type=COMMITMENT_TYPE \ --resources=vcpu=NUMBER_VCPUS,memory=MEMORY \ --split-source-commitment=SOURCE_COMMITMENT_URL
Replace the following:
COMMITMENT_NAME: the name of your new splitcommitment.COMMITMENT_TYPE: the same commitment type as yoursource commitment, one of the following:- For A2 machine types, use
accelerator-optimized - For A3 Edge and A3 High machine types, use
accelerator-optimized-a3 - For A3 Mega machine types, use
accelerator-optimized-a3-megaNote: For A4X, A4, or A3 Ultra machine types, you must purchase your commitments by using thefuture reservations in AI Hypercomputer consumption option. For more information, see Reserve capacity through your account team. - For G2 machine types, use
graphics-optimized - For G4 machine types, use
graphics-optimized-g4 - For C2 machine types, use
compute-optimized - For C2D machine types, use
compute-optimized-c2d - For C3 machine types, use
compute-optimized-c3 - For C3D machine types, use
compute-optimized-c3dCaution: For C3 and C3D commitment types, the machine family that is specified by the commitment type changes depending on the interface:- In the gcloud CLI and REST, the commitment type values useCompute-optimized as the machine family, even though C3 and C3D are part of the general-purpose machine family.
- In the Google Cloud console, the commitment type values use the correct machine series:General-Purpose.
- For H3 machine types, use
compute-optimized-h3 - For H4D machine types, use
compute-optimized-h4d - For N1 machine types, use
general-purpose - For C4 machine types, use
general-purpose-c4 - For C4A machine types, use
general-purpose-c4a - For C4D machine types, use
general-purpose-c4d - For E2 machine types, use
general-purpose-e2 - For N2 machine types, use
general-purpose-n2 - For N2D machine types, use
general-purpose-n2d - For N4 machine types, use
general-purpose-n4 - For N4D machine types, use
general-purpose-n4d - For N4A machine types, use
general-purpose-n4a(In Preview; CUDs available at GA) - For Tau T2D machine types, use
general-purpose-t2d - For M1 or M2 machine types, use
memory-optimized - For M3 machine types, use
memory-optimized-m3 - For M4 machine types, use
memory-optimized-m4 - For M4 machine types with 6 TB of memory, use
memory-optimized-m4-6tb - For X4 machine types with 6 TB of memory, use
memory-optimized-x4-6t - For X4 machine types with 8 TB of memory, use
memory-optimized-x4-8t - For X4 machine types with 12 TB of memory, use
memory-optimized-x4-12t - For X4 machine types with 16 TB of memory, use
memory-optimized-x4-960-16t - For X4 machine types with 24 TB of memory, use
memory-optimized-x4-1440-24t - For X4 machine types with 32 TB of memory, use
memory-optimized-x4-1920-32t - For Z3 machine types, use
storage-optimized-z3
- For A2 machine types, use
REGION: the same region as your source commitment.PROJECT_ID: the project ID of the project forwhich you want to split the source commitment.COMMITMENT_PLAN: the same commitment plan as yoursource commitment, either12-monthor36-month.NUMBER_VCPUS: the number of vCPUs you want totransfer out of your source commitment to create your new split commitment.The number must be an integer less than the number of vCPUs in thesource commitment.MEMORY: the amount, in MB or GB, of memory thatyou want to transfer out of your source commitment to create your newsplit commitment. The amount must be less than the amount of memory inthe source commitment. For example, 1000 MB. If the units are notspecified, the default unit used is GB.SOURCE_COMMITMENT_URL: the URL of the sourcecommitment from which you want to carve out resources.
For example, consider a source commitment (source-commitment) in theregionus-east1 that has its resources specified as 3 N2 vCPUs and2048 MB memory. The following gcloud CLI command lets yousplit the commitment into two separate commitments:
gcloud compute commitments create split-commitment \ --plan=12-month \ --type=general-purpose-n2 \ --region=us-east1 \ --project=myproject \ --resources vcpu=1,memory=1024MB \ --split-source-commitment=projects/myproject/regions/us-central1/commitments/source-commitment
During the process of splittingsource-commitment,Compute Engine does the following:
- Takes resources from
source-commitmentand creates a new commitmentsplit-commitmentwith 1 N2 vCPU and 1024 MB memory. - Resizes
source-commitmentto the remaining resources.
REST
To split an existing commitment into two commitments, use theregionCommitments.insert method.
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/commitments{ "name":COMMITMENT_NAME, "plan":COMMITMENT_PLAN, "type":COMMITMENT_TYPE, "region":REGION, "resources": [ { "type": "vCPUs", "amount":NUMBER_VCPUS } { "type": "MEMORY", "amount":MEMORY } ], "splitSourceCommitment":SOURCE_COMMITMENT_URL}Replace the following:
PROJECT_ID: the project ID of the project forwhich you want to split the source commitment.REGION: the same region as your source commitment.COMMITMENT_NAME: the name of your new splitcommitment.COMMITMENT_TYPE: the same commitment type as yoursource commitment, one of the following:- For A2 machine types, use
ACCELERATOR_OPTIMIZED - For A3 Edge and A3 High machine types, use
ACCELERATOR_OPTIMIZED_A3 - For A3 Mega machine types, use
ACCELERATOR_OPTIMIZED_A3_MEGANote: For A4X, A4, or A3 Ultra machine types, you must purchase your commitments by using thefuture reservations in AI Hypercomputer consumption option. For more information, see Reserve capacity through your account team. - For G2 machine types, use
GRAPHICS_OPTIMIZED - For G4 machine types, use
GRAPHICS_OPTIMIZED_G4 - For C2 machine types, use
COMPUTE_OPTIMIZED - For C2D machine types, use
COMPUTE_OPTIMIZED_C2D - For C3 machine types, use
COMPUTE_OPTIMIZED_C3 - For C3D machine types, use
COMPUTE_OPTIMIZED_C3DCaution: For C3 and C3D commitment types, the machine family that is specified by the commitment type changes depending on the interface:- In the gcloud CLI and REST, the commitment type values useCompute-optimized as the machine family, even though C3 and C3D are part of the general-purpose machine family.
- In the Google Cloud console, the commitment type values use the correct machine series:General-Purpose.
- For H3 machine types, use
COMPUTE_OPTIMIZED_H3 - For H4D machine types, use
COMPUTE_OPTIMIZED_H4D - For N1 machine types, use
GENERAL_PURPOSE - For C4 machine types, use
GENERAL_PURPOSE_C4 - For C4A machine types, use
GENERAL_PURPOSE_C4A - For C4D machine types, use
GENERAL_PURPOSE_C4D - For E2 machine types, use
GENERAL_PURPOSE_E2 - For N2 machine types, use
GENERAL_PURPOSE_N2 - For N2D machine types, use
GENERAL_PURPOSE_N2D - For N4 machine types, use
GENERAL_PURPOSE_N4 - For N4D machine types, use
GENERAL_PURPOSE_N4D - For N4A machine types, use
GENERAL_PURPOSE_N4A(In Preview; CUDs available at GA) - For Tau T2D machine types, use
GENERAL_PURPOSE_T2D - For M1 or M2 machine types, use
MEMORY_OPTIMIZED - For M3 machine types, use
MEMORY_OPTIMIZED_M3 - For M4 machine types, use
MEMORY_OPTIMIZED_M4 - For M4 machine types with 6 TB of memory, use
MEMORY_OPTIMIZED_M4_6TB - For X4 machine types with 6 TB of memory, use
MEMORY_OPTIMIZED_X4_480_6T - For X4 machine types with 8 TB of memory, use
MEMORY_OPTIMIZED_X4_480_8T - For X4 machine types with 12 TB of memory, use
MEMORY_OPTIMIZED_X4_960_12T - For X4 machine types with 16 TB of memory, use
MEMORY_OPTIMIZED_X4_960_16T - For X4 machine types with 24 TB of memory, use
MEMORY_OPTIMIZED_X4_1440_24T - For X4 machine types with 32 TB of memory, use
MEMORY_OPTIMIZED_X4_1920_32T - For Z3 machine types, use
STORAGE_OPTIMIZED_Z3
- For A2 machine types, use
COMMITMENT_PLAN: the same commitment plan as yoursource commitment, eitherTWELVE_MONTHorTHIRTY_SIX_MONTH.NUMBER_VCPUS: the number of vCPUs you want totransfer out of your source commitment to create your new split commitment.The number must be an integer less than the number of vCPUs in thesource commitment.MEMORY: the amount, in MB, of memory that youwant to transfer out of your source commitment to create your new splitcommitment. The amount must be less than the amount of memory in thesource commitment. For example, 1000 MB. If the units are notspecified, the default unit used is MB.SOURCE_COMMITMENT_URL: the URL of the sourcecommitment from which you want to transfer resources.
For example, consider a source commitment (source-commitment) in theregionus-east1 that has its resources specified as 3 N2 vCPUs and2048 MB memory. The followingPOST request lets you split thecommitment into two separate commitments:
POST https://compute.googleapis.com/compute/v1/projects/myproject/regions/us-central1/commitments{ "name": "split-commitment", "plan": "TWELVE_MONTH", "type": "GENERAL_PURPOSE_N2", "region": "us-east1", "resources": [ { "type": "VCPU", "amount": "1" } { "type": "MEMORY", "amount": "1024" } ], "splitSourceCommitment": "projects/myproject/regions/us-central1/commitments/source-commitment"}During the process of splittingsource-commitment,Compute Engine does the following:
- Takes resources from
source-commitmentand creates a new commitmentsplit-commitmentwith 1 N2 vCPU and 1024 MB memory. - Resizes
source-commitmentto the remaining resources.
What's next
- Learn how torenew resource-based commitments automatically.
- Learn how toextend the term length of resource-based commitments.
- Learn how toupgrade the term of resource-based commitments.
- Learn how toanalyze the effectiveness of your CUDs.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-15 UTC.