Skip to content

Commit

Permalink
no multiple zones
Browse files Browse the repository at this point in the history
  • Loading branch information
bra-fsn committed Jun 18, 2024
1 parent 5adb513 commit 9b5e869
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/sc_runner/resources/gcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from .base import StackName, default, defaults
from typing import Annotated
import click
import copy
import os
import pulumi
import pulumi_gcp as gcp
Expand All @@ -22,6 +23,10 @@ def resources_gcp(
bootdisk_opts: Annotated[str, DefaultOpt(["--bootdisk-opts"], type=JSON, default=defaults(DEFAULTS, "bootdisk_opts"), help="Pulumi gcp.compute.InstanceBootDiskArgs options")] = default(DEFAULTS, "bootdisk_opts"),
bootdisk_init_opts: Annotated[str, DefaultOpt(["--bootdisk-init-opts"], type=JSON, default=defaults(DEFAULTS, "bootdisk_init_opts"), help="Pulumi gcp.compute.InstanceBootDiskInitializeParamsArgs options")] = default(DEFAULTS, "bootdisk_init_opts"),
):
if "zone" in instance_opts:
instance_opts = copy.deepcopy(instance_opts)
# if zone is given in instance_opts, override the `zone` option and remove it, as we can't specify it twice
zone = instance_opts.pop("zone")
provider = gcp.Provider(
resource_name=zone,
zone=zone,
Expand Down

0 comments on commit 9b5e869

Please sign in to comment.