but I then realised then I'd lose the ability to r...
# golang
a
but I then realised then I'd lose the ability to reference a resource created in a different function - so would I then want to return the *Vpc object and accept it as a parameter like
func createSubnets(ctx *pulumi.Context, vpc *ec2.Vpc) err {}
? Am I attempting something stupid here?
b
@ambitious-salesmen-39356 generally you'd create components which accept inputs via a struct. then register outputs which lets you access those components, see here: https://github.com/jaxxstorm/pulumi-productionapp/blob/main/provider/pkg/provider/productionApp.go