sparse-intern-71089
10/21/2020, 9:26 PMgentle-diamond-70147
10/21/2020, 10:40 PMTF_LOG=DEBUG pulumi up --debug
to see what the actual API request to AWS looks like.high-morning-17948
10/22/2020, 1:47 AMhigh-morning-17948
10/22/2020, 1:52 AMgentle-diamond-70147
10/22/2020, 1:52 AMhigh-morning-17948
10/22/2020, 1:53 AM--debug
. I'll send you the print shortlyhigh-morning-17948
10/22/2020, 2:03 AMpulumi:pulumi:Stack booksloth-import-dev running debug: RegisterResource RPC prepared: t=aws:batch/jobDefinition:JobDefinition, name=booksloth-import-dev-importLauncher-job-definition
pulumi:pulumi:Stack booksloth-import-dev running debug: RegisterResource RPC finished: resource:booksloth-import-dev-importLauncher-job-definition[aws:batch/jobDefinition:JobDefinition]; err: null, resp: urn:pulumi:dev::booksloth-import::aws:batch/jobDefinition:JobDefinition::booksloth-import-dev-importLauncher-job-definition,,__defaults,,,,,,,containerProperties,,,{"image":"import/launcher","command":["node","index.js"],"memory":2000,"jobRoleArn":"arn:aws:iam::062155736059:role/booksloth-import-dev-importLauncher-job-role","environment":[{"name":"NODE_ENV","value":"dev"},{"name":"APP_VARS","value":"{\"resourcePrefix\":\"booksloth-import-dev\",\"retry\":{\"retires\":3,\"minTimeout\":200,\"maxTimeout\":1000}}"},{"name":"BOOKSLOTH_API_VARS","value":"Calling [toJSON] on an [Output<T>] is not supported.\n\nTo get the value of an Output as a JSON value or JSON string consider either:\n 1: o.apply(v => v.toJSON())\n 2: o.apply(v => JSON.stringify(v))\n\nSee <https://pulumi.io/help/outputs> for more details.\nThis function may throw in a future version of @pulumi/pulumi."}]},name,,,booksloth-import-dev-importLauncher-job-definition,parameters,,,,,BATCH_MESSAGE,,,Empty,__defaults,,,,,,,retryStrategy,,,,,__defaults,,,,,,,attempts,,3,tags,,,,,Environment,,,development,__defaults,,,,,,,timeout,,,,,__defaults,,,,,,,attemptDurationSeconds,,3600,type,,,container,,
high-morning-17948
10/22/2020, 2:28 AMgentle-diamond-70147
10/22/2020, 3:17 AMbookslothApiVars
in your code? It looks like that needs to be .apply
as well.
You can apply multiple values with .all
- e.g. https://www.pulumi.com/docs/intro/concepts/programming-model/#all.high-morning-17948
10/22/2020, 3:28 AMbookslothApiVars
value. Stlil had the same problem. The issue was the container image. I was using this to build the image:
const img = awsx.ecs.Image.fromPath('import/launcher', "../");
and it wants and image from a ecr repository. So building the image like this:
const img = awsx.ecr.buildAndPushImage(`${config.prefix}-${serviceName}-img`, '../', {
tags: {
Environment: config.env,
},
})
and passing img.imageValue to containerProperties fix it.high-morning-17948
10/22/2020, 3:31 AMcontainerProperties
It would be helpful to add it, since I had to go to API_RegisterJobDefinition to check the format.gentle-diamond-70147
10/22/2020, 4:32 AMgreen-daybreak-91402
10/22/2020, 12:42 PM