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

    sparse-insurance-40223

    09/25/2018, 8:17 AM
    pulumi😛ulumi:Stack: operations-Babylon-4 info: panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x0 pc=0x128929d]
    😙 2
    s
    c
    • 3
    • 55
  • b

    brainy-gpu-17825

    09/25/2018, 11:58 AM
    Hi how can I make a fieldgroup as collapsible I tried using the property it’s not working in suitelet
    b
    • 2
    • 3
  • a

    adventurous-jordan-10043

    09/25/2018, 12:13 PM
    Used the new
    factoryFunc
    of
    aws.serverless.Function
    . Not sure if the global approach is the best but it’s really cool to have that
    w
    g
    a
    • 4
    • 17
  • a

    adventurous-jordan-10043

    09/25/2018, 12:14 PM
    Completely unrelated : if I want to reference a config value inside one of my lambda, I’m forced to use env variables ?
    w
    • 2
    • 5
  • s

    sparse-insurance-40223

    09/25/2018, 1:13 PM
    just got pulumi to create a new AKS cluster... deploy a service... create an ip... get a lets-encrypt certificate and it all works. pulumi's awesome!
    🎉 5
  • s

    sparse-insurance-40223

    09/25/2018, 2:34 PM
    am i being a silly billy... helm.v2.ChartOpts only takes string not Input<string> how can i specify it from a resource it depends on?
    w
    c
    • 3
    • 3
  • f

    few-football-67858

    09/25/2018, 2:55 PM
    i'll time myself but i think it will take about 1 hr
  • f

    full-dress-10026

    09/25/2018, 5:39 PM
    How should AWS helper functions, like
    aws.getCallerIdentity()
    , that return a Promise instead of an Output be used?
  • s

    stocky-spoon-28903

    09/25/2018, 5:40 PM
    @full-dress-10026 you can
    await
    them
  • s

    stocky-spoon-28903

    09/25/2018, 5:40 PM
    Or you can use a Promise as a
    pulumi.Input
    IIRC
  • m

    microscopic-florist-22719

    09/25/2018, 5:40 PM
    Alternatively, if you're just passing them as resource inputs--yeah
  • s

    stocky-spoon-28903

    09/25/2018, 5:40 PM
    You only need to
    await
    if you need to use the value in control flow
  • m

    microscopic-florist-22719

    09/25/2018, 5:40 PM
    ^^what he said. @stocky-spoon-28903 beat me to it 🙂
  • w

    white-balloon-205

    09/25/2018, 5:41 PM
    You can see an example of awaiting one of these in the snippet I shared above:
    let serviceVpcId = service.ecsService.networkConfiguration.apply(async (networkConfig) => {
        let subnetId = networkConfig["subnets"][0];
        let subnet = await aws.ec2.getSubnet({ id: subnetId });
        return subnet.vpcId;
    });
  • f

    full-dress-10026

    09/25/2018, 5:42 PM
    Right, that one makes sense. Just await'ing won't cause a potential race condition though?
    getCallerIdentity()
    is used independently -- not in the
    apply
    of an output.
  • w

    white-balloon-205

    09/25/2018, 5:45 PM
    You typically want to combine these Promises into your data flow somehow - either constructing another Promise from them that gets passed into an input somewhere, or combining them into other
    Outputs
    . But you can also use them directly for control flow if you want (though that can limit parallelism and lead to slightly more awkward program structure). Depends a bit on the specific task you are trying to solve for.
  • f

    full-dress-10026

    09/25/2018, 5:48 PM
    I see. I really only need the account id for the caller, and because promises can be used as inputs, this should work:
    let awsAccountId = aws.getCallerIdentity().then((value => {
        return value.accountId;
    }));
    👍 1
    w
    • 2
    • 1
  • f

    full-dress-10026

    09/25/2018, 6:06 PM
    Is there a class to accept a VPC endpoint connection? i.e. https://docs.aws.amazon.com/cli/latest/reference/ec2/accept-vpc-endpoint-connections.html
  • f

    full-dress-10026

    09/25/2018, 6:10 PM
    I cannot see a way to accept a VPC endpoint connection with Terraform either.
  • p

    proud-tiger-5743

    09/25/2018, 6:32 PM
    Does anyone have an example of constructing a Kinesis Firehose?
  • f

    full-dress-10026

    09/25/2018, 7:52 PM
    Is it ok for the
    apply
    function to do IO?
  • f

    full-dress-10026

    09/25/2018, 7:54 PM
    Specifically, send an HTTP request.
  • w

    white-balloon-205

    09/25/2018, 8:29 PM
    Yep - totally fine to do I/O in
    apply
    . Just worth understanding what/when that will run, and whether that matches expectations. During
    update
    it will always run (assuming resources successfully create). During a
    preview
    these will only run if the inputs are known (which will only sometimes be the case).
  • s

    stocky-spoon-28903

    09/25/2018, 9:02 PM
    @white-balloon-205 is there an escape hatch for not performing it if you are in the case of a preview with known inputs?
  • s

    stocky-spoon-28903

    09/25/2018, 9:03 PM
    I don’t have that use case right now but may be useful for future
  • h

    helpful-vegetable-35581

    09/25/2018, 9:04 PM
    I think you can check runtime.dryRun() to see if your in a preview
  • w

    white-balloon-205

    09/25/2018, 9:10 PM
    That's right -
    pulumi.runtime.isDryRun
    is available to manually test. Shouldn't normally be needed - but does allow control when it is necessary.
  • f

    full-dress-10026

    09/25/2018, 10:31 PM
    Hmm I could probably make that work but it's not ideal. Is there a way to run some code that only executes after a resource has been created (not updated or deleted)?
    a
    • 2
    • 5
  • p

    proud-tiger-5743

    09/25/2018, 10:37 PM
    Is it possible, either with
    serverless
    or
    aws
    to write a lambda function inline, in JS? The goal is to bind it to Kinesis, but I'd like to not have to create a separate folder, if possible. Can you write regular JS here?
    let lambda = new aws.lambda.Function("mylambda", {
        runtime: foo,
        code: CAN CODE GO HERE?,
        timeout: 300,
        handler: foo,
        role: role.arn,
        environment: { 
            variables: {
                "COUNTER_TABLE": counterTable.name
            }
        },
    }, { dependsOn: [fullAccess] });
    w
    l
    • 3
    • 15
  • f

    fresh-flag-12765

    09/26/2018, 2:23 AM
    Is it possible to run a one-off task (
    cloud.Task#run
    ) on creating a resource? Or is this straying too far away from the scope of pulumi?
    w
    • 2
    • 2
Powered by Linen
Title
f

fresh-flag-12765

09/26/2018, 2:23 AM
Is it possible to run a one-off task (
cloud.Task#run
) on creating a resource? Or is this straying too far away from the scope of pulumi?
w

white-balloon-205

09/26/2018, 2:56 AM
Technically yes - though it’s a little hard to hook the “on creating a resource” event currently. Making it easy to run arbitrary code on that event (and others) is tracked by https://github.com/pulumi/pulumi/issues/1691. Fee free to add a note on that issue with your scenario. In the meantime, you can approximate this with dynamic providers in some cases.
f

fresh-flag-12765

09/26/2018, 1:13 PM
Awesome, thank you
View count: 1