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
general
  • s

    swift-lunch-74411

    11/28/2019, 10:01 AM
    The deployment is time consuming but after couple of try, we've got bearer token error which we think it's due to using Azure CLI login and not service principal. Here is the link to the issue https://github.com/pulumi/pulumi/issues/2644
    t
    t
    • 3
    • 4
  • s

    swift-lunch-74411

    11/28/2019, 10:01 AM
    I'm wondering if anyone had the same issue before which can help
  • q

    quaint-artist-58613

    11/28/2019, 10:09 AM
    Hey friends,
    import * as k8s from "@pulumi/kubernetes";
    import * as pulumi from "@pulumi/pulumi";
    const env = pulumi.getStack();
    const infra_stack = new pulumi.StackReference(`acmecorp/infra/${env}`);
    const provider = new k8s.Provider("k8s", { kubeconfig: infra.getOutput("kubeConfig") });
    const service = new k8s.core.v1.Service(..., { provider: provider });
    If infra_stack is deployed in aws account A and current stack is deployed in aws account B, does the code snippet still work?🙂
  • b

    brainy-microphone-27448

    11/28/2019, 10:28 AM
    Is it possible to enforce pulumi to stop ec2 instance before detaching the volume on
    userdata
    change(and instance recreation)? https://github.com/avolkov-dev/pulumi-mount-issue/blob/master/index.ts#L16 Because now (without
    forceDetach
    ) we are getting Error waiting for Volume (vol-xxx) to detach from Instance: i-xxx error) I believe this is because we trying to detach volume on running instance and getting timeouted
  • r

    red-football-97286

    11/28/2019, 10:57 AM
    Using python, how can I dynamically get the account id in aws?
  • b

    broad-finland-69602

    11/28/2019, 12:15 PM
    ☝️ or in general any terraform data source? get caller identity give you the aws account id, but I am not sure how to integrate that with a Pulumi program: https://github.com/pulumi/pulumi-aws/blob/master/sdk/python/pulumi_aws/get_caller_identity.py
  • w

    white-balloon-205

    11/28/2019, 12:52 PM
    Yes -
    get_caller_identity
    is the answer to how to dynamically get the AWS account id. @broad-finland-69602 what question do you have on how to integrate that? You should just be able to call the function.
    b
    • 2
    • 4
  • r

    red-football-97286

    11/28/2019, 1:54 PM
    thanks @white-balloon-205 and @broad-finland-69602, got it!
    from pulumi_aws import get_caller_identity
    current = get_caller_identity()
    b
    • 2
    • 2
  • i

    important-leather-28796

    11/28/2019, 9:44 PM
    hmm
    warning: resource plugin kubernetes is expected to have version >=1.3.1, but has 0.20.3-dev.1550685910+g50fc5e2.dirty; the wrong version may be on your path, or this may be a bug in the plugin
    I did a
    pulumi plugin rm --all
    and
    pulumi plugin install
    but same occurred, need to rebuild node modules?
    b
    w
    • 3
    • 8
  • p

    plain-eye-9759

    11/29/2019, 11:18 AM
    Hi everyone, how can prevent I partial creation of a resource? In my case it happens for a database account.
    pulumi up
    failed for some reason in the first run, and the database account managed to slip through. Subsequent
    pulumi up
    tried to create that same resource and failed because of name uniqueness.
    pulumi refresh
    didn't work either How can I handle this?
    w
    • 2
    • 2
  • c

    cold-coat-35200

    11/29/2019, 1:46 PM
    Hi, is that normal that the
    aws.iam.GroupPolicyAttachment
    requires a
    pulumi.Input<Group>
    and not a
    pulumi.Input<string | Group>
    like the RolePolicyAttachment? Currently, I want to add a policy attachment to a group, but the group managed outside pulumi, which means I don't have a
    Group
    resource and I can't get one, because
    aws.iam.getGroup
    returns a
    GetGroupResult
    , not a
    Group
    w
    b
    • 3
    • 3
  • s

    stocky-island-3676

    11/29/2019, 2:16 PM
    @colossal-beach-47527 Any reason why you don’t use your Pulumi Docker image inside your CircleCI orbs?
    c
    • 2
    • 2
  • c

    chilly-photographer-60932

    11/30/2019, 12:12 AM
    pulumi:pulumi:Stack (aws-arcus-kitchensink-naveen-srinivasan):
        error: an unhandled error occurred: Program exited with non-zero exit code: 1
     
        The Pulumi runtime detected that 255 promises were still active
        at the time that the process exited. There are a few ways that this can occur:
          * Not using `await` or `.then` on a Promise returned from a Pulumi API
          * Introducing a cyclic dependency between two Pulumi Resources
          * A bug in the Pulumi Runtime
        Leaving promises active is probably not what you want. If you are unsure about
        why you are seeing this message, re-run your program with the `PULUMI_DEBUG_PROMISE_LEAKS`
        environment variable. The Pulumi runtime will then print out additional
        debug information about the leaked promises.
     
    Permalink: <https://app.pulumi.com/MINDBODY-Platform/aws-arcus-kitchensink/naveen-srinivasan/previews/2daf38a1-f35b-4223-ba19-ca871a9f5ebd>
    w
    m
    l
    • 4
    • 17
  • f

    fresh-summer-65887

    12/01/2019, 5:43 PM
    Some feedback from when I demonstrate pulumi .net support to .net people - "why can't I just run my program?". The initial impressions are that requiring pulumi CLI to run the IaC instead of the standard
    dotnet run
    is "non-standard" and "against the grain". The expectation is that the .net program should be spawning the pulumi "engine" and not the other way around. And to be honest, I can see their point. There was also a couple of other comments • "I want to do other things in my program as part of deployment such as a db migration." • "I want to use this to define resources of my own services" This got me thinking a bit that it inverts things and turns pulumi into more of a platform and a bit more into orchestration which is bit of a fundamental architectural shift, afaik. Anyway, just thought it would be interesting to share.
    t
    • 2
    • 1
  • t

    thankful-optician-22583

    12/01/2019, 5:53 PM
    Guys, will a representative be at Reinvent 2019?, if so where exactly. Would like to visit.
    g
    • 2
    • 5
  • m

    millions-energy-69153

    12/02/2019, 3:41 AM
    I’m using
    pulumi-awsx
    to create an AWS stack for our app as shown here. It consists of three ECS tasks: one for the server (api), one for the client, and one for our worker. I’d like to get
    /api*
    requests going to the server and the rest going to the client. I’m using an ALB with target groups and a listener rule to try and achieve this. With everything aligned with port 4000, this works great. If I want to have the ALB serve on 80 and the container ports staying on 4000, I get 503 responses. I’ve tried a number of things to do the port mapping, but nothing seems to work. I found this issue: https://github.com/pulumi/examples/issues/267#issuecomment-524598748 which says, “If you’re running on Fargate you have to use the same port as what your container is listening on.” I hope this isn’t the case. Thanks in advance for any guidance you can offer. Pulumi is an amazing tool!
    Pulumi_js.js
    c
    • 2
    • 8
  • m

    most-lighter-1731

    12/02/2019, 10:48 AM
    Hello, I'm trying to run a Fargate task whenever I deploy with
    pulumi up
    . I'm currently getting a runtime error because it seems pulumi is trying to execute the task during preview inspite of the fact that the call to
    TaskDefinition.run()
    is inside a pulumi
    apply
    call. How can I make sure this code is executed during deployment and not before ? The relevant error is
    error: Running program '/home/luis/Code/outmind/outmind-app/aws-architecture/src/index.ts' failed with an unhandled exception:
        Error: Cannot call '.get' during update or preview.
        To manipulate the value of this Output, use '.apply' instead.
    and the origin of this is on
    node_modules/@pulumi/ecs/taskDefinition.ts:226:39
    where the code is getting the cluster id.
  • b

    better-actor-92669

    12/02/2019, 11:25 AM
    Hi Pulumi Community! Is it possible to restore a Google CloudSQL Postgres database from a dump file? Dumps were made via
    gcloud sql export
    . Can't find it in documentation and source code. I use pulumi_gcp (python). https://github.com/pulumi/pulumi-gcp/blob/master/sdk/python/pulumi_gcp/sql/
  • c

    cuddly-leather-18640

    12/02/2019, 1:24 PM
    I’d like to try using pulumi at my organization. We use self-hosted gitlab and gsuite and I can’t figure out how to sign up for pulumi using either of those options. The gitlab SSO redirects to the managed version of gitlab and using other SSO requires my organization already exist in the pulumi ecosystem. Am I going about this the wrong way?
    g
    • 2
    • 3
  • c

    colossal-plastic-46140

    12/02/2019, 2:52 PM
    Hi Folks, it looks like we are seeing a regression after versions 1.5.1 https://github.com/pulumi/pulumi/issues/3596
    b
    • 2
    • 2
  • c

    cuddly-leather-18640

    12/02/2019, 3:10 PM
    The docs (https://www.pulumi.com/docs/intro/concepts/project/) for pulumi say that: “In Python, there should either be a main.py file or a file setup.py that defines the entry point”. What are the consequences of not having either of those? We use django and have a manage.py
    • 1
    • 1
  • l

    little-energy-64187

    12/02/2019, 3:46 PM
    is there a way to require secret outputs from another stack?
  • b

    better-rainbow-14549

    12/02/2019, 3:49 PM
    i'm still getting this when running a stack the second time for an AKS cluster
    error: decrypting secret value: failed to decrypt: incorrect passphrase, please set PULUMI_CONFIG_PASSPHRASE to the correct passphrase
    it's almost as if the azure AKS resource doesn't respect the setting when it initially writes its state to the state file, then the next time round it's trying to decrypt it. i don't know how to test this hypothesis though
    • 1
    • 1
  • b

    bitter-island-28909

    12/02/2019, 5:36 PM
    I am afraid I am using
    additionalSecretOutputs
    incorrectly, although I could have sworn this used to work:
    let pw = new random.RandomString("test-password", {
        length: 8,
        special: false,
        additionalSecretOutputs: ["result", "id"]
    });
    
    let param = new aws.ssm.Parameter("test-password", {
        length: 8,
        value: pw.result,
        type: "SecureString"
    });
    Expectation: The value of the RandomString and SSM parameter are not visible in plaintext in the stack state and web console. Actual: The plaintext is visible in the stack state and web console.
    w
    • 2
    • 2
  • l

    little-energy-64187

    12/02/2019, 7:10 PM
    I found it a bit inconsistent that for some resources I need to remove the
    import
    option for already imported resources (and perhaps add
    aliases
    ) otherwise pulumi will try to replace them, but it can stay for k8s resources and no replacement would happen. What can be the reason for that?
    w
    • 2
    • 2
  • a

    ambitious-ram-5811

    12/02/2019, 9:50 PM
    Has anyone tried to create an Azure
    HttpEventSubscription
    and gotten back the message "Requested feature is not available in resource group [MY GROUP]. Please try using a different resource group or create a new one."
    t
    • 2
    • 5
  • a

    ambitious-ram-5811

    12/02/2019, 9:50 PM
    Is this a Billing thing or a Location thing? I feel like it's pretty unlikely that West US 2 doesn't support Azure Functions but maybe?
  • a

    ambitious-ram-5811

    12/02/2019, 9:51 PM
    I'm basically following https://www.pulumi.com/blog/serverless-as-simple-callbacks-with-pulumi-and-azure-functions
    g
    • 2
    • 5
  • a

    ambitious-ram-5811

    12/03/2019, 1:21 AM
    Ok one last annoying question, how can I reference other resources in an
    HttpFunction
    ?
  • a

    ambitious-ram-5811

    12/03/2019, 1:22 AM
    const get = new azure.appservice.HttpFunction("Read", {
      route: "items",
      methods: ["GET"],
      callback: async (context, request) => {
        return { status: 200, body: { url: anotherResource.urn } };
      },
    });
    t
    • 2
    • 1
Powered by Linen
Title
a

ambitious-ram-5811

12/03/2019, 1:22 AM
const get = new azure.appservice.HttpFunction("Read", {
  route: "items",
  methods: ["GET"],
  callback: async (context, request) => {
    return { status: 200, body: { url: anotherResource.urn } };
  },
});
t

tall-librarian-49374

12/03/2019, 7:08 AM
This should work, you just need to decode the output with
.get()
:
body: { url: anotherResource.urn.get() }
View count: 1