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

    quaint-hair-91883

    04/13/2022, 5:31 PM
    Does anyone have any examples of how to write integration tests against the infrastructure built using the Automation API in Go?
    b
    • 2
    • 2
  • b

    bored-activity-40468

    04/23/2022, 6:52 PM
    Is it possible to disable the default providers with automation-api with something like:
    config.Add("pulumi:disable-default-providers[0]", new ConfigValue("aws", false));
    • 1
    • 3
  • p

    proud-cricket-86351

    04/24/2022, 10:26 AM
    Hi i have a question regarding the pulumi automation api. Is it possible to check the current projects that are associated with my pulumi account? Right now if im reading the automation api interface i only see the possbility to create a project and multiple stacks within it. The reason im asking is that im looking for a use case where a user is on multiple projects, and he would like the possibility to select his project using my custom cli that im building. But in order to select he needs a list of pulumi projects ofcourse
    b
    • 2
    • 16
  • b

    bright-receptionist-28471

    04/25/2022, 11:01 PM
    is it possible to log in to a state backend using the automation api?
    b
    l
    • 3
    • 16
  • a

    abundant-solstice-21589

    04/26/2022, 6:29 AM
    Hello everyone, could you tell me how to achieve the following structured config by using Pulumi GO sdk with Automation API:
    config:
      myNamepace:myStorage:
        name: myStorageName
        size: 50
    I have tried the following:
    jsonString := `{"name": "test", "size": 100}`
    err = stack.SetConfig(ctx, "myNamepace:myStorage", auto.ConfigValue{
            Value:  jsonString,
    	    Secret: false,
    })
    I got the following result which is not what I want:
    config:
      myNamepace:myStorage: '{"name": "test", "size": 100}'
    g
    • 2
    • 1
  • p

    proud-cricket-86351

    04/28/2022, 11:40 AM
    Hi im trying to create something similiar to the following example: https://github.com/pulumi/automation-api-examples/tree/main/go/git_repo_program. Im trying to pull a pulumi program from a remote location (git) But i cant find the documentation for node.js (typescript) for basically doing the same thing as in the go example Could anybody point me into the right direction / help me out?
    b
    • 2
    • 3
  • g

    great-arm-54759

    04/30/2022, 3:26 PM
    Hey folks, I’m creating an automation API in Go and for testing local I’m using the LocalStack S3 bucket as a backend, but when I try to create a new stack I get this error:
    failed to create stack: exit status 255
    code: 255
    stdout: 
    stderr: Logging in using access token from PULUMI_ACCESS_TOKEN
    error: getting user info from <http://localhost:4566/project-gaia>: [404] <?xml version="1.0" encoding="UTF-8"?>
    <Error>
        <Code>NoSuchKey</Code>
        <Message>The specified key does not exist.</Message>
        <Key>api/user</Key>
        <RequestID>7a62c49f-347e-4fc4-9331-6e8eEXAMPLE</RequestID>
    </Error>
    Ps: Using with
    pulumi new
    , it worked well
    b
    • 2
    • 8
  • p

    proud-cricket-86351

    05/03/2022, 10:45 AM
    Is it possible in the Pulumi automation API, to find out what the latest status of a stack is?
    l
    • 2
    • 1
  • f

    full-artist-27215

    05/03/2022, 9:38 PM
    Can we not use the new organization tokens with the Automation API? I've got an Automation API program that works fine with my personal token, but fails with an organization token with
    stderr: error: could not create stack: [404] Not Found: Organization 'grapl' not found
    a
    • 2
    • 8
  • v

    victorious-tomato-90057

    05/05/2022, 2:12 AM
    Hi forks, is it possible to 'restart' the pulumi runtime after a test in the
    after
    hook during the tests?
    l
    • 2
    • 6
  • f

    future-refrigerator-88869

    05/05/2022, 9:46 PM
    Hi everyone, is there a way to get all stacks via the automation api ? EG: the ouput of
    pulumi stack ls
    command
    I just found the conversation from a month ago in this channel .
  • f

    flaky-school-82490

    05/11/2022, 9:23 AM
    Hi, is it possible to observe the status of a resource (in particular whether the resource creation is complete) using the #automation-api? The problem I am trying to solve is waiting for an Azure resource to be asynchronously provisioned before starting to create another resource that depends on it.
    b
    • 2
    • 9
  • f

    fast-easter-23401

    05/13/2022, 8:46 PM
    Hello folks, I’m trying to automate granting privileges to MySQL users on GCP. In order to do so, I need to start a subprocess to create a new instance of google cloud_sql_proxy, which is used to ensure TLS when creating new connections to the database. On plain TS this can be done quite easily, but with pulumi resource provisioning fails (GRANTS), as pulumi hangs forever (most likely awaiting process termination). I’ve been trying to do this using promises but I’m still unable to nailed it. I’d be very appreciative if you could provide me with some insights on how to accomplish this task.
    b
    w
    • 3
    • 5
  • p

    proud-cricket-86351

    05/17/2022, 2:05 PM
    Hi, we have a problem with our automation API setup and were wondering whats wrong with it. Right now the situation is as following: Pulumi User A created a custom CLI on top of the automation API. He can succesfully deploy/destroy pulumi projects/stacks Pulumi User A created an access token for Pulumi User B, so he can try out the custom made CLI from the account access of user A. Whenever Pulumi user B tries to uses the custom CLI and wants to deploy a Pulumi project he gets the error “AccessDenied: Access Denied” when deploying a pulumi stack Any suggestions to troubleshoot this?
  • p

    proud-cricket-86351

    05/17/2022, 2:07 PM
    We’ve already verified that the access token Pulumi user A provides is valid, by testing the same access token on the User A pc and deployment with this token works.
  • p

    proud-cricket-86351

    05/17/2022, 2:09 PM
    The deployment is to a simple AWS s3 bucket btw
  • p

    proud-cricket-86351

    05/17/2022, 2:12 PM
    Nvm its fixed
    😛artypus-8bit: 1
  • p

    proud-cricket-86351

    05/17/2022, 2:12 PM
    was a vault on our side, wrong AWS credentials
  • p

    proud-cricket-86351

    05/17/2022, 2:12 PM
    xd
  • p

    proud-cricket-86351

    05/17/2022, 2:12 PM
    sory guys
  • d

    damp-toddler-4614

    05/20/2022, 6:59 AM
    hi - I have recently added a Team organization , but any new stack that I try to create always ends up in my personal org. How do I deploy a stack to the team organization? I tried specifying project name as {org}/{projectName}, but it complains saying
    provided project name "org-project" doesn't match Pulumi.yaml
    var pulumiFunction = PulumiFn.Create(() => CreateComposites(args, resolvedOutputs, GetProvider(args)));
                var inlineProgramArgs = new InlineProgramArgs(ProjectType.ToString(), args.StackName, pulumiFunction);
                inlineProgramArgs.ProjectSettings.Name = $"{args.PulumiOrg.ToLower()}/{ProjectType}";
    ✅ 1
    • 1
    • 1
  • p

    proud-cricket-86351

    05/26/2022, 3:35 PM
    Hi i have a question regards the automation API. about the following function in the Workspace interface:
    /**
         * Installs a plugin in the Workspace, for example to use cloud providers like AWS or GCP.
         *
         * @param name the name of the plugin.
         * @param version the version of the plugin e.g. "v1.0.0".
         * @param kind the kind of plugin e.g. "resource"
         */
        installPlugin(name: string, version: string, kind?: string): Promise<void>
    What is the plugin in this case? Can i compare it to a npm package? So for example a npm dependency in package json: ‘pulumi/aws”: “^5.4.0,’ dependency. What are exactly the use cases for using the function above from the automation API?
    l
    • 2
    • 3
  • s

    salmon-account-74572

    05/31/2022, 6:46 PM
    If I have something I want my Pulumi code to manage that isn't handled by a Provider (say, a configuration file built using values from infrastructure managed by Pulumi), it seems like that's a use case where I'll have to use the automation API (so that I can create the configuration file on
    pulumi up
    and remove it on
    pulumi destroy
    ). Does that sound accurate, or is there a better way of approaching this sort of scenario?
    w
    • 2
    • 2
  • p

    prehistoric-london-9917

    06/01/2022, 11:59 PM
    Not sure if this is an automation, aws, or typescript topic, but here goes: Are providers (AWS provider specifically) thread safe? I have an automation script that runs the same AWS actions in two different accounts simultaneously by assuming roles into those accounts. When I tell the automation to run one account at a time, it’s fine. But when I try to run them simultaneously (using an
    async
    function), I get a weird behaviour where one of the providers seems to be trying to assume the wrong role. I suspect it’s some sort of race condition where one of the threads gets to the provider first, assumes the right role, and is fine. Then the next thread comes along, but instead of a new provider, it’s using the original one, and I get STS errors about assuming the wrong role. I suppose I can try waiting for each deployment to finish, but it’d be nice if they can run at the same time. Any thoughts?
    b
    • 2
    • 3
  • m

    most-lighter-95902

    06/03/2022, 8:29 PM
    Does Pulumi automation api also require aws cli?
  • m

    most-lighter-95902

    06/03/2022, 8:29 PM
    I’m getting this error and I’m assuming that’s the issue?
  • m

    most-lighter-95902

    06/03/2022, 8:30 PM
    kubernetes:core/v1:Namespace 8d4a3669-8adb-412e-8498-17a30d0bce76 creating error: configured Kubernetes cluster is unreachable: unable to load schema information from the API server: Get "<https://XXXXXXXXXXXXXXX.gr7.us-west-1.eks.amazonaws.com/openapi/v2?timeout=32s>": getting credentials: exec: executable aws not found
    b
    • 2
    • 6
  • c

    curved-morning-41391

    06/07/2022, 6:26 PM
    Hey if I register outputs in a custom component, how do I propagate that so that I see them on the stack outputs?
    w
    b
    • 3
    • 3
  • l

    limited-wolf-97785

    06/09/2022, 8:03 AM
    Hey! Anyone else experiencing issues with the Pulumi CLI when destroying Pulumi stacks with the Automation API (Node.js SDK) in version 3.34.0? I've raised a GitHub issue here.
  • p

    prehistoric-london-9917

    06/11/2022, 12:06 AM
    Hi - I’m having an issue with an InlineProgram reporting this error:
    error: Unhandled exception: Error: Detected multiple versions of '@pulumi/pulumi' in use in an inline automation api program.
    I can’t sort out where it’s coming from because as near as I can tell, all the Pulumis are on the same version. I’ve looked for all
    pulumi
    directories in
    node_modules
    and got the version out of them.
    $ find . -name "pulumi" -type d -exec cat {}/version.js \;
    "use strict";
    // Copyright 2016-2018, Pulumi Corporation.
    //
    // Licensed under the Apache License, Version 2.0 (the "License");
    // you may not use this file except in compliance with the License.
    // You may obtain a copy of the License at
    //
    //     <http://www.apache.org/licenses/LICENSE-2.0>
    //
    // Unless required by applicable law or agreed to in writing, software
    // distributed under the License is distributed on an "AS IS" BASIS,
    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    // See the License for the specific language governing permissions and
    // limitations under the License.
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.version = "3.34.1";
    //# sourceMappingURL=version.js.map"use strict";
    // Copyright 2016-2018, Pulumi Corporation.
    //
    // Licensed under the Apache License, Version 2.0 (the "License");
    // you may not use this file except in compliance with the License.
    // You may obtain a copy of the License at
    //
    //     <http://www.apache.org/licenses/LICENSE-2.0>
    //
    // Unless required by applicable law or agreed to in writing, software
    // distributed under the License is distributed on an "AS IS" BASIS,
    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    // See the License for the specific language governing permissions and
    // limitations under the License.
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.version = "3.34.1";
    //# sourceMappingURL=version.js.map%
    $ pulumi version
    v3.34.1
    yarn.lock
    also seems to be resolving correctly:
    "@pulumi/pulumi@^3.0.0":
      version "3.34.1"
      resolved "<https://registry.yarnpkg.com/@pulumi/pulumi/-/pulumi-3.34.1.tgz#55f040fe5e02d38837e90cb69481c500b8e879f7>"
      integrity sha512-Lnwc9aOnPuEL/2QWt6YYTkMO6VVWwrt+OO42AxQnhpiZkmGr2ujaIpX30U+7l1CctnszW+eKYknbjO7K+ZvIvg==
      dependencies:
        "@grpc/grpc-js" "~1.3.8"
    The only reference to this error I can find is here: https://github.com/pulumi/pulumi/issues/7333 (and a link through to the original ticket that caused that check), but I didn’t get much help there. I’m not sure how to track this down since the stack trace isn’t giving me much else to go on.
