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
  • m

    most-lighter-95902

    11/26/2021, 5:35 AM
    Looks like I have to define
    workDir
    option in
    LocalWorkspace.create({})
  • l

    little-soccer-5693

    12/01/2021, 12:04 AM
    which automation api primitive is the equivalent of 'pulumi stack rm dev' ? https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/auto#Stack.Destroy still leaves the configuration, history, and associated project maintained under https://app.pulumi.com/<user>/projects
    f
    • 2
    • 2
  • b

    best-summer-38252

    12/04/2021, 4:10 AM
    Anyone skip the backend and secrets provider abstractions and interact with internals directly? For example, for the backend we can only configure a URL and the SDK will for the resource over the network, but I'd like use my own state store rather in code.
    r
    p
    f
    • 4
    • 14
  • p

    proud-pizza-80589

    12/08/2021, 2:16 PM
    Is there a way to clear pending installs using the automation api (typescript)
    r
    w
    • 3
    • 9
  • w

    wet-soccer-72485

    12/10/2021, 8:48 PM
    I ‘refresh’ my stacks before each ‘up’ operation. Am I helping Pulumi run with a more-up-to-date state? Or am I simply being redundant and wasting time?
    b
    • 2
    • 2
  • p

    proud-pizza-80589

    12/12/2021, 7:03 PM
    Let’s say i have deployed a stack with the automation api, and there are disk size set on a pvc on k8s, is there a way to get the current stored state as json or something? I need to figure out what it is currently, so that when i scale down, i can keep the disk at the original level since scaling down disk is not allowed.
    e
    • 2
    • 4
  • w

    wet-soccer-72485

    12/16/2021, 1:47 AM
    Looking for how to set the organization name using LocalWorkspace.create… Any help?
    r
    • 2
    • 2
  • m

    most-lighter-95902

    12/20/2021, 6:20 PM
    I’m trying to use Pulumi Automation API in a REST API endpoint to setup infrastructure (i.e. EKS cluster) for clients but unsure how to deal with their AWS credentials (access key/secret). For example, if I want to do POST /api/eks to create a EKS cluster using the client’s AWS credentials, what is the recommended way to do this?
    b
    r
    • 3
    • 18
  • b

    breezy-table-35227

    12/22/2021, 6:35 PM
    Hello, is there a way to make an asyncio task for things like
    Stack.up()
    ? We’re trying to use an asyncio HTTP framework (aiohttp) and would really like to run those as a task without blocking the http response
    e
    r
    • 3
    • 12
  • m

    most-lighter-95902

    01/02/2022, 6:27 PM
    Hi, I’m trying to test out the Automation API in my express server but as soon as I get the server running I’m getting this error:
  • m

    most-lighter-95902

    01/02/2022, 6:27 PM
    CommandError: code: -2
     stdout: 
     stderr: 
     err?: Error: spawn pulumi ENOENT
    
        at Object.createCommandError (/app/node_modules/@pulumi/automation/errors.ts:73:21)
        at ChildProcess.<anonymous> (/app/node_modules/@pulumi/automation/cmd.ts:86:27)
        at ChildProcess.emit (node:events:390:28)
        at ChildProcess.emit (node:domain:475:12)
        at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12)
        at onErrorNT (node:internal/child_process:477:16)
        at processTicksAndRejections (node:internal/process/task_queues:83:21)
    b
    • 2
    • 1
  • m

    most-lighter-95902

    01/02/2022, 6:27 PM
    Not sure how to debug this - anyone seen this before?
  • m

    most-lighter-95902

    01/02/2022, 6:31 PM
    Looks like this code might be causing it?
  • m

    most-lighter-95902

    01/02/2022, 6:31 PM
    import * as express from 'express'
    import { LocalWorkspace } from '@pulumi/pulumi/automation'
    
    import clusterApi from './cluster'
    
    const router = express.Router()
    
    const ensurePlugins = async () => {
      const ws = await LocalWorkspace.create({})
      await ws.installPlugin('aws', 'v4.15.0')
      await ws.installPlugin('awsx', 'v0.31.0')
      await ws.installPlugin('eks', 'v0.32.0')
      await ws.installPlugin('kubernetes', 'v3.12.1')
      await ws.installPlugin('kubernetes-cert-manager', 'v0.0.1')
    }
    
    // install necessary plugins once upon boot
    ensurePlugins()
    
    // API routes
    router.use('/cluster', clusterApi)
    
    export default router
    t
    • 2
    • 25
  • m

    most-lighter-95902

    01/02/2022, 6:32 PM
    Is this the wrong way to add the plugins?
  • m

    most-lighter-95902

    01/12/2022, 6:05 PM
    While I’m installing the plugin (i.e.
    ws.installPlugin('awsx', 'x.x.x')
    ) for the Automation API in my REST API server, I’m running into this issue:
    w
    • 2
    • 12
  • m

    most-lighter-95902

    01/12/2022, 6:05 PM
    error: [resource plugin awsx-0.31.0] downloading from : 403 HTTP error fetching plugin from <https://get.pulumi.com/releases/plugins/pulumi-resource-awsx-v0.31.0-linux-amd64.tar.gz>
  • m

    most-lighter-95902

    01/12/2022, 6:05 PM
    When I click on the link, I see an Access Denied error
  • m

    most-lighter-95902

    01/12/2022, 6:06 PM
    This is running inside a Docker container (Node Alpine image)
  • m

    most-lighter-95902

    01/12/2022, 6:06 PM
    Is there anything I need to have in my build script (which already successfully installs pulumi CLI, by the way) to avoid this error? I can’t seem to find anything in the docs for this
  • m

    most-lighter-95902

    01/13/2022, 12:58 AM
    I’m having a lot of issues getting the Automation API to work. I tried my best to follow the docs but it’s not really helping. The latest error I encountered is this:
  • m

    most-lighter-95902

    01/13/2022, 12:58 AM
    Diagnostics:
      aws:secretsmanager:Secret (test-123-aws-credentials):
        error: 1 error occurred:
            * error configuring Terraform AWS Provider: no valid credential sources for Terraform AWS Provider found.
        
        Please see <https://registry.terraform.io/providers/hashicorp/aws>
        for more information about providing credentials.
        
        Error: NoCredentialProviders: no valid providers in chain
        caused by: EnvAccessKeyNotFound: failed to find credentials in the environment.
        SharedCredsLoad: failed to load profile, .
        EC2RoleRequestError: no EC2 instance role found
        caused by: RequestCanceled: EC2 IMDS access disabled via AWS_EC2_METADATA_DISABLED env var
  • m

    most-lighter-95902

    01/13/2022, 12:58 AM
    It seems to be related to a recent update as mentioned in this issue: https://github.com/pulumi/pulumi-aws/issues/1692
  • m

    most-lighter-95902

    01/13/2022, 12:59 AM
    But it doesn’t seem to suggest a solution.
    l
    • 2
    • 22
  • m

    most-lighter-95902

    01/15/2022, 11:37 PM
    Is there a way to create a project via Automation API? I might be missing something, but the examples seem to hardcode
    projectName
    . I’m working on a project to manage devops setup for clients and trying to create a new project/client.
    m
    • 2
    • 6
  • m

    most-portugal-2672

    01/22/2022, 2:22 PM
    Hi there, Apologies if this question is a repeat. I'm currently using GO and Azure. If I were to create a resource group (For e.g. RG1) in StackA. How can I, from StackB, interrogate StackA to get "RG1" so that I can start adding some resources in to this existing group from StackB ?
    b
    • 2
    • 3
  • l

    lemon-dog-29241

    01/23/2022, 4:17 PM
    Hello!!! 🙂 Is there no way to extract the value of an Output as a type that isn't an Output? I have a use-case where I need to do something before my pulumi program completes, and I need the value of a resource to do so.. In AWS, what I'm doing is creating a hosted zone (which is a subdomain of a domain in another account) and certificate and then attempting to validate it it with the
    acm.Certificate
    and
    acm.CertificateValidation
    APIs. The issue is that before I attempt to validate the certificate, I need to add the name servers to a Hosted Zone in another account. I'm doing this by invoking a lambda function in my pulumi program, which I think will work. But I can't do that because I can't access a non-Output type of the name servers. I keep getting an error from my lambda saying that NoneType is nonsubscriptable, which makes sense, because I can't get pulumi to pass the actual value of the name servers -- just an Output. I'm trying to get creative so any and all ideas are appreciated!
    b
    l
    • 3
    • 19
  • w

    worried-author-3242

    01/25/2022, 12:15 AM
    hello, people! I am using Pulumi auto to apply my golang pulumi code in a aws ec2 and I noticed every time pulumi auto gets run a new services resource-aws-v4.25.0 and pulumi-language-go gets up but even when pulumi finishes its execution theses services are still active. Does anyone know the reason for this behavior? pulumi/plugins/resource-aws-v4.25.0/pulumi-resource-aws 127.0.0.1:39809 pulumi-language-go  127.0.0.1:39810
    l
    • 2
    • 1
  • m

    most-portugal-2672

    02/04/2022, 4:18 PM
    Hi there friends, I was testing out the Automation API from a git repo. If the Pulumi program I had on the git remote was a component resource, what would be the best pattern to pass in (from the calling program) the arguments to the component resource living on a git repo ? Thanks for any help in advance.
    l
    p
    • 3
    • 4
  • c

    crooked-pillow-11944

    02/06/2022, 9:47 PM
    I'd like to include the pulumi code for provisioning inside of a Python module and using the automation API from a
    Click
    command bring the stack up. Is there an example of using pulumi like this?
    q
    l
    • 3
    • 5
Powered by Linen
Title
c

crooked-pillow-11944

02/06/2022, 9:47 PM
I'd like to include the pulumi code for provisioning inside of a Python module and using the automation API from a
Click
command bring the stack up. Is there an example of using pulumi like this?
q

quiet-wolf-18467

02/06/2022, 10:23 PM
I think this might be the best example for you: https://github.com/pulumi/automation-api-examples/blob/main/python/inline_program/main.py
c

crooked-pillow-11944

02/06/2022, 11:50 PM
That wasn't super helpful because it was running inline vs in a module I ended up creating a Python module and put it here: https://github.com/kjenney/prov All it does now is create a single S3 bucket but it could provision anything using the
pulumi_program
function
q

quiet-wolf-18467

02/07/2022, 8:06 AM
There's no real difference between an inline function and a module: https://github.com/pulumi/automation-api-examples/tree/main/python/local_program
l

lemon-agent-27707

02/08/2022, 3:39 AM
This might be of interest to you. A django app with a front end that kicks of automation api deployments: https://github.com/komalali/self-service-platyform
c

crooked-pillow-11944

02/08/2022, 9:43 AM
That is very interesting - kinda the intent of the automation api. Thanks @lemon-agent-27707
View count: 3