https://pulumi.com logo
#general
Title
# general
b

bumpy-byte-21437

07/04/2022, 2:47 PM
hi somebody has some example in go how to create and reference outputs between packages?
b

billowy-army-68599

07/04/2022, 2:48 PM
between packages? or stacks?
b

bumpy-byte-21437

07/04/2022, 2:49 PM
between packages
i want to consume the output as input and don’t break the dependency
for example the aks package want some id from the acr package
b

billowy-army-68599

07/04/2022, 2:55 PM
any output from one package is allowed as an input to another
if you pass an output from resource A to resource B Pulumi creates a dependency for you
you shouldn't have to think about it too much
b

bumpy-byte-21437

07/04/2022, 2:57 PM
yeah i’m used to terraform.. but it is possible to consume those outputs directly between packages right?
or should it go through your main entry point?
b

billowy-army-68599

07/04/2022, 3:00 PM
i'm having a hard time following here, when you say package you mean your own Go package you've defined? or the packages exposed as part of the provider?
b

bumpy-byte-21437

07/04/2022, 3:01 PM
a local package
custom
b

billowy-army-68599

07/04/2022, 3:02 PM
I'm still not following I'm afraid, sorry
b

bumpy-byte-21437

07/04/2022, 3:02 PM
so i have two different packages called acr.go and aks.go and they need stuff from eachother using outputs
but they still need to be implicitly linked
terraform uses modules.. and to exchange data between modules you have to reference it through main.tf where you can consume those outputs
b

billowy-army-68599

07/04/2022, 3:04 PM
4 Views