0
I’m using the Terraform to climb my below in the Linode, everything goes very well, however, I am not able to format the output the way you would like it. My Output Variables is like this:
output "info" {
value = {
for vm in linode_instance.vm:
vm.label => vm.ip_address
}
}
The above code gives me an output as can be observed below:
info = {
"jenkins-master" = "74.272.12.15"
"jenkins-slave" = "50.163.31.24"
}
But I’d like something close to that:
info = [{
"label" = "jenkins-master"
"ip" = "74.272.12.15"
},{
"label" = "jenkins-slave"
"ip" = "50.163.31.24"
}]
Terraform offers features that allow you to format the output in this way? How to do this?