sparse-intern-71089
04/27/2020, 10:41 PMfast-activity-86095
04/27/2020, 10:44 PMapply
generally called in the source stack before outputting a value or in the downstream stack?
fwiw, changing the get_output to image = image_stack.get_output("image").apply(lambda x: str(x))
resulted in the same errorfancy-ice-8211
04/27/2020, 10:45 PMfancy-ice-8211
04/27/2020, 10:47 PMfancy-ice-8211
04/27/2020, 10:48 PMfast-activity-86095
04/27/2020, 10:49 PM"image": image.apply(lambda x: str(x)),
too, no luckfast-activity-86095
04/27/2020, 10:50 PMcluster_arn = infra_stack.get_output("cluster_arn")
fast-activity-86095
04/27/2020, 10:59 PMimage.apply(lambda x: print(x))
prints the string value correctly
⢠pulumi.Output.concat("", image)
and image.apply(lambda x: x)
give the errorfancy-ice-8211
04/27/2020, 11:02 PMfast-activity-86095
04/27/2020, 11:03 PMfancy-ice-8211
04/27/2020, 11:03 PMfancy-ice-8211
04/27/2020, 11:04 PMfast-activity-86095
04/27/2020, 11:31 PMjson.dumps
. It needs to be:
container_definitions = image.apply(
lambda image: json.dumps(
[
{
"name": "my-app",
"image": image,
"portMappings": [{"containerPort": port, "protocol": "tcp"}],
}
]
)
)
task_definition = ecs.TaskDefinition(
name,
family=name,
cpu="256",
memory="512",
network_mode="awsvpc",
requires_compatibilities=["FARGATE"],
execution_role_arn=role.arn,
container_definitions=container_definitions,
opts=child_opts,
)