Skip to content

Deployment/gcp: use hyperdisk-balanced boot disk for C4 and N4 VMs - #968

Merged
phbnf merged 2 commits into
transparency-dev:mainfrom
phbnf:pd
Oct 20, 2026
Merged

phbnf merged 2 commits into
transparency-dev:mainfrom
phbnf:pd

Conversation

@phbnf

@phbnf phbnf commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@phbnf
phbnf requested a review from AlCutter October 20, 2026 13:43
auto_delete = true
boot = true
// C4 and N4 machine series require Hyperdisk for boot disks and do not support pd-standard.
disk_type = startswith(var.machine_type, "c4-") || startswith(var.machine_type, "n4-") ? "hyperdisk-balanced" : "pd-standard"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think you could do a regex of ^.4.* to be more general - Gemini sez all {C,N}4{A,D,X} machines require hyperdisk boot disks.

Alternatively, flip it and look for {N,E}1.* for PD and default to hyperdisk?

@phbnf
phbnf marked this pull request as ready for review October 20, 2026 13:51
@phbnf
phbnf requested a review from a team as a code owner October 20, 2026 13:51
@phbnf
phbnf requested review from roger2hk and removed request for a team October 20, 2026 13:51
boot = true
// Gen 4+ machine series require hyperdisk-balanced; Gen 3 (plus t2a/g2) require pd-balanced;
// Gen 1/2 default to pd-standard.
disk_type = can(regex("^[a-z]+[4-9][a-z]*-", var.machine_type)) ? "hyperdisk-balanced" : (

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Probably want the i modifier to make these case-insensitive

@phbnf
phbnf merged commit 22fca3c into transparency-dev:main Oct 20, 2026
15 checks passed
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.

2 participants