Ask Your Question

Revision history [back]

The list_join function converts the list members to JSON if they are not already strings. So this can be accomplished by doing list_join on a single-member list. e.g.:

list_join:
  - ''
  - - foo: bar
      blarg: wibble

will resolve to the JSON serialisation:

{"foo": "bar", "blarg": "wibble"}

The list_join function converts the list members to JSON if they are not already strings. So this can be accomplished by doing list_join on a single-member list. e.g.:

list_join:
  - ''
  - - foo: bar
      blarg: wibble

will resolve to the JSON serialisation:

{"foo": "bar", "blarg": "wibble"}

Note that this requires a heat_template_version of 2015-10-15 or later. Earlier template versions accepted only strings to join.

The list_join function converts the list members to JSON if they are lists or dicts (though unfortunately not already strings. numbers or booleans). So this can be accomplished by doing list_join on a single-member list. e.g.:

list_join:
  - ''
  - - foo: bar
      blarg: wibble

will resolve to the JSON serialisation:

{"foo": "bar", "blarg": "wibble"}

Note that this requires a heat_template_version of 2015-10-15 or later. Earlier template versions accepted only strings to join.