agreeable-notebook-88887
01/15/2021, 6:17 PMbrave-planet-10645
01/15/2021, 6:35 PMwitty-candle-66007
01/15/2021, 6:50 PMimport pulumi
from pulumi import StackReference
other = StackReference(f"goo/foo/dev")
other_output = other.get_output("bucket_name");
# Export the name of the bucket
pulumi.export('other bucket_name', other_output
in that it outputs the output from stack goo/foo/dev
to the terminal.print(other_output)
because it’s not a string out there in the main body of the code. But in the apply block, it is a string and so I can treat it as such:
import pulumi
from pulumi import StackReference
other = StackReference(f"goo/foo/dev")
other_output = other.get_output("bucket_name");
# Export the name of the bucket
pulumi.export('other bucket_name', other_output)
def printval(arg):
print("printing output")
print(arg)
other_output.apply(lambda other_output: printval(other_output))
agreeable-notebook-88887
01/15/2021, 7:45 PMwitty-candle-66007
01/15/2021, 8:07 PMagreeable-notebook-88887
01/15/2021, 8:13 PMwitty-candle-66007
01/15/2021, 8:45 PMOutput.concat()
example here: https://www.pulumi.com/docs/intro/concepts/programming-model/#outputs-and-strings