pivotal-cf / om

General command line utility for working with VMware Tanzu Operations Manager
Apache License 2.0
134 stars 104 forks source link

Error when --var values start with an & #589

Open sneal opened 2 years ago

sneal commented 2 years ago

Each vars value is interpolated and are unmarshalled as yaml via the imported bosh cli lib so when you have a var value that starts with an ampersand it causes an error. For example:

$ om configure-director \
  --config director.yml \
  --var "iaas-configurations_0_vcenter_password=&qgz6dUjD^Rj3S6e"

Deserializing variables 'iaas-configurations_0_vcenter_password=&qgz6dUjD^Rj3S6e': yaml: did not find expected alphabetic or numeric character
cf-gitbot commented 2 years ago

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.

sneal commented 2 years ago

The workaround is to shove everything in a yaml file with double quotes around the value.

iaas-configurations_0_vcenter_password: "&qgz6dUjD^Rj3S6e"
om configure-director \
  --config director.yml \
  -l vars.yml
jtarchie commented 2 years ago

If this is an issue here, it is most likely an issue with the bosh cli, too. This might have to resolve upstream.