• s

    stocky-butcher-62635

    5 months ago
    Looks like if an
    up
    fails then it doesn't roll back and you need to go into the Azure website to work out what happened and clean up?
    s
    g
    3 replies
    Copy to Clipboard
  • l

    limited-fish-67957

    5 months ago
    hey, one issue I am facing using
    pulumi
    is the my node_modules are not getting uploaded to aws
    lambda
    . I was wondering if anyone has solved this or point me to some kind of solution of uploading the
    node-modules
    as my
    serverless
    function keeps giving me
    module not found error
    l
    g
    7 replies
    Copy to Clipboard
  • b

    broad-fall-19241

    5 months ago
    Hey everyone! Running into a funny issue when using the Pulumi Automation API, described below. Background I’m using the Automation API to manage resources on Azure. I created a couple of RunCommands and Custom Script Virtual Machine Extension resources, but the
    up
    got interrupted (can’t recall if it was a network error or if I cancelled w/
    Ctrl + C
    ). This, of course, left some
    pending_operations
    in the state that prevent the use of
    up
    ,
    down
    , etc. Solution Attempt I tried to solve this the usual way, viz., by exporting the state; clearing the pending_operations; and re-importing it. I’m not certain if I’m doing this right, as I wasn’t able to find much documentation on this, but this is how that’s happening:
    # EXPORT STATE
    # ############
    print('Exporting deployment...')
    stack_data = stack.workspace.export_stack(stack_name)
    with open('stack.json', 'w+') as output:
      output.write(str(stack_data))
    print('Deployment exported.')
    I then modify the
    stack.json
    to remove
    pending_operations
    , and attempt to re-import:
    # IMPORT STATE
    # ############
    print('Importing deployment...')
    with open('stack.json', 'r') as stack_data:
      deployment = auto._workspace.Deployment(deployment=stack_data.read())
      stack.workspace.import_stack(stack_name, deployment)
    print('Deployment imported.')
    Expected Behavior I’d expect to see output analogous to that produced by the CLI in this circumstance, namely:
    # From: <https://www.pulumi.com/docs/troubleshooting/>
    $ pulumi stack export | pulumi stack import
    warning: removing pending operation 'creating' on '...' from snapshot
    Import successful.
    Issue Instead, I get the following, fairly confusing error:
    File "/Users/{SCRUBBED}/env/lib/python3.10/site-packages/pulumi/automation/_cmd.py", line 78, in _run_pulumi_cmd
        raise create_command_error(result)
    pulumi.automation.errors.CommandError:
     code: 255
     stdout:
     stderr: error: the stack 'dev-3' is too old to be used by this version of the Pulumi CLI
    I upgraded the CLI, the
    pulumi
    package, and attempted re-importing an unmodified state file (i.e., export and immediately import, without making changes to
    pending_operations
    ), to no avail. I’m not sure where to look for information on the error code or where this comes from, and I found no hints after examining the source. Any input would be much appreciated — I’d rather not tear down the stack out-of-band just to recreate it (and maybe hit the same issue anyway). Thanks in advance!
    b
    g
    3 replies
    Copy to Clipboard
  • b

    bored-monitor-99026

    5 months ago
    hi everyone, i've created a protected resource, and then i unprotected it directly by modifying the state:
    pulumi state unprotect ...
    now, in the code, i still have the code block which creates the protected resource, but when i run
    pulumi preview
    , it shows resources unchanged. what i imagine how it should work is: since i modify the state manually (setting it as unprotected), while my code has it as protected, when i do
    pulumi preview
    i expect it should show resource going from
    unprotected
    to
    protected
    . i know
    protect
    is a pulumi thing, but does my expectation make sense? is this expected?
    b
    e
    2 replies
    Copy to Clipboard
  • b

    bitter-army-70832

    5 months ago
    Hey all, I'm a newbie, I keep receiving this error after I try to use Pulumi with Docker. I've attached the error and my Dockerfile. Any help wold be extremely appreciated.
    b
    l
    2 replies
    Copy to Clipboard
  • b

    bored-monitor-99026

    5 months ago
    hi everyone, how do you properly type this go struct in python?
    type Team struct {
      Name         string `yaml:"name"`
      Description  string `yaml:"description"`
      Slug         string   `yaml:"slug"`
      ParentTeamId int
      Teams        []Team   `yaml:"teams"`
    }
    here is what i have:
    @dataclass
    class Team:
        name: str
        slug: str
        description: str
        ...
        subteams: Optional[list[Team]] 
        parent_team_id: Optional[int] = None
    the team data is read from a yaml file here are several issues:1. in order to use
    .
    refence , you have to do
    Team(**team)
    to create the object, where
    team
    is a python dict read from YAML. however, this will be flagged by type checker:
    Arguments missing for parameters "name", "slug", "description
    2. there is a nested field
    subteams
    , when reading from yaml, it's not automatically deserialized, so you have to create the object again
    Team(**sub_team)
    to use
    .
    reference 3. since not every team entry has
    subteam
    field, you have to assign empty list as default value. but when you iterate over the entries in yaml, you will have type error
    Object of type "None" cannot be used as iterable value
    when you do
    parent_team.subteams
    b
    p
    +1
    15 replies
    Copy to Clipboard
  • s

    stocky-butcher-62635

    5 months ago
    System.Diagnostics.Debug.WriteLine
    doesn't work. How do you debug the programme?
    s
    1 replies
    Copy to Clipboard
  • s

    stocky-butcher-62635

    5 months ago
    config.Require(...)
    returns
    Output<string>
    and there is no way to get the actual value?
    s
    1 replies
    Copy to Clipboard
  • s

    stocky-butcher-62635

    5 months ago
    How about I make a GitHub repo and organise it into a sequence of steps?
    s
    b
    7 replies
    Copy to Clipboard
  • e

    echoing-smartphone-60420

    5 months ago
    Has anyone ran into
    helm hook
    issues? 🧵
    e
    b
    9 replies
    Copy to Clipboard