sparse-intern-71089
07/08/2021, 8:38 PMbillowy-army-68599
billowy-army-68599
green-intern-27665
07/08/2021, 8:54 PMbillowy-army-68599
green-intern-27665
07/08/2021, 8:58 PMgreen-intern-27665
07/08/2021, 9:16 PMenviroment
property like in the example with a fixed structure I have a variable array I need to find a way to unwrap all the outputs inside that array but I guess that I can use another Output.all to construct that arraygreen-intern-27665
07/08/2021, 9:16 PMgreen-intern-27665
07/08/2021, 9:16 PMgreen-intern-27665
07/09/2021, 6:29 AMenv_var
array in this way:
env_vars = Output.all(env_var1, env_var2).apply(
lambda args: [
{
'name': 'TEST_VAR1',
'value':args[0]
},
{
'name': 'TEST_VAR2',
'value':args[1]
}
]
)
and this output is passed to the client that generates the ECS task where the env vars are injected in this way:
return Output.all(image=image.image_name, envVars=envVars).apply(
lambda args: json.dumps([{
'name': name,
'image': args['image'],
'portMappings': [{
'containerPort': 8080,
'hostPort': 8080,
'protocol': 'tcp'
}],
'environment': args['envVars']
}])
)
Again Thanks for your help!!billowy-army-68599