little-book-13693
06/23/2022, 7:01 PMif "foo" in outputs:
TypeError: argument of type 'Output' is not iterable
billowy-army-68599
stack_reference.output.apply(lambda: i if i // do something
little-book-13693
06/23/2022, 7:11 PMbillowy-army-68599
little-book-13693
06/23/2022, 7:13 PMoutputs = stack_reference.outputs.apply(lambda outputs: [output for output in outputs])
pulumi.export("outputs", outputs)
def stack_contains_output(stack_reference, output_name):
return outputs.apply(lambda outputs: True if output_name in outputs else False)
billowy-army-68599
apply
you can treat the object like a standard object because it's now resolved, so you can check however you'd likelittle-book-13693
06/23/2022, 7:17 PMbillowy-army-68599
little-book-13693
06/23/2022, 7:19 PM