https://pulumi.com logo
Title
e

early-analyst-76866

11/15/2022, 3:06 PM
I followed the automation API tutorial: https://github.com/pulumi/automation-api-examples/blob/main/python/inline_program/main.py In a different python file I am running this code:
import pulumi

stack_ref = pulumi.StackReference("inline_s3_project/dev")
obj = {"website_url": stack_ref.get_output("website_url").apply(
    lambda s3_url: "https://" + s3_url
)}
print(obj)
The output that I am getting still shows me the object and not the value:
{'website_url': <pulumi.output.Output object at 0x109f9f2b0>}
b

brave-planet-10645

11/15/2022, 4:47 PM
Simple answer: the return type of
apply()
is still an output. To get the entire object you could do:
print(Output.format("{0}",obj))
and I think that will do what you want