Skip to content

Instantly share code, notes, and snippets.

@ioggstream
Created May 18, 2017 17:11
Show Gist options
  • Save ioggstream/4d4033001076d5881278163fb45890d7 to your computer and use it in GitHub Desktop.
Save ioggstream/4d4033001076d5881278163fb45890d7 to your computer and use it in GitHub Desktop.
Ternary operator with heat and yaql
heat_template_version: newton
parameters:
one:
type: string
default: one
two:
type: string
default: two
version:
type: string
default: lbaasv2
resources:
debug:
type: OS::Heat::Value
properties:
value:
yaql:
expression:
str_replace:
template: '$.data[%version%]'
params:
'%version%':
get_param: version
data:
lbaasv1:
get_param: one
lbaasv2:
get_param: two
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment