This message was deleted.
# general
s
This message was deleted.
l
I think the best solution to this that I've seen is Pulumi's own aws.iam.PolicyDocument type. I presume it's used in many places, since the code is fairly generic: https://github.com/pulumi/pulumi-terraform-bridge/blob/ea90ddd011cdf688615b1fae6e705b5449dc4e7f/pkg/tfbridge/transforms.go#L26
Which type of AWS resource / JSON doc are you looking to create?
If it's not already supported, you can raise an issue. The ability to create normal objects in your language of choice, and have Pulumi convert them to the correctly-formatted JSON doc at deploy time, is a real winner.
f
I'll look at that Go code for ideas. At the moment, I'm working with an ECS container definition (https://www.pulumi.com/docs/reference/pkg/aws/ecs/taskdefinition/#container_definitions_python)
r
I’ll admit that I’m not following all the way through, but I’m wondering if passing keyword args to your
Output.all
makes a difference.
If I’ve got
pulumi.Output
values in that dictionary that I’m merging in, though, it’s not clear how I can generically manage things.
Output.all(**dict).apply(lambda args: json.dumps({**args, **env}))
f
I think I was making some silly mistakes, but using keyword args ultimately helped show me those silly mistakes (and made for more readable code!). I was able to get it working; thanks!
🎉 1
partypus 8bit 1