go-patch icon indicating copy to clipboard operation
go-patch copied to clipboard

Allow replacing updating keys

Open tjvman opened this issue 7 years ago • 1 comments

I was working with a BOSH manifest that had numerous incorrect keys specified, e.g.:

- name: foo
  BADtype: password

and wanted to change BADtype to type using an ops-file (because I did not own the repo the manifest belonged to). However, the only supported way to do this is to use a remove to get rid of the key and its value, and then a replace to add the correct key with the same value. This workflow requires placing the entire value of the incorrect key (which could be large) into the ops-file twice.

I would like to have a operation similar to replace that allows me to change a key in a single invocation without having to include the key's value block as well.

tjvman avatar Apr 30 '18 21:04 tjvman

Just wondering: are you sure you need to remove the BADtype key? Maybe just adding the correct type: password key and value is sufficient for the deployment variables to be properly declared?

bgandon avatar May 13 '18 23:05 bgandon