Powered by Linen
Title
p

prehistoric-london-9917

06/11/2022, 12:06 AM
Hi - I’m having an issue with an InlineProgram reporting this error:
error: Unhandled exception: Error: Detected multiple versions of '@pulumi/pulumi' in use in an inline automation api program.
I can’t sort out where it’s coming from because as near as I can tell, all the Pulumis are on the same version. I’ve looked for all
pulumi
directories in
node_modules
and got the version out of them.
$ find . -name "pulumi" -type d -exec cat {}/version.js \;
"use strict";
// Copyright 2016-2018, Pulumi Corporation.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     <http://www.apache.org/licenses/LICENSE-2.0>
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "3.34.1";
//# sourceMappingURL=version.js.map"use strict";
// Copyright 2016-2018, Pulumi Corporation.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     <http://www.apache.org/licenses/LICENSE-2.0>
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "3.34.1";
//# sourceMappingURL=version.js.map%
$ pulumi version
v3.34.1
yarn.lock
also seems to be resolving correctly:
"@pulumi/pulumi@^3.0.0":
  version "3.34.1"
  resolved "<https://registry.yarnpkg.com/@pulumi/pulumi/-/pulumi-3.34.1.tgz#55f040fe5e02d38837e90cb69481c500b8e879f7>"
  integrity sha512-Lnwc9aOnPuEL/2QWt6YYTkMO6VVWwrt+OO42AxQnhpiZkmGr2ujaIpX30U+7l1CctnszW+eKYknbjO7K+ZvIvg==
  dependencies:
    "@grpc/grpc-js" "~1.3.8"
The only reference to this error I can find is here: https://github.com/pulumi/pulumi/issues/7333 (and a link through to the original ticket that caused that check), but I didn’t get much help there. I’m not sure how to track this down since the stack trace isn’t giving me much else to go on.
View count: 1