File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -209,6 +209,7 @@ class GcpConfig:
209209 network : str = "default"
210210 subnet : str = ""
211211 private_ip : str = "" # static internal IP to bind (--private-network-ip)
212+ no_public_ip : bool = False # network-isolated: no external IP (--no-address); reach via IAP
212213
213214 # Identity settings
214215 service_account : str = ""
@@ -250,6 +251,7 @@ class GcpConfig:
250251 "network" : "default" ,
251252 "subnet" : "" ,
252253 "private_ip" : "" ,
254+ "no_public_ip" : False ,
253255 "service_account" : "" ,
254256 "scopes" : [],
255257 "tags" : [],
@@ -1458,6 +1460,12 @@ class CloudDeploymentManager:
14581460 if not config .subnet :
14591461 create_args .append ("--subnet=default" )
14601462 create_args .append (f"--private-network-ip={ config .private_ip } " )
1463+ if config .no_public_ip :
1464+ # Network-isolated CVM: no ephemeral external IP. With no Cloud NAT on
1465+ # the subnet, this also means no internet egress. Reaching the VM still
1466+ # works over IAP TCP forwarding (ingress via Google's edge to the
1467+ # internal IP), so SSH / the on-prem courier are unaffected.
1468+ create_args .append ("--no-address" )
14611469 if config .service_account :
14621470 create_args .append (f"--service-account={ config .service_account } " )
14631471 if config .scopes :
You can’t perform that action at this time.
0 commit comments