Hi, Is there a way to convert map[string]interface...
# golang
s
Hi, Is there a way to convert map[string]interface{} to Pulumi.Map?
c
pulumi.Map
is basically a
map[string]Input
So you can write a function that uses reflection and constructs map properly (note that you will need to convert each type to its pulumi counterpart)
l
You'll need to iterate through the map
Copy code
var m pulumi.Map
for k, v := range myMap {
m[k] = pulumi.Any(v)
}