echoing-rain-5741
07/06/2020, 2:48 PMpulumi.Output
and a Pulumi.OutputState
. I’m creating a config file ( in the form of a pulumi.StringMap
) that includes various references to other pulumi resources, hence I used the pulumi.All(arg1, arg2,...).ApplyT(func(args []interface{}) (pulumi.StringMap,error){...})
(as suggested in the docs,) which supposedly returns a pulumi.Output
To be able to use it to create a kubernetes ConfigMap, i need to have a OutputState. What would the best way be to convert the output to the output state be, and what is the difference? I managed to convert the pulumi.Output
config to a output state using configMapData.Apply(func(x interface{}) (interface{}, error) { return x, nil }).OutputState
but this seems overly convoluted.white-balloon-205
To be able to use it to create a Kubernetes ConfigMap, I need to have an OutputStateThis should not be the case. You should be able to use an Output as an input to a ConfigMap. In general, you shouldn’t need to work with OutputState directly unless you are building your own new kinds of Outputs. Could you share the ConfigMap code perhaps?
echoing-rain-5741
07/07/2020, 8:57 AMApplyT
, I understod that you can just cast the return value to a corresponding “registered” type. In my case i was returning a pulumi.StringMap
, which apearantly doesn’t have a pulumi.StringMapOutput
registered as its output type. If I return a map[string]string
however, I’m able to cast the return value to a pulumi.StringMapOutput
which kubernetes.ConfigMapArgs
accepts. Is there any list of types with registered output types?lemon-agent-27707
07/07/2020, 2:06 PM