Skip to content

dstack-cloud: add no_public_ip (--no-address) for network-isolated VMs#721

Merged
kvinwang merged 1 commit into
Dstack-TEE:masterfrom
kvinwang:feat/dstack-cloud-no-public-ip
Jun 10, 2026
Merged

dstack-cloud: add no_public_ip (--no-address) for network-isolated VMs#721
kvinwang merged 1 commit into
Dstack-TEE:masterfrom
kvinwang:feat/dstack-cloud-no-public-ip

Conversation

@kvinwang

Copy link
Copy Markdown
Collaborator

What

GcpConfig gains a no_public_ip flag. When set, gcloud compute instances create is given --no-address, so the VM is created with no ephemeral external IP.

Why

The on-prem (KMS-less sca) operator tooling deploys confidential workloads that should be network-isolated — no public IP, reachable only over IAP TCP forwarding. The operator already writes no_public_ip: true into the deploy sys-config, but upstream dstack-cloud had no such field, so it was silently ignored and the VM got a public IP — i.e. an 'isolated' deploy was actually internet-exposed.

With --no-address (and no Cloud NAT on the subnet) the VM also has no egress; SSH and the launcher's courier still work because both go over IAP (ingress via Google's edge to the internal IP) regardless.

Change

3 small additions to scripts/bin/dstack-cloud (+8 lines): the dataclass field, its config-template default, and the --no-address arg when the flag is set. No behavior change when unset (default False).

GcpConfig gains a no_public_ip flag; when set, 'gcloud compute instances create'
is given --no-address so the VM has no ephemeral external IP. With no Cloud NAT on
the subnet this also drops internet egress; the VM is still reachable over IAP TCP
forwarding (SSH, and the on-prem launcher's courier, go over IAP either way).

The on-prem operator tooling already requests this (no_public_ip in the deploy
sys-config), but upstream dstack-cloud silently ignored it and created a public IP.
Copilot AI review requested due to automatic review settings June 10, 2026 09:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kvinwang kvinwang enabled auto-merge June 10, 2026 09:04
@kvinwang kvinwang merged commit 7bf2b00 into Dstack-TEE:master Jun 10, 2026
8 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