Files
opentf/command
James Nugent 7aec98237c core: Format empty lists and maps in output
`terraform output` and it's brethren now consolidate empty maps and
lists on a single line of output instead of the pathological behaviour
of taking three lines previously. The same code paths are used across
all output mechanisms:

```
$ cat main.tf
variable "emptystring" {
    type = "string"
    default = ""
}

variable "emptylist" {
    type = "list"
    default = []
}

variable "emptymap" {
    type = "map"
    default = {}
}

output "emptystring" {
    value = "${var.emptystring}"
}

output "emptylist" {
    value = "${var.emptylist}"
}

output "emptymap" {
    value = "${var.emptymap}"
}

$ terraform apply

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

Outputs:

emptylist = []
emptymap = {}
emptystring =

$ terraform output
emptylist = []
emptymap = {}
emptystring =

$ terraform show

Outputs:

emptylist = []
emptymap = {}
emptystring =
```
2016-06-12 11:47:25 +02:00
..
2016-05-26 19:56:03 -05:00
2016-05-11 13:02:34 -07:00
2016-05-11 13:02:35 -07:00
2016-05-26 19:56:03 -05:00
2016-05-10 14:49:14 -04:00
2016-05-11 09:16:48 -07:00
2016-05-10 13:25:42 -07:00
2016-05-10 14:14:47 -04:00
2016-05-10 17:03:58 -07:00
2016-05-10 17:03:58 -07:00
2016-05-26 19:56:03 -05:00
2016-05-26 19:56:03 -05:00