Hi guys! I have a pulumi python code that deploys ...
# general
a
Hi guys! I have a pulumi python code that deploys some resources and exports the output using “pulumi.export”. I want to output those exports to a file, but when trying the python native “with open write” function, it only writes the Output as for the preview (“None”). i can do it with the “pulumi stack output” call, but this way only works after the resources have been deployed. I need the export to the file to happen as soon as the Pulumi code runs (meaning inside the code). can anyone help?
b
@aloof-dress-1001 you need to use an apply. There's more information in here including an example of what you're trying to do https://leebriggs.co.uk/blog/2021/05/09/pulumi-apply.html