pivotal-cf / om

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

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

Open sneal opened 1 year ago

sneal commented 1 year 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 1 year 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 1 year 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 1 year ago

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