orange-tailor-85423
11/07/2018, 11:56 PMstocky-spoon-28903
11/07/2018, 11:56 PMorange-tailor-85423
11/07/2018, 11:57 PMstocky-spoon-28903
11/07/2018, 11:58 PMget
workflow is much neater - I think both of your issues around that are resolved.helpful-continent-74245
11/08/2018, 4:16 AMbucket.onObjectCreated
function ?helpful-continent-74245
11/08/2018, 4:23 AMconst bucket = new aws.s3.Bucket("my-bucket", { bucket: "my-bucket" });
(just bucket
option instead of name
)busy-umbrella-36067
11/08/2018, 4:23 AMhelpful-continent-74245
11/08/2018, 4:24 AMhelpful-continent-74245
11/08/2018, 5:02 AMonObjectCreated
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 callhelpful-continent-74245
11/08/2018, 5:03 AM@pulumi/aws/lambda/lambdaMixins.js
)helpful-continent-74245
11/08/2018, 5:03 AMwhite-balloon-205
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.helpful-continent-74245
11/08/2018, 5:10 AMCallbackFunction
object that has been created by onObjectCreated
and customize it after ?lemon-spoon-91807
11/08/2018, 5:10 AMlemon-spoon-91807
11/08/2018, 5:10 AMhelpful-continent-74245
11/08/2018, 5:11 AMaws.lambda.Function
and pass it to onObjectCreated
, that would not work ?helpful-continent-74245
11/08/2018, 5:11 AMhelpful-continent-74245
11/08/2018, 5:12 AMCallbackFunction
is the one that have the logic to use directly the javascript functionwhite-balloon-205
helpful-continent-74245
11/08/2018, 6:43 AMCallbackFunction
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.lemon-spoon-91807
11/08/2018, 6:44 AMsparse-insurance-40223
11/08/2018, 9:23 AMhelpful-continent-74245
11/08/2018, 9:55 AMbucket.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 ?helpful-continent-74245
11/08/2018, 10:04 AMbucket.id.apply(...)
helpful-continent-74245
11/08/2018, 2:19 PMearly-musician-41645
11/08/2018, 8:03 PMpulumi up
doesn't recreate it because it thinks it's already created. How do I get out of that state?microscopic-florist-22719
pulumi refresh
should detect this. Have you tried that?early-musician-41645
11/08/2018, 8:04 PMearly-musician-41645
11/08/2018, 8:04 PMerror: 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
microscopic-florist-22719
pulumi refresh
should handle.