Skip to content

Conversation

@jvstme
Copy link
Collaborator

@jvstme jvstme commented Oct 13, 2025

Allow users to specify a specifically-targeted GCP
reservation in fleet configurations:

type: fleet
nodes: 1
backends: [gcp]
reservation: my-reservation

For reservations shared between projects, the full
syntax can be used to reference the project that
owns the reservation:

type: fleet
nodes: 1
backends: [gcp]
reservation: projects/my-proj/reservations/my-reservation

dstack will locate the specified reservation,
suggest offers that match the reservation's
properties, and provision instances in the
reservation. If there are multiple reservations
with the specified name, all of them will be
considered for provisioning.

Using reservations requires the
compute.reservations.list permission in the
project that owns the reservations.

The implementation was only tested with on-demand
reservations. Whether other reservation types work
can be confirmed later, which includes Future
Reservations in Calendar Mode and Future
Reservations in AI Hypercomputer.

Closes #3162

Allow users to specify a specifically-targeted GCP
reservation in fleet configurations:

```yaml
type: fleet
nodes: 1
backends: [gcp]
reservation: my-reservation
```

For reservations shared between projects, the full
syntax can be used to reference the project that
owns the reservation:

```yaml
type: fleet
nodes: 1
backends: [gcp]
reservation: projects/my-proj/reservations/my-reservation
```

`dstack` will locate the specified reservation,
suggest offers that match the reservation's
properties, and provision instances in the
reservation. If there are multiple reservations
with the specified name, all of them will be
considered for provisioning.

Using reservations requires the
`compute.reservations.list` permission in the
project that owns the reservations.

The implementation was only tested with on-demand
reservations. Whether other reservation types work
can be confirmed later, which includes Future
Reservations in Calendar Mode and Future
Reservations in AI Hypercomputer.
@jvstme jvstme requested a review from r4victor October 13, 2025 23:22
Copy link
Collaborator

@r4victor r4victor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@jvstme jvstme merged commit de03bf5 into master Oct 14, 2025
28 checks passed
@jvstme jvstme deleted the issue_3162_gcp_reservations branch October 14, 2025 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: GCP reservations

3 participants