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-09 15:46:07 -04:00
2016-05-26 19:56:03 -05:00
2016-05-18 13:25:20 -05:00
2016-05-18 13:25:20 -05:00
2015-11-09 11:38:51 -05:00
2015-11-24 16:00:02 -06:00
2016-04-27 07:37:47 -05:00
2016-04-29 00:39:53 +01:00
2016-05-29 22:18:44 -07:00
2016-05-31 17:13:04 -05:00
2016-01-20 13:58:02 -06:00
2016-05-29 22:18:44 -07:00
2016-05-11 13:02:34 -07:00
2016-05-11 13:02:35 -07:00
2016-02-05 06:26:12 -06:00
2016-02-05 06:26:12 -06:00
2016-05-10 14:40:11 -04:00
2016-05-29 11:58:42 -07:00
2016-05-10 14:40:11 -04:00
2016-05-10 14:49:13 -04:00
2016-01-20 13:58:02 -06:00
2016-05-11 13:02:34 -07:00
2016-05-18 13:25:20 -05:00
2016-06-12 11:47:25 +02:00
2016-05-26 19:56:03 -05:00
2016-06-10 18:05:28 -05:00
2016-05-10 14:40:11 -04:00
2016-05-10 15:43:50 -04:00
2016-06-10 19:27:57 +02:00
2016-01-20 13:58:02 -06:00
2016-05-10 14:14:47 -04:00
2016-05-10 14:14:47 -04:00
2016-05-10 14:49:14 -04:00
2016-05-11 09:16:48 -07:00
2016-05-10 13:25:04 -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-14 08:26:37 -07:00
2016-05-26 19:56:03 -05:00
2016-05-26 19:55:26 -05:00
2016-02-08 22:04:24 +00:00
2016-02-08 22:04:24 +00:00