Skip to content

Commit

Permalink
Remove Cloud NAT check when provisioning (#1925)
Browse files Browse the repository at this point in the history
  • Loading branch information
r4victor authored Oct 31, 2024
1 parent 2f99332 commit b8b0e04
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/dstack/_internal/core/backends/gcp/compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,18 +235,6 @@ def create_instance(
)
raise NoCapacityError()

if not allocate_public_ip and not gcp_resources.has_vpc_nat_access(
routers_client=self.routers_client,
project_id=self.config.vpc_project_id or self.config.project_id,
vpc_name=self.config.vpc_resource_name,
region=instance_offer.region,
):
raise ComputeError(
"VPC does not have access to the external internet through Cloud NAT. "
f"Region: {instance_offer.region}, VPC name: {self.config.vpc_resource_name}, "
f"Project ID: {self.config.vpc_project_id or self.config.project_id}."
)

for zone in zones:
request = compute_v1.InsertInstanceRequest()
request.zone = zone
Expand Down

0 comments on commit b8b0e04

Please sign in to comment.