ambitious-article-39970
07/05/2021, 11:58 AM```task_definition = aws.ecs.TaskDefinition('pulumi-app-task',
family='fargate-task-definition',
cpu='256',
memory='512',
network_mode='awsvpc',
tags = global_tags,
requires_compatibilities=['FARGATE'],
execution_role_arn=role.arn,
container_definitions=json.dumps([{
'secrets' : json.dumps([{'db_password': f"{db_password.id}"}]),
'name': 'pulumi-test-app',
'image': 'nginx',
'portMappings': [{
'containerPort': 80,
'hostPort': 80,
'protocol': 'tcp'
}]
}])
)
having issues with this line 'secrets' : json.dumps([{'db_password': f"{db_password.id}"}]),
I assume this is because its returning an aws ARN im getting an unmarshelled string error converting to json. is this the case? rror: aws:ecs/taskDefinition:TaskDefinition resource 'pulumi-app-task' has a problem: ECS Task Definition container_definitions is invalid: Error decoding JSON: json: cannot unmarshal string into Go struct field ContainerDefinition.Secrets of type []*ecs.Secret. Examine values at 'TaskDefinition.ContainerDefinitions'.
im new to pulumi and havent quite figured out how to use a debugger with it yet so havning to guess alot at what values which come back look like.
(I know the second json dumps isnt needed but there for debugging)billowy-army-68599
ambitious-article-39970
07/05/2021, 3:32 PMgreat-sunset-355
07/08/2021, 5:25 AMOutput.all
for each level of the structure that contains outputs
+ you cannot use json.dumps(json.dumps())
the inner JSON will produce escaped json string which is what you do not want