Hi dear community, May I ask a question? I'm quite...
# python
r
Hi dear community, May I ask a question? I'm quite new to Pulumi, so I apologise if it might seem silly. I use
pulumi.export()
to export a variable in
file1.py
. I'm going to use this variable in
file2.py
Is there any way to get this variable in
file2.py
? So far I have found how to import this variable in CLI only
b
is file2.py in the same Pulumi project, or a new one?
r
hi, the same one
a
are they two different stacks?
Copy code
import pulumi

config = pulumi.Config()
stack = pulumi.get_stack()
org = config.require("org")

stack_ref = pulumi.StackReference(f"{org}/my-first-app/{stack}")

pulumi.export("shopUrl", stack_ref.get_output("url"))