In general I have noticed the Pulumi AI and the do...
# general
f
In general I have noticed the Pulumi AI and the docs always export at the end of the deployment script. Is this best practice and why? I have found that putting my export statements after declaring the resource to be helpful as I don’t have to remember to do it later.
d
Both approaches are valid. I found there's not a huge amount of benefit to centralising exports in code as it's easy to find them through the cli. However it does mean that added logic relating to exports is kept away from the code relating to setting up resources. For the most part, I exported close to where the resource/config is loaded too