Compute: Add support for FLEX_START and RESERVATION_BOUND provisioning model#17417
Compute: Add support for FLEX_START and RESERVATION_BOUND provisioning model#17417MihajloLinic wants to merge 11 commits into
Conversation
|
Googlers: For automatic test runs see go/terraform-auto-test-runs. @slevenick, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look. You can help make sure that review is quick by doing a self-review and by running impacted tests locally. |
| URL of the Zone where this future reservation resides. | ||
| output: true | ||
| The zone where the future reservation is located. | ||
| required: true |
There was a problem hiding this comment.
We can't move a field from output-only to required without a breaking change. Why is this becoming required now?
There was a problem hiding this comment.
In google cloud API future reservations are zone based, for endpoint you need to sent which zone you are consuming reservation from. Variables that construct the url have to be under parameters: . if zone was left where it was users wouldn't be able to provide it in their .tf config
|
@MihajloLinic, this PR is waiting for action from you. If no action is taken, this PR will be closed in 28 days. Please address any comments or change requests, or re-request review from a core reviewer if no action is required. This notification can be disabled with the |

Fixed version of PR: #16750
Error was during testing not accounting for recording mode
This PR adds support for the
FLEX_STARTandRESERVATION_BOUNDprovisioning models togoogle_compute_instance,google_compute_instance_template, andgoogle_compute_region_instance_template.FLEX_STARTis a VM scheduling option in Google Cloud Compute Engine (part of the Dynamic Workload Scheduler) that allows flexible start times for VM instances, enabling cost optimization by letting Google schedule VM creation within a 24-hour time window. It is specifically designed for accelerator-optimized workloads (GPUs/TPUs).RESERVATION_BOUNDis a VM scheduling option that binds an instance to a specific reservation. When set, the instance will only consume capacity from the targeted reservation (configured viareservation_affinity). This is used with Calendar Reservations (Future Reservations) in the Dynamic Workload Scheduler, where GPU/TPU capacity is pre-booked for a specific time window and delivered as a standard reservation that instances can then target.Changes
FLEX_STARTandRESERVATION_BOUNDas valid values forprovisioning_modelin the scheduling block of instances and instance templates. Updated field descriptions and validation logic.FLEX_STARTandRESERVATION_BOUNDare correctly handled during resource conversion.FLEX_START(with its required companion fields likeinstance_termination_actionandmax_run_duration) andRESERVATION_BOUND(with its companionreservation_affinityblock).TestAccComputeInstance_flexStart,TestAccComputeInstanceTemplate_flexStart,TestAccComputeRegionInstanceTemplate_flexStartTestAccComputeInstance_reservationBound,TestAccComputeInstanceTemplate_reservationBound,TestAccComputeRegionInstanceTemplate_reservationBound