Array in the read function


Previously when I implement my read function I added this where host.Name is a string:

d.Set("name", host.Name)

What about arrays ?
I have an array of string in my terraform code.

templates = ["value1","value2"]

How to implement the Set function with arrays ?


Hi @smutel,
you should be able to set primitive TypeList and TypeSet fields the same way, i.e.

d.Set("templates", []string{"value1", "value2"})