in a `aws.ecs.TaskDefinition()` resource I’d like ...
# python
m
in a
aws.ecs.TaskDefinition()
resource I’d like to use other resource attributes in the
container_definitions
parameter which requires a valid JSON document (currently declaring within
json.dumps
). However, when I try this I get the error
TypeError: Object of type Output is not JSON serializable
. Is there a way to do this?
e
Hey Josh - the whole Input/ Output thing takes some getting used to & still trips me up. Worth reading the whole section of the architecture docs to get familiar with it. Either way, you need to apply the output to the json using a closure, either via <https://www.pulumi.com/docs/intro/concepts/inputs-outputs/#apply%7C&lt;your-resource-attribute&gt;.apply()> or use Output.all() (python/ c#) or pulumi.all() (js/ ts, go)