sparse-intern-71089
07/15/2022, 1:20 AMquaint-bird-18760
07/15/2022, 5:14 AMOutput<string> in a place where only string is accepted, which will cause the Output<string> to be rendered as an error message telling you that you're calling toString on an unresolved Output, which is likely to be > 255 characters. If the place where you use only accepts string and not Output<string>, you need to call apply on the Output<string> to perform the action on the string that the Output<string> eventually resolves to asynchronously, e.g.:
const imageOutput: Output<string> = ...
imageOutput.apply((image: string) => {
// do something with image, which is the string the imageOutput resolves to
})
Hope that helps!rhythmic-branch-12845
11/25/2022, 5:25 PMimage name in a task definition file, and it just flatly refuses to accept the ecr repository’s .repository_url, even if I try to use apply on it), what good is it?billowy-army-68599
apply wrongbillowy-army-68599
billowy-army-68599
rhythmic-branch-12845
11/26/2022, 5:43 AMrepository = aws.ecr.Repository(...)
task_definition = aws.ecs.TaskDefinition(...
container_definitions = json.dumps(
[
{
'image': repository.repository_url.apply(lambda v: f'{ v }'),
...
}
]
),
...
)
which gives me
TypeError: Object of type Output is not JSON serializablebillowy-army-68599
rhythmic-branch-12845
11/26/2022, 5:53 AMrhythmic-branch-12845
11/26/2022, 5:56 AM