echoing-librarian-76448
09/29/2021, 4:57 PMctx.Export
inside of an .ApplyT
function, the export doesn't happen. Is this the expected behavior?
Here's a code example:
aksVNet.ID().ToStringOutput().ApplyT(func(id string) error {
applicationAKSSubnetID := fmt.Sprintf("%s/subnets/Application", id)
var clusterInput *aks.ClusterInput
if err := cfg.TryObject(appAKSClusterConfigKey, &clusterInput); err != nil {
return err
}
cluster, err = aks.CreateAKSCluster(ctx,
clusterInput,
applicationAKSSubnetID,
commonTags)
if err != nil {
return err
}
ctx.Export("clusterName", cluster.Name)
return nil
})
bored-table-20691
09/29/2021, 4:58 PMechoing-librarian-76448
09/29/2021, 5:00 PMpulumi.StringOutput
that I haven't found another way to access without .ApplyT
pulumi.StringOutput
type? I could refactor our code to not need the plain string if it's possible.bored-table-20691
09/29/2021, 7:49 PMlemon-agent-27707
09/30/2021, 1:00 AMidOutput := val.Apply( v => ...someTransform.. return v.id);
ctx.export("idOutput", idOutput)
echoing-librarian-76448
10/06/2021, 2:56 PMpulumi.StringInput
as a parameter instead of String
I was able to avoid using ApplyT
after making that switch. Thanks for the guidance on this