https://pulumi.com logo
#golang
Title
# golang
q

quick-king-51158

04/27/2023, 7:22 AM
whats the best practice if i like to split my pulumi.run program body to smaller/separate functions/files?
e

echoing-dinner-19531

04/27/2023, 9:56 AM
You can just split it into different function and pass the
pulumi.Context
as a parameter. You might also want to look at component resources.
q

quick-king-51158

04/27/2023, 10:03 AM
passing the context is fine, however sometimes i need to pass few more parameters too. i will look into that, thanks.
e

echoing-dinner-19531

04/27/2023, 10:15 AM
Don't overthink it too much, it's pretty much just like you'd write any other normal Go program.
q

quick-king-51158

04/27/2023, 10:19 AM
sure, thanks