sparse-insurance-40223
09/25/2018, 8:17 AMbrainy-gpu-17825
09/25/2018, 11:58 AMadventurous-jordan-10043
09/25/2018, 12:13 PMfactoryFunc
of aws.serverless.Function
. Not sure if the global approach is the best but it’s really cool to have thatadventurous-jordan-10043
09/25/2018, 12:14 PMsparse-insurance-40223
09/25/2018, 1:13 PMsparse-insurance-40223
09/25/2018, 2:34 PMfew-football-67858
09/25/2018, 2:55 PMfull-dress-10026
09/25/2018, 5:39 PMaws.getCallerIdentity()
, that return a Promise instead of an Output be used?stocky-spoon-28903
09/25/2018, 5:40 PMawait
themstocky-spoon-28903
09/25/2018, 5:40 PMpulumi.Input
IIRCmicroscopic-florist-22719
stocky-spoon-28903
09/25/2018, 5:40 PMawait
if you need to use the value in control flowmicroscopic-florist-22719
white-balloon-205
let serviceVpcId = service.ecsService.networkConfiguration.apply(async (networkConfig) => {
let subnetId = networkConfig["subnets"][0];
let subnet = await aws.ec2.getSubnet({ id: subnetId });
return subnet.vpcId;
});
full-dress-10026
09/25/2018, 5:42 PMgetCallerIdentity()
is used independently -- not in the apply
of an output.white-balloon-205
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.full-dress-10026
09/25/2018, 5:48 PMlet awsAccountId = aws.getCallerIdentity().then((value => {
return value.accountId;
}));
full-dress-10026
09/25/2018, 6:06 PMfull-dress-10026
09/25/2018, 6:10 PMproud-tiger-5743
09/25/2018, 6:32 PMfull-dress-10026
09/25/2018, 7:52 PMapply
function to do IO?full-dress-10026
09/25/2018, 7:54 PMwhite-balloon-205
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).stocky-spoon-28903
09/25/2018, 9:02 PMstocky-spoon-28903
09/25/2018, 9:03 PMhelpful-vegetable-35581
09/25/2018, 9:04 PMwhite-balloon-205
pulumi.runtime.isDryRun
is available to manually test. Shouldn't normally be needed - but does allow control when it is necessary.full-dress-10026
09/25/2018, 10:31 PMproud-tiger-5743
09/25/2018, 10:37 PMserverless
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] });
fresh-flag-12765
09/26/2018, 2:23 AMcloud.Task#run
) on creating a resource? Or is this straying too far away from the scope of pulumi?