Skip to content

feat(create): add --disk-size flag - #439

Draft
theFong wants to merge 1 commit into
mainfrom
codex/fix-create-disk-size
Draft

feat(create): add --disk-size flag#439
theFong wants to merge 1 commit into
mainfrom
codex/fix-create-disk-size

Conversation

@theFong

@theFong theFong commented Aug 7, 2026

Copy link
Copy Markdown
Member

Summary

  • add a --disk-size <GB> flag to brev create
  • apply the requested size to every resolved fallback instance type
  • allow an explicit disk size to override launchable storage defaults
  • reject zero, negative, NaN, and infinite disk sizes

Why

The create API already accepts diskStorage, and search/piped workflows already populate InstanceSpec.DiskGB. However, explicitly selected instance types were created with DiskGB: 0, so agents and users had no direct way to request variable storage while using --type.

Impact

Agents can now deploy a GPU with provider-supported variable storage directly:

brev create my-gpu --type g5.xlarge --disk-size 1000

The value is sent to the create API as a Gi quantity. Provider-side storage constraints continue to determine which sizes are supported.

Validation

  • go test ./pkg/cmd/gpucreate
  • go test -race ./pkg/cmd/gpucreate
  • go vet ./pkg/cmd/gpucreate
  • golangci-lint run ./pkg/cmd/gpucreate

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.

1 participant