https://pulumi.com logo
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
  • o

    orange-tailor-85423

    11/07/2018, 11:56 PM
    -.c
  • s

    stocky-spoon-28903

    11/07/2018, 11:56 PM
    @orange-tailor-85423 Which example is this? There were some breaking changes in the Terraform provider at some point which may be responsible - I’ve had to update a couple of the GCP samples today as I’ve been working on it
  • o

    orange-tailor-85423

    11/07/2018, 11:57 PM
    https://github.com/googleapis/google-auth-library-nodejs#json-web-tokens
  • s

    stocky-spoon-28903

    11/07/2018, 11:58 PM
    @glamorous-printer-66548 If you use the GCP dev package in about 15 minutes, the
    get
    workflow is much neater - I think both of your issues around that are resolved.
    👍 1
    g
    • 2
    • 2
  • h

    helpful-continent-74245

    11/08/2018, 4:16 AM
    How do I set the lambda function role with the
    bucket.onObjectCreated
    function ?
  • h

    helpful-continent-74245

    11/08/2018, 4:23 AM
    @busy-umbrella-36067BTW for the fixed S3 bucket name, I had to use:
    const bucket = new aws.s3.Bucket("my-bucket", { bucket: "my-bucket" });
    (just
    bucket
    option instead of
    name
    )
  • b

    busy-umbrella-36067

    11/08/2018, 4:23 AM
    nice, glad you found it
  • h

    helpful-continent-74245

    11/08/2018, 4:24 AM
    well you put me on the good track 🙂
  • h

    helpful-continent-74245

    11/08/2018, 5:02 AM
    Looking at the code that doesn't seem possible... The
    onObjectCreated
    calls
    createFunctionFromEventHandler
    which create the function using the following line:
    return new CallbackFunction(name, { callback: handler }, opts);
    In
    CallbackFunction
    , the
    role
    is supposed to be passed as second argument but it can only be
    { callback: handler }
    from the call
  • h

    helpful-continent-74245

    11/08/2018, 5:03 AM
    (seeing this in
    @pulumi/aws/lambda/lambdaMixins.js
    )
  • h

    helpful-continent-74245

    11/08/2018, 5:03 AM
    I guess I have to rather create the function separately but that means the simple example of passing directly a javascript function handler is not usable in a lot of case for me
  • w

    white-balloon-205

    11/08/2018, 5:08 AM
    @helpful-continent-74245 this should definitely be possible. You would need to use
    CallbackFunction
    so that you can customize the role (or other properties of the Lambda Function object), but you would still be able to pass a simple JavaScript callback. @lemon-spoon-91807 can probably share pointers to some examples of the common patterns here if you have any specific use cases in mind.
  • h

    helpful-continent-74245

    11/08/2018, 5:10 AM
    @white-balloon-205 you mean I retrieve the
    CallbackFunction
    object that has been created by
    onObjectCreated
    and customize it after ?
    w
    l
    • 3
    • 2
  • l

    lemon-spoon-91807

    11/08/2018, 5:10 AM
    Hi, i'm here 🙂 But luke has it basically down
  • l

    lemon-spoon-91807

    11/08/2018, 5:10 AM
    you'd just manually instantiate a CallbackFunction yourself
  • h

    helpful-continent-74245

    11/08/2018, 5:11 AM
    I was beginning to directly create a
    aws.lambda.Function
    and pass it to
    onObjectCreated
    , that would not work ?
  • h

    helpful-continent-74245

    11/08/2018, 5:11 AM
    no I get your point
  • h

    helpful-continent-74245

    11/08/2018, 5:12 AM
    CallbackFunction
    is the one that have the logic to use directly the javascript function
    l
    • 2
    • 8
  • w

    white-balloon-205

    11/08/2018, 5:12 AM
    Exactly.
  • h

    helpful-continent-74245

    11/08/2018, 6:43 AM
    @white-balloon-205 @lemon-spoon-91807 thanks for your help, I was able to make it work using
    CallbackFunction
    I was a bit surprised as to discover that it takes only a role object as argument instead of being able to support a role Arn like the
    Function
    class does. No big deal for me as I needed anyway to add the role creation in my script.
  • l

    lemon-spoon-91807

    11/08/2018, 6:44 AM
    I think the idea is that you can provide a Role, or just Policies, and we'll stitch it all together for you
  • s

    sparse-insurance-40223

    11/08/2018, 9:23 AM
    I'm having an issue with kube custom resources that pulumi is convinced have been deployed, but havent. Is there anything special I need to do with them?
    c
    • 2
    • 35
  • h

    helpful-continent-74245

    11/08/2018, 9:55 AM
    If I create a bucket object and uses
    bucket.id
    in the code, it will be properly resolved with the bucket id at runtime, however if I use:
    `${bucket.id}`
    It doesn't work. How do I force the proper property resolution ?
  • h

    helpful-continent-74245

    11/08/2018, 10:04 AM
    Found the solution here ! https://pulumi.io/reference/programming-model.html, I had to use
    bucket.id.apply(...)
    👍 1
  • h

    helpful-continent-74245

    11/08/2018, 2:19 PM
    Is it possible to use/retrieve the output value of one stack in another stack ?
    w
    • 2
    • 2
  • e

    early-musician-41645

    11/08/2018, 8:03 PM
    I've somehow got into a state where a resource was deleted, and doing
    pulumi up
    doesn't recreate it because it thinks it's already created. How do I get out of that state?
  • m

    microscopic-florist-22719

    11/08/2018, 8:04 PM
    pulumi refresh
    should detect this. Have you tried that?
  • e

    early-musician-41645

    11/08/2018, 8:04 PM
    Similarly, when I try to delete a resource that someone else deleted, it's failing to do so
  • e

    early-musician-41645

    11/08/2018, 8:04 PM
    error: Plan apply failed: deleting urn:pulumi:mustang-aws-iam-sandbox::mustang-aws-iam::aws:iam/policyAttachment:PolicyAttachment::mustang-sandbox-policy-attachment: [WARN] Error removing user, role, or group list from IAM Policy Detach mustang-sandbox-policy-attachment-8fc21df:
        – NoSuchEntity: Policy arn:aws:iam::redacted:policy/mustang-sandbox-dev-268502c was not found.
            status code: 404, request id: 527e938f-e391-11e8-9518-9fc117755deb
  • m

    microscopic-florist-22719

    11/08/2018, 8:04 PM
    That should also be something that
    pulumi refresh
    should handle.
Powered by Linen
Title
m

microscopic-florist-22719

11/08/2018, 8:04 PM
That should also be something that
pulumi refresh
should handle.
View count: 1