https://pulumi.com logo
#golang
Title
# golang
s

strong-dusk-45926

12/01/2020, 7:53 AM
Hi, Is there a way to convert map[string]interface{} to Pulumi.Map?
c

clever-byte-21551

12/01/2020, 8:14 AM
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

lemon-agent-27707

12/01/2020, 5:51 PM
You'll need to iterate through the map
Copy code
var m pulumi.Map
for k, v := range myMap {
m[k] = pulumi.Any(v)
}
3 Views