breezy-agency-15661
12/13/2019, 1:48 AMaws.cloudwatch.onSchedule("test", "rate(1 minute)", async (event) => {
try {
console.log(`current time: ${Date.now()}`);
} catch (e) {
console.log(e);
}
});
breezy-agency-15661
12/13/2019, 1:49 AMsquare-rocket-59657
12/13/2019, 2:19 AMlambda
to the onSchedule as it accepts a handler something like:
const lambda = new aws.lambda.Function("myfunc", {
code: undefined,
role: ";)",
handler: "index.handler",
runtime: aws.lambda.NodeJS10dXRuntime
},
{}
);
aws.cloudwatch.onSchedule("test", "rate(1 minute)", lambda.handler);
breezy-butcher-78604
12/13/2019, 6:34 AMpulumi plugin install KIND NAME VERSION
but i’d prefer to just grab the latest (and not provide a version) is this possible? or will i need to always pass a specific version number?breezy-butcher-78604
12/13/2019, 7:15 AMincalculable-diamond-5088
12/13/2019, 11:03 AMgoroutine 280 [running]:
<http://github.com/pulumi/pulumi/pkg/util/contract.failfast(...)|github.com/pulumi/pulumi/pkg/util/contract.failfast(...)>
/home/travis/gopath/src/github.com/pulumi/pulumi/pkg/util/contract/failfast.go:23
<http://github.com/pulumi/pulumi/pkg/util/contract.Assert(...)|github.com/pulumi/pulumi/pkg/util/contract.Assert(...)>
/home/travis/gopath/src/github.com/pulumi/pulumi/pkg/util/contract/assert.go:26
<http://github.com/pulumi/pulumi/pkg/resource/plugin.(*provider).Diff(0xc0036c9f20|github.com/pulumi/pulumi/pkg/resource/plugin.(*provider).Diff(0xc0036c9f20>, 0xc006027e00, 0xea, 0x0, 0x0, 0xc002a1ca50, 0xc001ed8d20, 0x203001, 0x0, 0x0, ...)
/home/travis/gopath/src/github.com/pulumi/pulumi/pkg/resource/plugin/provider_plugin.go:504 +0x15ba
<http://github.com/pulumi/pulumi/pkg/resource/deploy.diffResource(0xc006027e00|github.com/pulumi/pulumi/pkg/resource/deploy.diffResource(0xc006027e00>, 0xea, 0x0, 0x0, 0xc002a1c7b0, 0xc002a1ca50, 0xc001ed8d20, 0x19d5340, 0xc0036c9f20, 0xc004632501, ...)
/home/travis/gopath/src/github.com/pulumi/pulumi/pkg/resource/deploy/step_generator.go:1049 +0x118
<http://github.com/pulumi/pulumi/pkg/resource/deploy.(*stepGenerator).diff(0xc0057c7440|github.com/pulumi/pulumi/pkg/resource/deploy.(*stepGenerator).diff(0xc0057c7440>, 0xc006027e00, 0xea, 0xc0029b6b00, 0xc00330e900, 0xc002a1c7b0, 0xc002a1ca50, 0xc001ed8d20, 0x19d5340, 0xc0036c9f20, ...)
/home/travis/gopath/src/github.com/pulumi/pulumi/pkg/resource/deploy/step_generator.go:1037 +0x30d
<http://github.com/pulumi/pulumi/pkg/resource/deploy.(*stepGenerator).generateStepsFromDiff(0xc0057c7440|github.com/pulumi/pulumi/pkg/resource/deploy.(*stepGenerator).generateStepsFromDiff(0xc0057c7440>, 0x7f6ab8111fc0, 0xc00486efa0, 0xc006027e00, 0xea, 0xc0029b6b00, 0xc00330e900, 0xc002a1c7b0, 0xc002a1ca50, 0xc001ed8d20, ...)
/home/travis/gopath/src/github.com/pulumi/pulumi/pkg/resource/deploy/step_generator.go:499 +0xf6
<http://github.com/pulumi/pulumi/pkg/resource/deploy.(*stepGenerator).generateSteps(0xc0057c7440|github.com/pulumi/pulumi/pkg/resource/deploy.(*stepGenerator).generateSteps(0xc0057c7440>, 0x7f6ab8111fc0, 0xc00486efa0, 0xc00119d200, 0x3, 0xc001401aa0, 0x1, 0xc00119d200)
/home/travis/gopath/src/github.com/pulumi/pulumi/pkg/resource/deploy/step_generator.go:432 +0xead
<http://github.com/pulumi/pulumi/pkg/resource/deploy.(*stepGenerator).GenerateSteps(0xc0057c7440|github.com/pulumi/pulumi/pkg/resource/deploy.(*stepGenerator).GenerateSteps(0xc0057c7440>, 0x7f6ab8111fc0, 0xc00486efa0, 0x7f6ab8111fc0, 0xc00486efa0, 0x1, 0xc001401ac0, 0x45d9c0)
/home/travis/gopath/src/github.com/pulumi/pulumi/pkg/resource/deploy/step_generator.go:155 +0x5a
<http://github.com/pulumi/pulumi/pkg/resource/deploy.(*planExecutor).handleSingleEvent(0xc00577b200|github.com/pulumi/pulumi/pkg/resource/deploy.(*planExecutor).handleSingleEvent(0xc00577b200>, 0x1988bc0, 0xc00486efa0, 0x0, 0x1)
/home/travis/gopath/src/github.com/pulumi/pulumi/pkg/resource/deploy/plan_executor.go:361 +0x138
<http://github.com/pulumi/pulumi/pkg/resource/deploy.(*planExecutor).Execute.func3(0xc005879440|github.com/pulumi/pulumi/pkg/resource/deploy.(*planExecutor).Execute.func3(0xc005879440>, 0xc00577b200, 0xc005726bf0, 0x19b4280, 0xc001e25c80, 0x0, 0x0, 0x19b4340, 0xc00570a030, 0x0, ...)
/home/travis/gopath/src/github.com/pulumi/pulumi/pkg/resource/deploy/plan_executor.go:235 +0x210
<http://github.com/pulumi/pulumi/pkg/resource/deploy.(*planExecutor).Execute(0xc00577b200|github.com/pulumi/pulumi/pkg/resource/deploy.(*planExecutor).Execute(0xc00577b200>, 0x19b4340, 0xc00570a030, 0x19b4680, 0xc0057c70e0, 0x7fffffff, 0x0, 0x0, 0x0, 0x0, ...)
/home/travis/gopath/src/github.com/pulumi/pulumi/pkg/resource/deploy/plan_executor.go:251 +0x7da
<http://github.com/pulumi/pulumi/pkg/resource/deploy.(*Plan).Execute(...)|github.com/pulumi/pulumi/pkg/resource/deploy.(*Plan).Execute(...)>
/home/travis/gopath/src/github.com/pulumi/pulumi/pkg/resource/deploy/plan.go:335
<http://github.com/pulumi/pulumi/pkg/engine.(*planResult).Walk.func1(0x19b4680|github.com/pulumi/pulumi/pkg/engine.(*planResult).Walk.func1(0x19b4680>, 0xc0057c70e0, 0xc0057c6ea0, 0x19b4340, 0xc00570a030, 0xc00570a001, 0xc005726b20, 0xc005878ba0)
/home/travis/gopath/src/github.com/pulumi/pulumi/pkg/engine/plan.go:192 +0x24a
created by <http://github.com/pulumi/pulumi/pkg/engine.(*planResult).Walk|github.com/pulumi/pulumi/pkg/engine.(*planResult).Walk>
/home/travis/gopath/src/github.com/pulumi/pulumi/pkg/engine/plan.go:178 +0x177
incalculable-diamond-5088
12/13/2019, 11:03 AMadamant-motorcycle-38425
12/13/2019, 12:55 PMconst SingleRunFargateTaskProvider = {
async create(inputs) {
const id = crypto.randomBytes(16).toString("hex");
const result = await inputs.fargateTaskDefn.run({
cluster: inputs.ecsCluster
});
return { id };
}
};
However I receive this Error:
error: update failed
pulumi-nodejs:dynamic:Resource (repro-customfgtask):
error: inputs.fargateTaskDefn.run is not a function
When I inspect the inputs, inputs.fargateTaskDefn is at that runtime, a string URN.
Any guidance on how to make this work would be really appreciated! (My eventual use-case will be a database migration task that I tie to my RDS resource's lifetime).
P.S/Sidenote: I am modelling this after the lambda/fargate example that captures a reference to a FargateTaskDefinition and uses the run() call at runtime (and I've tested that scenario/function serialization works fine. See: https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/awsx/ecs/#task-definitions):
const helloTask = new awsx.ecs.FargateTaskDefinition("hello-world", {
container: {
image: "hello-world",
memory: 20,
},
});
const api = new awsx.apigateway.API("examples-containers", {
routes: [{
path: "/run",
method: "GET",
eventHandler: async (req) => {
const result = await helloTask.run({ cluster });
return { statusCode: 200, body: "OK" };
},
}],
});
steep-printer-55468
12/13/2019, 2:22 PMindex.ts
to pull in various modules, then I switch on pulumi.getStack()
to execute the right "stack module" for the selected stack. Is there a better way to organize around multiple stacks or is that the more or less standard way to do it?cuddly-leather-18640
12/13/2019, 3:00 PMbillowy-laptop-45963
12/13/2019, 4:58 PMgithub_repository_webhook
?rhythmic-hair-33677
12/13/2019, 6:28 PMbroad-boots-45639
12/13/2019, 6:52 PMpanic: fatal: An assertion has failed: Kubernetes GVK is: "urn:pulumi:nyc1-stage::kubernetes::digitalocean:index/kubernetesNodePool:KubernetesNodePool::kubernetes-secondary"
broad-boots-45639
12/13/2019, 6:53 PMconst cluster = new digitalocean.KubernetesCluster(project_name, {
region: digitalocean.Regions.NYC1,
version: "1.15.5-do.2",
nodePool: {
name: `pulumi-${env}-default-nodepool`,
size: "c-4",
autoScale: true,
minNodes: 2,
maxNodes: 6
}
});
export const kubeconfig = cluster.kubeConfigs[0].rawConfig;
export const clusterName = digitalocean.KubernetesCluster.name;
export const clusterID = cluster.id;
const provider = new kubernetes.Provider("do-k8s", { kubeconfig })
const nodepool_name = `${project_name}-secondary`;
const node_pool = new digitalocean.KubernetesNodePool(nodepool_name, {
name: nodepool_name,
clusterId: cluster.id,
size: "c-32",
autoScale: true,
minNodes: 1,
maxNodes: 3
}, { provider, dependsOn: cluster } );
broad-boots-45639
12/13/2019, 6:53 PMbreezy-agency-15661
12/13/2019, 7:06 PMlet secret = await aws.ssm.getParameter({
name: "passwordParameter"
});
console.log(secret.value);
rhythmic-hair-33677
12/13/2019, 8:01 PMbreezy-agency-15661
12/13/2019, 8:14 PMaws.cloudwatch.onSchedule("test", "rate(1 minute)", async (event) => {
try {
let secret = await MYSSM.getValue("mySecret");
console.log(secret);
console.log(`current time: ${Date.now()}`);
} catch (e) {
console.log(e);
}
});
breezy-agency-15661
12/13/2019, 8:16 PMnice-airport-15607
12/13/2019, 11:06 PMerror: aws:lambda/function:Function resource 'someLambda' has a problem: expected runtime to be one of [dotnetcore1.0 dotnetcore2.0 dotnetcore2.1 go1.x java8 nodejs4.3 nodejs4.3-edge nodejs6.10 nodejs8.10 nodejs10.x provided python2.7 python3.6 python3.7 ruby2.5], got nodejs12.x
nice-airport-15607
12/13/2019, 11:17 PMred-garage-90347
12/15/2019, 3:56 AMvictorious-xylophone-55816
12/15/2019, 4:08 AMambitious-ram-5811
12/15/2019, 4:11 AMambitious-ram-5811
12/15/2019, 4:11 AMambitious-ram-5811
12/15/2019, 4:12 AMvictorious-xylophone-55816
12/15/2019, 4:13 AMpulumi up
once in the beginning to get your stack up on your cloud provider?victorious-xylophone-55816
12/15/2019, 4:13 AMvictorious-xylophone-55816
12/15/2019, 4:15 AMdocker-compose
to set up the services, and then only build + push/deploy the app code Docker container to k8s, while other do Kubernetes-native development by live-sync`ing their local files to a k8s service)victorious-xylophone-55816
12/15/2019, 4:16 AMvictorious-xylophone-55816
12/15/2019, 4:16 AM