https://pulumi.com logo
Docs
Join the conversationJoin Slack
Channels
announcements
automation-api
aws
azure
blog-posts
built-with-pulumi
cloudengineering
cloudengineering-support
content-share
contribex
contribute
docs
dotnet
finops
general
getting-started
gitlab
golang
google-cloud
hackathon-03-19-2020
hacktoberfest
install
java
jobs
kubernetes
learn-pulumi-events
linen
localstack
multi-language-hackathon
office-hours
oracle-cloud-infrastructure
plugin-framework
pulumi-cdk
pulumi-crosscode
pulumi-deployments
pulumi-kubernetes-operator
pulumi-service
pulumiverse
python
registry
status
testingtesting123
testingtesting321
typescript
welcome
workshops
yaml
Powered by Linen
automation-api
  • l

    limited-rain-96205

    05/12/2021, 7:55 PM
    Is it expected that
    LocalWorkspace.selectStack()
    would delete the
    encryptedkey:
    section of the stack's yaml file?
    r
    • 2
    • 7
  • w

    worried-city-86458

    05/13/2021, 9:22 AM
    The automation api equivalent of the
    pulumi up
    cli seems to be roughly: • var stack = LocalWorkspace.CreateOrSelectStackAsync • stack.Workspace.InstallPluginAsync • stack.SetAllConfigAsync • stack.RefreshAsync // needed? • stack.UpAsync Would the equivalent of the
    pulumi preview
    cli be the following? (Not really in any examples?) • var stack = LocalWorkspace.CreateOrSelectStackAsync • stack.Workspace.InstallPluginAsync • stack.SetAllConfigAsync • stack.RefreshAsync // needed? • stack.PreviewAsync Are any of these steps not really needed like the refresh?
    b
    b
    p
    • 4
    • 17
  • r

    refined-journalist-70469

    05/17/2021, 2:46 AM
    What is the correct way to use our custom automation cli via the pulumi github action? Do I need to create our own github action and not use the pulumi action?
    l
    • 2
    • 2
  • w

    worried-city-86458

    05/17/2021, 5:37 AM
    What should be the order of calls for the automation api equivalent of repairing stack state? I think that config should still be set before doing the export / import, or does it not matter? (I did a repair at one point before doing this and config was wiped from the ui) So looks like the following makes sense and is consistent with the above: • var stack = LocalWorkspace.CreateOrSelectStackAsync • stack.Workspace.InstallPluginAsync • stack.SetAllConfigAsync • stack.ExportStackAsync • // repair stack • stack.ImportStackAsync
    l
    • 2
    • 9
  • a

    alert-dream-58492

    05/20/2021, 7:41 PM
    I am looking for sample code to create an AKS cluster and deploy a helm chart using automation api. Can someone point to it if such an example exists?
    b
    • 2
    • 3
  • b

    bored-table-20691

    05/21/2021, 11:26 PM
    Is there a way in the Automation API to run a particular update asynchronously (specifically in Go)? An example would be in the Pulumi over HTTP example, you may want to create/update the stack in the background and then they can check for updates. So really two questions: 1. Is it possible to kick off the automation in the background (or should I just queue up a Goroutine to do this)? 2. For a particular stack, is it possible to get the status of the current update (or even of an update with a particular ID)?
    b
    l
    • 3
    • 3
  • d

    dazzling-salesclerk-51689

    05/24/2021, 7:53 PM
    We're using the
    automation_api
    on
    node.js
    to create resources on AWS and K8s. We have two classes that performs the text-book Pulumi flow. Each one independently is working fine. The weird issue pops when we're running them one after the other. Doesn't matter which one is the first, the second one is always failing with a
    grpc
    related error:
    Exception has occurred: Error: 14 UNAVAILABLE: No connection established
      at Object.callErrorFromStatus (.../node_modules/@grpc/grpc-js/src/call.ts:81:24)
    Some more metadata: • There are two different stacks for each one. • There is no paralleling, one is done and only then the other starts • We're using an inline function • Pulumi version: 3.3.0 Any ideas what could go wrong? Thanks!
    b
    p
    • 3
    • 4
  • b

    bumpy-agent-19616

    05/25/2021, 5:41 PM
    const stack = await LocalWorkspace.createStack({
    stackName,
    projectName,
    program: createPulumiProgram(stackName),
    },{
    projectSettings: {
    name: projectName,
    runtime: 'nodejs',
    description: projectName,
    backend: {
    url: 'azblob://***********'
    },
    },
    stackSettings: {
    [stackName]: {
    secretsProvider: 'azurekeyvault://********.<http://vault.azure.net/keys/********|vault.azure.net/keys/********>',
    config: {
    "azure:location": Constants.AZURE_CONFIG.location,
    "azure:environment": Constants.AZURE_CONFIG.environment,
    "azure:clientId": Constants.AZURE_CONFIG.clientId,
    "azure:clientSecret": { secret: Constants.AZURE_CONFIG.clientSecret },
    "azure:subscriptionId": Constants.AZURE_CONFIG.subscriptionId,
    "azure:tenantId": Constants.AZURE_CONFIG.tenantId,
    }
    },
    },
    envVars: {
    "AZURE_STORAGE_KEY": "******",
    "AZURE_STORAGE_ACCOUNT": "**********",
    "AZURE_KEYVAULT_AUTH_VIA_CLI": "false",
    },
    });
    Error is as follows, CommandError: code: 255 stdout: Created stack 'statictest' stderr: error: passphrase must be set with PULUMI_CONFIG_PASSPHRASE or PULUMI_CONFIG_PASSPHRASE_FILE environment variables err?: at Object.createCommandError (/Users/veerasamy001/Projects/3Labs/cloud-self-service-portal/node_modules/@pulumi/pulumi/automation/errors.js:71:17) at ChildProcess.<anonymous> (/Users/veerasamy001/Projects/3Labs/cloud-self-service-portal/node_modules/@pulumi/pulumi/automation/cmd.js:63:40) at ChildProcess.emit (node:events:378:20) at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12) { commandResult: CommandResult { stdout: "Created stack 'statictest'\n", stderr: '*error: passphrase must be set with PULUMI_CONFIG_PASSPHRASE or PULUMI_CONFIG_PASSPHRASE_FILE environment variables*\n', code: 255, err: undefined } } I am actually facing the above issue even though I have emvironment variables for Azure Blob storage. Any help would be much appreciated.
    r
    • 2
    • 7
  • b

    broad-hairdresser-1495

    05/28/2021, 5:39 PM
    Hi, I have a basic question. How do run python program using
    auto.create_or_select_stack
    so that stack will use my local path
    work_dir="localPath/"
    with
    from pulumi import automation as auto
    stack = auto.create_or_select_stack(stack_name=stack_name, project_name=project_name, program=pulumi_program, work_dir="localPath/")
    it seems to jump in here: from
    pulumi/automation/_local_workspace.py
    if _is_inline_program(**args):  # <<< here
            return _inline_source_stack_helper(stack_name, program, project_name, Stack.create_or_select, opts)  # type: ignore
        if _is_local_program(**args):
            return _local_source_stack_helper(stack_name, work_dir, Stack.create_or_select, opts)  # type: ignore
    due to I get this error:
    error: unable to open bucket file:///C:/Users/romlaz/AppData/Local/Temp/automation-ib7k43_6/myLOGS2: CreateFile C:\Users\romlaz\AppData\Local\Temp\automation-ib7k43_6\myLOGS2: The system cannot find the file specified.
    It tries to create a temp location but I need to have this stated in
    work_dir="localPath/"
    b
    l
    • 3
    • 6
  • e

    elegant-stone-54832

    06/02/2021, 6:17 PM
    Is there any reason why AZURE_KEYVAULT_AUTH_VIA_CLI does not exist for blob storage? I would also like to use Azure CLI when authenticating against Blob Storage.
    r
    • 2
    • 11
  • w

    worried-city-86458

    06/04/2021, 6:13 AM
    Something went seriously wrong with my aws eks stack, to the point that I couldn't work out how to repair it, so I eventually destroyed then removed it completely. Only problem now is when I try to create the stack again from scratch I still get the same error! 😕 😖
    l
    b
    • 3
    • 30
  • i

    icy-jordan-58549

    06/04/2021, 9:24 AM
    Any ideas how I can understand what triggers this issue?
    (node:5747) UnhandledPromiseRejectionWarning: Error: Program run without the Pulumi engine available; re-run using the `pulumi` CLI
        at requireTestModeEnabled (/node_modules/@pulumi/pulumi/runtime/settings.js:123:15)
        at Object.getMonitor (/node_modules/@pulumi/pulumi/runtime/settings.js:214:13)
        at /node_modules/@pulumi/pulumi/runtime/invoke.js:123:40
        at Generator.next (<anonymous>)
        at fulfilled (/node_modules/@pulumi/pulumi/runtime/invoke.js:18:58)
        at processTicksAndRejections (internal/process/task_queues.js:93:5)
    l
    • 2
    • 2
  • l

    lemon-agent-27707

    06/05/2021, 8:28 PM
    My hackathon demo this week: a single binary automation api that doesn't require a CLI (demo gif in the issue): https://github.com/pulumi/pulumi/issues/7219
    😛artypus-8bit: 2
    b
    • 2
    • 1
  • i

    icy-jordan-58549

    06/08/2021, 11:25 AM
    Any ideas, why I can’t use this inside automation-api process?
    const config = await authorization.getClientConfig();
    const token = await authorization.getClientToken();
    Getting:
    creating error: Program run without the Pulumi engine available; re-run using the `pulumi` CLI
    b
    l
    • 3
    • 20
  • w

    worried-city-86458

    06/16/2021, 7:15 PM
    @bored-oyster-3147 following up from https://github.com/pulumi/pulumi/pull/7299, I did a quick test forcing an error which didn't work as expected and the next run has hung.
    b
    • 2
    • 54
  • p

    proud-pizza-80589

    06/18/2021, 8:08 PM
    If a pulumi inline automation api program returns “something”, Would this show up in the UpResults outputs or do we need to do something to register it as an output??
    b
    • 2
    • 3
  • b

    bumpy-agent-19616

    06/21/2021, 10:01 AM
    Does anyone have any idea on how to set config with objects involved using automation API? for example,
    <project>:atlas:
    cidr: 172.xx.xx.xx/24
    cluster:
    autoScalingDiskGbEnabled: true
    mongoDbMajorVersion: 4.2
    networkpeering:
    resourceGroupName: rg-name
    vnetName: vnet-name
    numShards: 1
    b
    b
    • 3
    • 9
  • f

    full-artist-27215

    06/21/2021, 4:38 PM
    Is there a way to access the URL of a given Pulumi run (e.g., on app.pulumi.com) from the Automation API?
    l
    r
    • 3
    • 6
  • h

    hallowed-ice-8403

    06/23/2021, 7:54 AM
    Hi.. I am exploring Pulumi for work and have a few doubts, is there a possible way to eliminate the intermediate function and pass arguments directly for bringing up the stack ?
    def pulumi_program():
        create_pulumi_program(content)
    stack = auto.select_stack(stack_name=stack_name, project_name=project_name,program=pulumi_program)
    b
    r
    • 3
    • 7
  • l

    lemon-agent-27707

    06/30/2021, 8:25 PM
    Heads up to nodejs users, a new release just went out. With it, automation api will now fail early if we detect that you have multiple versions of pulumi/pulumi loaded in your node modules tree for inline programs. Multiple versions of pulumi/pulumi have caused many bugs for users, and can easily put you in an invalid state. If you encounter a failure message indicating this, you'll need to use
    resolutions
    in your package.json to resolve your dependencies to a single version of the pulumi sdk. More info in the PR here: https://github.com/pulumi/pulumi/pull/7349
    🎉 1
    🙌 2
    🚀 1
  • w

    wet-soccer-72485

    07/03/2021, 10:33 PM
    Is there a way to list Pulumi projects using the automation API or some other API?
    b
    e
    • 3
    • 4
  • b

    better-shampoo-48884

    07/04/2021, 9:19 AM
    Would it be possible for an automation pulumi program to reference itself to get its previous outputs? I'd like to add some stuff that needs to be done on first run (and/or if there's a version difference) but NOT on subsequent runs.. figuring setting the success/failure of that in outputs would be a good way to go about doing it.
    r
    c
    • 3
    • 4
  • h

    handsome-state-59775

    07/06/2021, 7:54 AM
    i'm seeing the following error while trying to set up a venv for automation via azure pipelines (ubuntu-latest):
    Building wheels for collected packages: pulumi-azure-native, pulumi-kubernetes, pulumi-tls
      Building wheel for pulumi-azure-native (setup.py): started
      Building wheel for pulumi-azure-native (setup.py): finished with status 'error'
      ERROR: Command errored out with exit status 1:
       command: /home/vsts/work/1/s/experimental/sid/iac-azure/infra/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5kvg33b8/pulumi-azure-native/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5kvg33b8/pulumi-azure-native/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-ete6c603
           cwd: /tmp/pip-install-5kvg33b8/pulumi-azure-native/
      Complete output (6 lines):
      usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
         or: setup.py --help [cmd1 cmd2 ...]
         or: setup.py --help-commands
         or: setup.py cmd --help
      
      error: invalid command 'bdist_wheel'
    these errors only show up for pulumi-* packages - any insights please?
    b
    • 2
    • 7
  • w

    wonderful-piano-20316

    07/10/2021, 10:14 PM
    Hi, 👋 I'm fairly new to Pulumi and I would like to receive guidance about the Automation API used inside a Typescript-based REST API. I would like to give my users the ability to create an empty Buckey in Google Cloud simply by sending a POST request. The desired bucket would be stored inside a stack named after the user's name. The issue I'm facing comes only once the user asks for another bucket in the same stack create beforehand. In this scenario, the first bucket would simply be deleted and the second one would replace the first one. This behavior is probably caused by Pulumi not being able to locate the code related to the first bucket during the second bucket creation request. I've based my work on the Automation REST API example, but they don't exactly fit my scenario, unfortunately. Is there anything I can do to avoid the destruction of the previously requested resource while deploying with the UP method? Thank you for your concern. 🙂
    b
    • 2
    • 15
  • h

    hallowed-ice-8403

    07/12/2021, 2:29 PM
    Hello everyone, I am bit stuck with stack reference.. I am trying to refer outputs of a stack using stack reference and am storing my state files in local. Pls note that I am using python automation api to bring up my stack.
    from pulumi import StackReference
    
    stack_ref = StackReference(name="stack-reference",stack_name = "project.mystack")
    s3_name = stack_ref.get_output("s3_bucket")
    print(s3_name)
    b
    e
    • 3
    • 9
  • b

    bumpy-agent-19616

    07/13/2021, 8:20 AM
    Hi everyone! I tried automation API for node.js which I think is really good and found truly beneficial. However, I am facing memory leakage issue when I intend to it from K8s platform but not sure if this is a problem with node.js itself or something that lies somewhere in the automation API (hopefully not). Could someone help me with some suggestions or solutions you have already come up with? Any help would be much appreciated.
    b
    • 2
    • 2
  • b

    bright-dawn-60437

    07/13/2021, 5:57 PM
    In automation api, how can one “add” to a stack instead of always creating new stack?
  • b

    bright-dawn-60437

    07/13/2021, 5:57 PM
    More concretely - I am creating a ASG based on a name that a user provides. For the same stack, for new names, I want to create additional ASGs
    r
    • 2
    • 10
  • l

    limited-rainbow-51650

    07/15/2021, 1:32 PM
    Is there any news whether or not we may expect a Java version of the Automation API? So I'm not asking for full language support to write infra code in Java (https://github.com/pulumi/pulumi/issues/1539), only the Automation API.
    b
    b
    +2
    • 5
    • 13
  • l

    limited-rain-96205

    07/22/2021, 3:42 AM
    When an error occurs in the program that the Automation API runs, what's the best way to ensure that it results in the overall program erroring out? As in, it should not have an exit code of 0. This doesn't seem to be happening.
    r
    • 2
    • 1
Powered by Linen
Title
l

limited-rain-96205

07/22/2021, 3:42 AM
When an error occurs in the program that the Automation API runs, what's the best way to ensure that it results in the overall program erroring out? As in, it should not have an exit code of 0. This doesn't seem to be happening.
r

red-match-15116

07/22/2021, 4:00 AM
What language are you using? Do you have a code sample that isn’t doing what you expect?
View count: 1