quiet-architect-91246
08/03/2021, 3:17 PMpulumi.Run(func(ctx *pulumi.Context) error {
output := cluster.Provider.ApplyT(func(p *kubernetes.Provider) (string, error)
appSvc, svcerr := corev1.NewService(ctx, "app-svc", &corev1.ServiceArgs{
...
},
}, pulumi.Provider(p))
ctx.Export("appIp", appSvc.Status.ApplyT(func(status *corev1.ServiceStatus) *string {
return status.LoadBalancer.Ingress[0].Ip
}))
ctx.Export("test-export", pulumi.String("testexportvalue"))
return "", nil
}).(pulumi.StringOutput)
ctx.Export("output", output)
return nil
})
Hi everyone! Im running go code like stated above, and am wondering why only the "output" ctx.Export and not "test-export" or "appIp" show up in my Stack as outputs. I assume its because its inside of an .apply()
, but cant really understand why that would stop it from working. Also since it doesnt work the way I tried, how would you go about achieving a similar result?