rough-oyster-77458
03/11/2022, 2:40 PMpulumi.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 onlyechoing-dinner-19531
03/11/2022, 2:46 PMpulumi.export
is for saving values as stack outputs so that pulumi stack output
and StackReferences can see them.rough-oyster-77458
03/11/2022, 9:20 PMpl.export('my_var', 'some string')
Do you mean I can import it like this:
import my_var
Are you sure it's gonna work?echoing-dinner-19531
03/11/2022, 10:03 PMpulumi stack output
If you want to import a variable in another python file, just import it. There is nothing Pulumi specific about this, its just python.