variable "payload" { description = "Payload informations" type = any default = {} } resource "local_file" "ansible_inventory" { filename = "inventory.txt" content = templatefile("${path.module}/inventory.tmpl", { ip_addrs = ["10.0.0.1", "10.0.0.2"] } ) } # tutu = ["bli", "blaaah"] #toto = "${var.payload}"